0

我正在 WP8 上实现简单的语音识别和合成(SSML)。当我在模拟器中测试应用程序时,一切都很好。但是当我在物理设备(HTC Windows Phone X8)上测试应用程序时,SSML 合成出现了一个问题。此 SSML 代码工作正常:

await synth.SpeakSsmlAsync(@"<speak version=""1.0""
                                 xmlns=""http://www.w3.org/2001/10/synthesis"" xml:lang=""en-US"">
                                 <voice gender=""female"">
                                     Volume level 100.
                                 </voice>
                             </speak>");

而这个 SSML:

await synth.SpeakSsmlAsync(@"<speak version=""1.0""
                                 xmlns=""http://www.w3.org/2001/10/synthesis"" xml:lang=""en-US"">
                                 <voice gender=""female"">
                                     <prosody volume=""100.0"">
                                         Volume level 100.
                                     </prosody>
                                 </voice>
                             </speak>");

抛出异常:

{System.FormatException:
      The text associated with this error code could not be found.
      at Windows.Phone.Speech.Synthesis.SpeechSynthesizer.SpeakSsmlAsync(String content)
      at PhoneApp1.MainPage.<voiceSynth_Click>d__9.MoveNext()}  System.Exception
{System.FormatException}

任何人都有任何想法,为什么<prosody>标签在设备上不起作用?

4

1 回答 1

1

问题解决了!

<prosody volume=""100.0""> doesn't work because the number is not integer.
<prosody volume=""100""> it should look like this
于 2013-04-03T10:40:14.093 回答