The show and the corresponding movies works differently than the game does.Which can never happen in the game series.
In other words Meloetta is a girl, but is not stated in the game.
Note that a female voice accompanies only feminine looking Pokemon in the show and movies.
If I answered your question then put it as best answer if not comment and I'll try to rewrite it.