Ejemplo n.º 1
0
bool Speak(LPCTSTR pszSay)
{
#ifdef HAVE_SAPI_H
	if (theApp.emuledlg == NULL || !theApp.emuledlg->IsRunning())
		return false;
	if (s_bTTSDisabled)
		return false;

	if (!s_bInitialized)
	{
		s_bInitialized = true;
		if (!theTextToSpeech.CreateTTS())
			return false;
	}
	return theTextToSpeech.Speak(pszSay);
#else
	return false;
#endif
}
Ejemplo n.º 2
0
bool Speak(LPCTSTR pszSay)
{
#ifdef HAVE_SAPI_H
	if (!theApp.IsRunning())
		return false;
	if (s_bTTSDisabled)
		return false;

	if (!s_bInitialized)
	{
		s_bInitialized = true;
		if (!theTextToSpeech.CreateTTS())
			return false;
	}
	return theTextToSpeech.Speak(pszSay);
#else//HAVE_SAPI_H
	UNREFERENCED_PARAMETER(pszSay);
	return false;
#endif//HAVE_SAPI_H
}