Microsoft Azure TTS认知服务语音限制问题

sxpgvts3  于 2023-10-22  发布在  其他
关注(0)|答案(2)|浏览(244)

我很新学习Microsoft Azure的文本到语音(TTS)服务。我成功地能够通过使用AzureTTS服务将给定文本转换为音频文件。当我在SSMLXML文档中有一个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中没有提到限制,这对我来说将是一个很大的帮助。

svmlkihl

svmlkihl1#

这是由于延迟而导致的已知设置。我们已经意识到并正在努力消除这种限制。希望我们能在本周内完成修复和部署,如果一切顺利,我们可能会提前完成。

zi8p0yeb

zi8p0yeb2#

1.当前上限为45。它包含voiceaudio标记。例如,32个voice标签和13个audio标签。

相关问题