Custom Chinese lexicon is not adopted by SpeakSsmlAsync
See original GitHub issueDescribe the bug In Chinese, a word could have different pronunciation based on the context, so I created a custom lexicon to correct the pronunciation. The lexicon file is stored in Azure storage and can be accessed in public, the url is embedded in the ssml content correctly, generate auto with the SpeakSsmlAsyml method, there is no change to the audio
To Reproduce Steps to reproduce the behavior:
- Create a SpeechSynthesizer instance with following configuration VoiceName = “zh-CN-YunzeNeural”, Language = “zh-CN”,
- Call SpeakSsmlAsync
using var result = await synthesizer.SpeakSsmlAsync(ssml);
with following SSML content.
<speak xmlns="http://www.w3.org/2001/10/synthesis" xmlns:mstts="http://www.w3.org/2001/mstts" xmlns:emo="http://www.w3.org/2009/10/emotionml" version="1.0" xml:lang="zh-CN" >
<voice name="zh-CN-YunzeNeural">
<lexicon uri="https://matrixreader.blob.core.windows.net/public/lexicon.xml" />
任我行冷笑道, 剑指小腹,这个小姑娘。姊姊还好吗?
任我行大声道:你们这些人,都是我的手下败将,还不束手就擒!
</voice>
</speak>
- Save the audio content to a file
- Listen to the audio, the word “任我行” has different pronunciation.
- Also tested my lexicon file in the Speech Studio, the pronunciation is correct. So it could be something wrong in SDK.
Expected behavior Expect the the lexicon is adopted by sdk and pronunciation is correct.
Version of the Cognitive Services Speech SDK Version 1.27.0
Platform, Operating System, and Programming Language
- OS: Windows 11 Pro 22H2
- Hardware - x64,
- Programming language: C#
Additional context
- there is no error message
Issue Analytics
- State:
- Created 3 months ago
- Comments:32 (2 by maintainers)
Top Results From Across the Web
Issues · Azure-Samples/cognitive-services-speech-sdk
beamforming StartAngle and EndAngle not working? ... Custom Chinese lexicon is not adopted by SpeakSsmlAsync in-review In review service-side issue ...
Read more >Text-To-Speech files in Studio not using custom lexicon file
In the last few days I've discovered that my custom lexicon file is not being used during TTS preview in Speech Studio or...
Read more >TTS Custom Lexicon is not applied
I am trying to apply a custom lexicon to the Text-to-Speech service. Here is my lexicon file: <?xml version="1.0" encoding="UTF-8"?>
Read more >SpeakSsmlAsync Method - Microsoft Speech Platform SDK ...
To synchronously speak a string that contains SSML markup, use the SpeakSsml(String) method. You can use SpeakAsync(String) to initiate the asynchronous ...
Read more >Azure Cognitive Services TTS custom lexicon isn't firing
I am trying to apply a custom lexicon to the en-US voice just like in Azure's tutorial, here's my ssml.xml:
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @AndrewLang I am on vacation previous days. For this: " if there are words seems not supported or well recognized, then it cause the whole lexicon file not adopted", it’s correct. If one word is set a wrong pronunciation, the whole lexicon won’t work.
Region should not be the problem, I will share my code soon.