Synthesizerclass
A speech synthesis stream. Lets you write text into speech and output it to a `Sandbox.SoundHandle`.
Constructors1
Showing 1 constructors
public Synthesizer()
No results match this filter.
Methods8
Showing 8 methods
public virtual sealed void Dispose()
void—public Sandbox.Speech.Synthesizer OnVisemeReached(System.Action`2<int,System.TimeSpan> action)
| Parameter | Type | Description |
|---|---|---|
| action | Action<int,TimeSpan> | — |
public Sandbox.SoundHandle Play()
Takes info from `Sandbox.Speech.Synthesizer.Builder` and creates a `System.Speech.Synthesis.SpeechSynthesizer`, outputting to a stream object. Using `Sandbox.Speech.Synthesizer.AudioStreamHelpers` we then read all the PCM samples, and write it to a SoundStream. This means it'll work like any other sound.
public Sandbox.Speech.Synthesizer WithBreak()
Adds a break to the speech.
public Sandbox.Speech.Synthesizer WithRate(int rate)
Sets the playback rate of the synthesizer.
| Parameter | Type | Description |
|---|---|---|
| rate | int | — |
public Sandbox.Speech.Synthesizer WithText(string input)
Adds some text to the speech.
| Parameter | Type | Description |
|---|---|---|
| input | string | — |
No results match this filter.
Properties2
Showing 2 properties
public string Sandbox.Speech.Synthesizer.CurrentVoice { get; set; }
Gets the current voice being used by `Sandbox.Speech.Synthesizer.SpeechSynthesizer`.
string—public System.Collections.ObjectModel.ReadOnlyCollection`1<Sandbox.Speech.Synthesizer.InstalledVoice> Sandbox.Speech.Synthesizer.InstalledVoices { get; set; }
Gets a list of currently installed voices on the user's system.
No results match this filter.