我一直在尝试为 SpeechLibs Talk() 函数使用多个标志。这就是我想要做的:
V.Speak ("Text", SpeechVoiceSpeakFlags.SVSFlagsAsync + SpeechVoiceSpeakFlags.SVSFIsXML);
但是,它给了我以下错误:
错误 1 运算符“+”不能应用于“SpeechLib.SpeechVoiceSpeakFlags”和“SpeechLib.SpeechVoiceSpeakFlags”类型的操作数 c:\users\max\documents\visual studio 2013\projects\switch\switch\default_tts_screen.cs 62 51 Switch
该文档虽然明确指出这应该是可能的:
Example
The following code snippet demonstrates the Speak method with several commonly used flag settings.
[...]
V.Speak "text with XML", SVSFIsXML + SVSFlagsAsync
[...]
请注意,我使用的是 C#,但这不应该改变任何东西。对吧?..请帮我解决这个问题,因为它已经从几个小时以来就已经把我的头砸到了我的桌子上。我还没有在网上找到解决这个问题的方法。