如何让Azure文本转语音在印尼语句子中正确发音英文术语?
解决Azure Text-to-Speech中印尼语句子内英文术语的英文发音问题
要让印尼语发音人(id-ID-ArdiNeural)对句子中的英文术语使用英文发音,只需在SSML中用<lang>标签包裹目标英文词汇,指定对应的英文语言代码即可。同一神经语音模型支持跨语言发音,无需切换发音人。
修改后的完整SSML代码如下:
<!--ID=B7267351-473F-409D-9765-754A8EBCDE05;Version=1|{"VoiceNameToIdMapItems":[{"Id":"6eae597f-b880-47c8-bbe6-f05e69fbdf9d","Name":"Microsoft Server Speech Text to Speech Voice (id-ID, ArdiNeural)","ShortName":"id-ID-ArdiNeural","Locale":"id-ID","VoiceType":"StandardVoice"}]}--> <!--ID=FCB40C2B-1F9F-4C26-B1A1-CF8E67BE07D1;Version=1|{"Files":{}}--> <!--ID=5B95B1CC-2C7B-494F-B746-CF22A0E779B7;Version=1|{"Locales":{"en-GB":{"AutoApplyCustomLexiconFiles":[{}]},"en-US":{"AutoApplyCustomLexiconFiles":[{}]},"fr-CA":{"AutoApplyCustomLexiconFiles":[{}]},"id-ID":{"AutoApplyCustomLexiconFiles":[{}]},"en-SG":{"AutoApplyCustomLexiconFiles":[{}]}}}--> <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="id-ID"> <voice name="id-ID-ArdiNeural"> lebih mudah dengan menggunakan azure yang mendukung banyak <lang xml:lang="en-US">language</lang> dan voice support </voice> </speak>
关键说明:
<lang xml:lang="en-US">language</lang>:通过该标签指定"language"按美式英文发音,发音人会自动切换到英文发音模式,保持音色一致。- 如果需要英式英文发音,可将
xml:lang的值改为en-GB,根据需求调整即可。 - 多个英文术语可分别用
<lang>标签包裹,或统一包裹连续的英文片段。
内容的提问来源于stack exchange,提问作者Herahadi An
相关产品推荐
相关产品推荐

