MRTK TextToSpeech.SpeakSsml 在使用 <voice /> 元素时不起作用。设备:HoloLens2
MRTK TextToSpeech.SpeakSsml doesn't work when using <voice /> element. Device: HoloLens2
我正在使用 unity + MRTK 为 HoloLens 2 开发应用程序。我正在尝试对 MRTK TextToSpeech.SpeakSsml 方法 (MRTK API Reference) 使用“语音风格”。文字转语音作品;但是,我无法使用演讲风格。
示例 ssml:
<speak version=""1.0"" xmlns=""http://www.w3.org/2001/10/synthesis"" xmlns:mstts=""https://www.w3.org/2001/mstts"" xml:lang=""en-US"">
<mstts:express-as style=""cheerful"">
Cheerful hello!
</mstts:express-as>
<break time=""1s"" />
<mstts:express-as style=""angry"">
Angry goodbye!
</mstts:express-as>
</speak>
我的猜测是默认语音不支持语音风格。但是,如果我添加一个语音元素以使用另一种语音(documentation 中列出了四种可用语音),TextToSpeech 将根本不起作用。所以,我面临两个问题:
- 当使用 SpeakSsml method instead of StartSpeaking, the selected voice (TextToSpeech.Voice) 时被忽略,我无法使用语音元素更改它。
- 我找不到 MRTK TextToSpeech 中可用语音支持的 SSML 元素的文档 Class。
有任何想法或有用的链接吗?
谢谢!
MRTK提供的TextToSpeech依赖Windows10SpeechSynthesizer class, so it works offline and does not support adjust speaking styles. And the mstts:express-as
element is only available in the Azure Speech Service, for more information please refer to this documentation: Improve synthesis with Speech Synthesis Markup Language (SSML)
我正在使用 unity + MRTK 为 HoloLens 2 开发应用程序。我正在尝试对 MRTK TextToSpeech.SpeakSsml 方法 (MRTK API Reference) 使用“语音风格”。文字转语音作品;但是,我无法使用演讲风格。 示例 ssml:
<speak version=""1.0"" xmlns=""http://www.w3.org/2001/10/synthesis"" xmlns:mstts=""https://www.w3.org/2001/mstts"" xml:lang=""en-US"">
<mstts:express-as style=""cheerful"">
Cheerful hello!
</mstts:express-as>
<break time=""1s"" />
<mstts:express-as style=""angry"">
Angry goodbye!
</mstts:express-as>
</speak>
我的猜测是默认语音不支持语音风格。但是,如果我添加一个语音元素以使用另一种语音(documentation 中列出了四种可用语音),TextToSpeech 将根本不起作用。所以,我面临两个问题:
- 当使用 SpeakSsml method instead of StartSpeaking, the selected voice (TextToSpeech.Voice) 时被忽略,我无法使用语音元素更改它。
- 我找不到 MRTK TextToSpeech 中可用语音支持的 SSML 元素的文档 Class。
有任何想法或有用的链接吗?
谢谢!
MRTK提供的TextToSpeech依赖Windows10SpeechSynthesizer class, so it works offline and does not support adjust speaking styles. And the mstts:express-as
element is only available in the Azure Speech Service, for more information please refer to this documentation: Improve synthesis with Speech Synthesis Markup Language (SSML)