class
Synthesizer
public sealed class Synthesizer A speech synthesis stream. Lets you write text into speech and output it to a SoundHandle.
Constructors
Synthesizer() Properties
| Name | Type | Description |
|---|---|---|
InstalledVoices | ReadOnlyCollection<InstalledVoice> | Gets a list of currently installed voices on the user's system. |
CurrentVoice | String | Gets the current voice being used by SpeechSynthesizer. |
Methods
virtual Void Dispose() Synthesizer TrySetVoice(String voiceName) Tries to set the voice to a matching voice name installed on the user's system.
voiceName Synthesizer TrySetVoice(String gender = Male, String age = null) Tries to set the voice matching gender and age criteria.
gender age Synthesizer OnVisemeReached(Action<Int32, TimeSpan> action) Synthesizer WithBreak() Adds a break to the speech.
SoundHandle Play() Takes info from Builder and creates a SpeechSynthesizer, outputting to a stream object. Using AudioStreamHelpers we then read all the PCM samples, and write it to a SoundStream. This means it'll work like any other sound.