Ejemplo n.º 1
0
ESPEAK_API espeak_ERROR espeak_Key(const char *key)
{//================================================
	ENTER("espeak_Key");
	// symbolic name, symbolicname_character  - is there a system resource of symbolicnames per language

	if(f_logespeak)
	{
		fprintf(f_logespeak,"\nKEY %s\n",key);
	}

	espeak_ERROR a_error = EE_OK;

	if(synchronous_mode)
	{
		sync_espeak_Key(key);
		return(EE_OK);
	}

#ifdef USE_ASYNC
	t_espeak_command* c = create_espeak_key( key, NULL);
	a_error = fifo_add_command(c);
	if (a_error != EE_OK)
	{
		delete_espeak_command(c);
	}

#endif
  return a_error;
}
Ejemplo n.º 2
0
ESPEAK_API espeak_ERROR espeak_SetPunctuationList(const wchar_t *punctlist)
{//================================================================
  ENTER("espeak_SetPunctuationList");
  // Set the list of punctuation which are spoken for "some".

#ifdef USE_ASYNC
	espeak_ERROR a_error;

	if(synchronous_mode)
	{
		sync_espeak_SetPunctuationList(punctlist);
		return(EE_OK);
	}

	t_espeak_command* c = create_espeak_punctuation_list( punctlist);
	a_error = fifo_add_command(c);
	if (a_error != EE_OK)
	{
		delete_espeak_command(c);
	}
	return a_error;
#else
	sync_espeak_SetPunctuationList(punctlist);
	return(EE_OK);
#endif
}  //  end of espeak_SetPunctuationList
Ejemplo n.º 3
0
ESPEAK_API espeak_ERROR espeak_SetParameter(espeak_PARAMETER parameter, int value, int relative)
{//=============================================================================================
  ENTER("espeak_SetParameter");

	if(f_logespeak)
	{
		fprintf(f_logespeak,"SETPARAM %d %d %d\n",parameter,value,relative);
	}
#ifdef USE_ASYNC
	espeak_ERROR a_error;

	if(synchronous_mode)
	{
		SetParameter(parameter,value,relative);
		return(EE_OK);
	}

	t_espeak_command* c = create_espeak_parameter(parameter, value, relative);

	a_error = fifo_add_command(c);
	if (a_error != EE_OK)
	{
		delete_espeak_command(c);
	}
	return a_error;
#else
	SetParameter(parameter,value,relative);
	return(EE_OK);
#endif
}
Ejemplo n.º 4
0
ESPEAK_API espeak_ERROR espeak_SetVoiceByName(const char *name)
{//============================================================
  ENTER("espeak_SetVoiceByName");

//#ifdef USE_ASYNC
// I don't think there's a need to queue change voice requests
#ifdef deleted
	espeak_ERROR a_error;

	if(synchronous_mode)
	{
		return(SetVoiceByName(name));
	}

	t_espeak_command* c = create_espeak_voice_name(name);
	a_error = fifo_add_command(c);
	if (a_error != EE_OK)
	{
		delete_espeak_command(c);
	}
	return a_error;
#else
	return(SetVoiceByName(name));
#endif
}  // end of espeak_SetVoiceByName
Ejemplo n.º 5
0
ESPEAK_API espeak_ERROR espeak_Char(wchar_t character)
{//===========================================
  ENTER("espeak_Char");
  // is there a system resource of character names per language?

	if(f_logespeak)
	{
		fprintf(f_logespeak,"\nCHAR U+%x\n",character);
	}

#ifdef USE_ASYNC
	espeak_ERROR a_error;

	if(synchronous_mode)
	{
		sync_espeak_Char(character);
		return(EE_OK);
	}

	t_espeak_command* c = create_espeak_char( character, NULL);
	a_error = fifo_add_command(c);
	if (a_error != EE_OK)
	{
		delete_espeak_command(c);
	}
	return a_error;
#else
	sync_espeak_Char(character);
	return(EE_OK);
#endif
}
Ejemplo n.º 6
0
ESPEAK_NG_API espeak_ng_STATUS espeak_ng_SetParameter(espeak_PARAMETER parameter, int value, int relative)
{
#ifdef USE_ASYNC
	if (my_mode & ENOUTPUT_MODE_SYNCHRONOUS)
		return SetParameter(parameter, value, relative);

	t_espeak_command *c = create_espeak_parameter(parameter, value, relative);

	espeak_ng_STATUS status = fifo_add_command(c);
	if (status != ENS_OK)
		delete_espeak_command(c);
	return status;
#else
	return SetParameter(parameter, value, relative);
#endif
}
Ejemplo n.º 7
0
ESPEAK_NG_API espeak_ng_STATUS espeak_ng_SpeakCharacter(wchar_t character)
{
	// is there a system resource of character names per language?

#ifdef USE_ASYNC
	if (my_mode & ENOUTPUT_MODE_SYNCHRONOUS)
		return sync_espeak_Char(character);

	t_espeak_command *c = create_espeak_char(character, NULL);
	espeak_ng_STATUS status = fifo_add_command(c);
	if (status != ENS_OK)
		delete_espeak_command(c);
	return status;
#else
	return sync_espeak_Char(character);
#endif
}
Ejemplo n.º 8
0
ESPEAK_NG_API espeak_ng_STATUS espeak_ng_SpeakKeyName(const char *key_name)
{
	// symbolic name, symbolicname_character  - is there a system resource of symbolicnames per language

	if (my_mode & ENOUTPUT_MODE_SYNCHRONOUS)
		return sync_espeak_Key(key_name);

#ifdef USE_ASYNC
	t_espeak_command *c = create_espeak_key(key_name, NULL);
	espeak_ng_STATUS status = fifo_add_command(c);
	if (status != ENS_OK)
		delete_espeak_command(c);
	return status;
#else
	return sync_espeak_Key(key_name);
#endif
}
Ejemplo n.º 9
0
ESPEAK_NG_API espeak_ng_STATUS espeak_ng_SetPunctuationList(const wchar_t *punctlist)
{
	// Set the list of punctuation which are spoken for "some".

#ifdef USE_ASYNC
	if (my_mode & ENOUTPUT_MODE_SYNCHRONOUS) {
		sync_espeak_SetPunctuationList(punctlist);
		return ENS_OK;
	}

	t_espeak_command *c = create_espeak_punctuation_list(punctlist);
	espeak_ng_STATUS status = fifo_add_command(c);
	if (status != ENS_OK)
		delete_espeak_command(c);
	return status;
#else
	sync_espeak_SetPunctuationList(punctlist);
	return ENS_OK;
#endif
}
Ejemplo n.º 10
0
ESPEAK_API espeak_ERROR espeak_SetVoiceByProperties(espeak_VOICE *voice_selector)
{//==============================================================================
  ENTER("espeak_SetVoiceByProperties");

//#ifdef USE_ASYNC
#ifdef deleted
	espeak_ERROR a_error;

	if(synchronous_mode)
	{
		return(SetVoiceByProperties(voice_selector));
	}

	t_espeak_command* c = create_espeak_voice_spec( voice_selector);
	a_error = fifo_add_command(c);
	if (a_error != EE_OK)
	{
		delete_espeak_command(c);
	}
	return a_error;
#else
	return(SetVoiceByProperties(voice_selector));
#endif
}  // end of espeak_SetVoiceByProperties