autoSound SpeechSynthesizer_and_TextInterval_to_Sound (SpeechSynthesizer me, TextInterval thee, autoTextGrid *p_tg)
{
	try {
		if (! thy text || thy text[0] == '\0') {
			Melder_throw (U"No text in TextInterval.");
		}
		autoSound him = SpeechSynthesizer_to_Sound (me, thy text, p_tg, nullptr);
		return him;
	} catch (MelderError) {
		Melder_throw (U"Sound not created from TextInterval.");
	}
}
Example #2
0
void SpeechSynthesizer_playText (SpeechSynthesizer me, const char32 *text) {
	autoSound thee = SpeechSynthesizer_to_Sound (me, text, nullptr, nullptr);
	Sound_playPart (thee.get(), thy xmin, thy xmax, nullptr, nullptr);
}
Example #3
0
void SpeechSynthesizer_playText (SpeechSynthesizer me, const char32 *text) {
	autoSound thee= SpeechSynthesizer_to_Sound (me, text, 0, 0);
	Sound_playPart (thee.peek(), thy xmin, thy xmax, 0, 0);
}