SsmlVoiceGender.Male/Female not working in Text-to-Speech API C#

It seems like something happened to using SsmlVoiceGender.Male or SsmlVoiceGender.Female to select the gender of a voice. Now for Chinese Traditional it only picks a female voice. For Spanish it only picks a male voice, regardless of the SsmlGender setting. Did something change? Do I need to specify a voice name? My code:

string languageCode = languageID.LanguageCultureExtensionCode;

            double speakingRate = RateTable[Speed + 10];

            TextToSpeechClientBuilder builder = new TextToSpeechClientBuilder
            {
                CredentialsPath = GoogleUtilities.GetGoogleKeyPath()
            };

            TextToSpeechClient client = builder.Build();
            // The input can be provided as text or SSML.
            SynthesisInput input = new SynthesisInput
            {
                Text = text
            };
            // You can specify a particular voice, or ask the server to pick based
            // on specified criteria.
            VoiceSelectionParams voiceSelection = new VoiceSelectionParams
            {
                LanguageCode = languageCode,
                SsmlGender = (VoiceName == "Google Female"
                    ? SsmlVoiceGender.Female
                    : SsmlVoiceGender.Male)
            };
            // The audio configuration determines the output format and speaking rate.
            AudioConfig audioConfig = new AudioConfig
            {
                AudioEncoding = AudioEncoding.Mp3,
                SampleRateHertz = 44100,
                SpeakingRate = speakingRate
            };

            try
            {
                SynthesizeSpeechResponse response = client.SynthesizeSpeech(input, voiceSelection, audioConfig);

...

Someone posted this to Stack Overflow, which didn’t get a response I could use: https://stackoverflow.com/questions/74718704/google-text-to-speech-api-always-translates-text-with-female-voice

It looks like I need to specify a voice name, i.e.:

string googleVoiceName;

            if (languageCode == "zh-TW")
            {
                if (VoiceName == "Google Male")
                    googleVoiceName = "cmn-TW-Standard-B";
                else
                    googleVoiceName = "cmn-TW-Standard-A";
            }
            else
                googleVoiceName = "";

            // You can specify a particular voice, or ask the server to pick based
            // on specified criteria.
            VoiceSelectionParams voiceSelection = new VoiceSelectionParams
            {
                LanguageCode = languageCode,
                SsmlGender = (VoiceName == "Google Female"
                    ? SsmlVoiceGender.Female
                    : SsmlVoiceGender.Male),
                Name = googleVoiceName
            };

But the original code used to work, so I think it’s a bug.