Text-to-speech voice options

Before you inject a text-to-speech (TTS) message or read text locally, you can choose the voice to use for synthesizing speech. You can set this option per user at any time.

Two voices are available: male and female. You can list all available voices by using the following script:

foreach (string voiceName in VivoxService.Instance.TextToSpeechAvailableVoices)
{
    Console.WriteLine($"Available Voice: Name=[{voiceName}]");
}
// Available Voice: Name=[en_US male]
// Available Voice: Name=[en_US female]

Console.WriteLine($"Current Voice: {VivoxService.Instance.TextToSpeechCurrentVoice()}");
// Current Voice: en_US female

When you call a TTS method that calls for speech to be synthesized, the system uses the ITTSVoice that is set as the current voice for that user. If no voice is selected, the system uses the Vivox SDK default.