How do I develop applications that speak with multiple voices?
Last reviewed: 7/15/2015
HOW Article ID: H061405
The information in this article applies to:
- SpeechKit 8
Summary
Develop applications that synthesize with multiple voices by providing the voice name on StartPlayback requests.
More Information
The synthesizer voice name is an optional parameter of StartPlayback requests so queued requests can switch voices.
Setting the CSPEngine property is used to set the default voice for all queued requests. Queued requests are not purged if the speech API is the same. The new voice name is used on next request processed.
// Instantiate ChantTTS object
NChantTTS1 = new NChantTTS();
// Synthesize text to speech
NChantTTS1.StartPlayback("Hello world", 0, ChantPlaybackObject.CPOText, ChantAudioFormat.CAFDefault, ChantPlaybackStyle.CPSAsynchronous, "Microsoft David Desktop - English (United States)");
// Instantiate ChantTTS object
pChantTTS = new CChantTTS();
// Synthesize text to speech
pChantTTS->StartPlayback(L"Hello world", 0, CPOText, CAFDefault, CPSAsynchronous, L"Microsoft David Desktop - English (United States)");
// Instantiate ChantTTS object
pChantTTS = new CChantTTS();
// Synthesize text to speech
pChantTTS->StartPlayback("Hello world", 0, CPOText, CAFDefault, CPSAsynchronous, "Microsoft David Desktop - English (United States)");
var aTChantTTS: TChantTTS;
// Instantiate ChantTTS object
aTChantTTS = TChantTTS.Create();
// Synthesize text to speech
aTChantTTS.StartPlayback('Hello world', 0, CPOText, CAFDefault, CPSAsynchronous, 'Microsoft David Desktop - English (United States)');
// Instantiate ChantTTS object
JChantTTS1 = new JChantTTS();
// Synthesize text to speech
JChantTTS1.startPlayback("Hello world", 0, ChantPlaybackObject.CPOText, ChantAudioFormat.CAFDefault, ChantPlaybackStyle.CPSAsynchronous, "Microsoft David Desktop - English (United States)");
' Instantiate ChantTTS object
NChantTTS1 = New NChantTTS()
' Synthesize text to speech
NChantTTS1.StartPlayback("Hello world", 0, ChantPlaybackObject.CPOText, ChantAudioFormat.CAFDefault, ChantPlaybackStyle.CPSAsynchronous, "Microsoft David Desktop - English (United States)")