// ----------------------------------------------------------
bool ofxAudioUnitSpeechSynth::setVoice(int voiceIndex)
// ----------------------------------------------------------
{
	VoiceSpec vSpec;
	OSErr err;
	err = GetIndVoice(voiceIndex, &vSpec);
	
	if(!err)
	{
		StopSpeech(_channel);
		err = SetSpeechInfo(_channel, soCurrentVoice, &vSpec);
	}
	
	return (err == 0);
}
// ----------------------------------------------------------
void ofxAudioUnitSpeechSynth::stop()
// ----------------------------------------------------------
{
	StopSpeech(_channel);
}
コード例 #3
0
void ofxSpeechSynthesizer::stopSpeaking()
{
    OSErr       errorStatus;
    errorStatus = StopSpeech(speechChannel);
}