我很新学习Microsoft Azure
的文本到语音(TTS)服务。我成功地能够通过使用Azure
的TTS
服务将给定文本转换为音频文件。当我在SSML
XML
文档中有一个voice
元素时,它工作正常。使用SSML
的例子是:
<speak version="1.0" xml:lang="en-US">
<voice xml:lang="en-US" xml:gender="Male" name="en-US-Jessa24kRUS">
Hello, this is my sample text to convert into audio?
</voice>
</speak>
但是,当我有多个语音标签(基于性别)时,它会导致错误。其中SSML
为:
<speak version="1.0" xml:lang="en-US">
<voice xml:lang="en-US" xml:gender="Male" name="en-US-Guy24kRUS"> What’s your name? </voice>
<voice xml:lang="en-US" xml:gender="Female" name="en-US-Jessa24kRUS"> My name is Cindy Smith. Do you know John Silver?</voice>
<voice xml:lang="en-US" xml:gender="Male" name="en-US-Guy24kRUS"> John and I are old friends. </voice>
<voice xml:lang="en-US" xml:gender="Female" name="en-US-Jessa24kRUS"> John just joined our company as a salesperson. </voice>
<voice xml:lang="en-US" xml:gender="Male" name="en-US-Guy24kRUS"> That’s good news. John has been a salesperson for chemical products for many years. </voice>
<voice xml:lang="en-US" xml:gender="Female" name="en-US-Jessa24kRUS"> I head he really likes his new job.</voice>
</speak>
错误是:
响应状态代码不表示成功:400(SSML必须包含最多5个语音元素。实际数字6)。
**如果有人解释为什么限制我使用5个voice tags
,而documentation中没有提到限制,这对我来说将是一个很大的帮助。
2条答案
按热度按时间svmlkihl1#
这是由于延迟而导致的已知设置。我们已经意识到并正在努力消除这种限制。希望我们能在本周内完成修复和部署,如果一切顺利,我们可能会提前完成。
zi8p0yeb2#
1.当前上限为45。它包含
voice
和audio
标记。例如,32个voice
标签和13个audio
标签。