语音函数使用方法

构造函数 

SpeechSynthesizer()

初始化 SpeechSynthesizer 类的新实例。

属性 

Rate

获取或设置 SpeechSynthesizer 对象的语速。

State

获取 SpeechSynthesizer 对象的当前语速。

Voice

获取有关当前 SpeechSynthesizer 对象的语音的信息。

Volume

获取或设置 SpeechSynthesizer 对象的输出量。

方法 

AddLexicon(Uri, String)

将 SpeechSynthesizer 添加到该对象的词典中。

Dispose()

处置 SpeechSynthesizer 对象并释放会话期间使用的资源。

Equals(Object)

确定指定的对象是否等于当前对象。

(Inherited from Object)
Finalize()

方法在未能调用 Dispose() 的情况下的事件中充当防护措施来清理资源。

GetCurrentlySpokenPrompt()

获取 SpeechSynthesizer 正在讲话的提示。

GetHashCode()

作为默认哈希函数。

(Inherited from Object)
GetInstalledVoices()

返回所有安装的语音合成(文字到语音)语音。

GetInstalledVoices(CultureInfo)

返回支持特定区域设置的所有安装的语音合成(文字到语音)语音。

GetType()

获取当前实例的 Type。

(Inherited from Object)
MemberwiseClone()

创建当前 Object 的浅表副本。

(Inherited from Object)
Pause()

暂停 SpeechSynthesizer 对象。

RemoveLexicon(Uri)

从 SpeechSynthesizer 对象中移除词典。

Resume()

继续 SpeechSynthesizer 对象(在它暂停后)。

SelectVoice(String)

通过名称选择特定语音。

SelectVoiceByHints(VoiceGender)

选择具有特定性别的语音。

SelectVoiceByHints(VoiceGender, VoiceAge)

选择具有特定性别和年龄的语音。

SelectVoiceByHints(VoiceGender, VoiceAge, Int32)

根据语音的排序位置选择具有特定性别和年龄的语音。

SelectVoiceByHints(VoiceGender, VoiceAge, Int32, CultureInfo)

根据语音的排序位置选择具有特定性别、年龄和区域设置的语音。

SetOutputToAudioStream(Stream, SpeechAudioFormatInfo)

配置 SpeechSynthesizer 对象以追加输出到音频流。

SetOutputToDefaultAudioDevice()

配置 SpeechSynthesizer 对象以发送输出到默认音频设备。

SetOutputToNull()

配置 SpeechSynthesizer 对象以不从对设备、文件或流的聚合操作中发送输出。

SetOutputToWaveFile(String)

配置 SpeechSynthesizer 对象以追加输出到包含波形格式音频的文件。

SetOutputToWaveFile(String, SpeechAudioFormatInfo)

配置 SpeechSynthesizer 对象以追加输出到指定格式中的波形音频格式文件。

SetOutputToWaveStream(Stream)

配置 SpeechSynthesizer 对象以追加输出到包含波形格式音频的流。

Speak(Prompt)

同步使用 Prompt 对象内容的语言。

Speak(PromptBuilder)

同步使用 PromptBuilder 对象内容的语言。

Speak(String)

同步使用字符串内容的语言。

SpeakAsync(Prompt)

异步使用 Prompt 对象内容的语言。

SpeakAsync(PromptBuilder)

异步使用 PromptBuilder 对象内容的语言。

SpeakAsync(String)

异步使用字符串内容的语言。

SpeakAsyncCancel(Prompt)

取消一个排队的提示的异步合成操作。

SpeakAsyncCancelAll()

取消所有排队、异步、语音合成操作。

SpeakSsml(String)

同步包含 SSML 标记的 String 的语言。

SpeakSsmlAsync(String)

异步使用包含 SSML 标记的 String 的语言。

ToString()

返回表示当前对象的字符串。

(Inherited from Object)

事件 

BookmarkReached

SpeechSynthesizer 在提示中遇到书签时引发。

PhonemeReached

当音素达到时引发。

SpeakCompleted

当 SpeechSynthesizer 完成提示的讲话的时候引发。

SpeakProgress

在 SpeechSynthesizer 使用提示的每个单词后引发。

SpeakStarted

当 SpeechSynthesizer 开始提示的讲话的时候引发。

StateChanged

当 SpeechSynthesizer 的状态更改的时候引发。

VisemeReached

当 viseme 达到时引发。

VoiceChange

当 SpeechSynthesizer 的语音更改的时候引发。

猜你喜欢

转载自www.cnblogs.com/wenlong2019/p/10468901.html