Hello @Zhizhen Peng 彭志真
Welcome to Microsoft Q&A .Thank you for reaching out to us.
Thank you for the detailed description and reproduction steps. The observed behavior with ms-MY-YasminNeural where pronunciation varies based on capitalization in single-word inputs has been carefully reviewed from a Text-to-Speech processing perspective.
Azure Speech Text-to-Speech applies a processing pipeline that includes text normalization, language inference, and grapheme-to-phoneme (G2P) conversion before speech synthesis.
In single-word scenarios, there is limited contextual information. As a result:
- Casing patterns (e.g., initial or final uppercase letters) may influence token interpretation
- The system may adjust language confidence between closely related languages or lexical models
- Different internal pronunciation paths may be selected depending on how the word is normalized
This behavior is more noticeable in isolated words such as UI labels, medical terms, or standalone tokens, where sentence context is not available to stabilize interpretation.
At present, there is no public configuration or API parameter that allows direct control over capitalization handling in this preprocessing stage.
Please check if the following step help to achieve stable and predictable pronunciation across casing variations:
- Phoneme control - This option provides explicit phonetic definition and bypasses normalization variability
<phoneme alphabet="ipa" ph="...">Pharmacy</phoneme> This ensures deterministic pronunciation and is reliable for critical terms Please note that this requires correct phonetic representation per language context
- Alias substitution - recommended for UI and labels This approach maps display text to a controlled spoken form -
<sub alias="farmasi">Pharmacy</sub>
- This keeps original display text unchanged and is simple yet highly effective for UI elements - recommended for accessibility labels, buttons, and product names
- Application-level normalization For production systems, maintaining a preprocessing or mapping layer is recommended.
- Normalize known terms before sending to TTS
- Maintain a pronunciation dictionary, for example:
- Pharmacy → farmasi
- PharmacY → farmasi
- This ensures consistency across all voices and services while reducing dependency on runtime SSML complexity
The following references might be helpful , please check them out
Text to speech overview - Speech service - Foundry Tools | Microsoft Learn
Speech Synthesis Markup Language (SSML) overview - Speech service - Foundry Tools | Microsoft Learn
Speech phonetic alphabets - Speech service - Foundry Tools | Microsoft Learn
Thank you
Please 'Upvote'(Thumbs-up) and 'Accept' as answer if the response was helpful. This will be benefitting other community members who face the same issue.