mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-08 07:32:32 +00:00
Implement espeak_SetVoiceByName directly from the SetVoiceByName implementation.
This commit is contained in:
@@ -425,7 +425,7 @@ void process_espeak_command(t_espeak_command *the_command)
|
||||
case ET_VOICE_NAME:
|
||||
{
|
||||
const char *data = the_command->u.my_voice_name;
|
||||
SetVoiceByName(data);
|
||||
espeak_SetVoiceByName(data);
|
||||
}
|
||||
break;
|
||||
case ET_VOICE_SPEC:
|
||||
|
||||
@@ -145,7 +145,6 @@ void sync_espeak_SetPunctuationList(const wchar_t *punctlist);
|
||||
void sync_espeak_SetParameter(espeak_PARAMETER parameter, int value, int relative);
|
||||
int sync_espeak_SetVoiceByName(const char *name);
|
||||
int sync_espeak_SetVoiceByProperties(espeak_VOICE *voice_selector);
|
||||
espeak_ERROR SetVoiceByName(const char *name);
|
||||
espeak_ERROR SetVoiceByProperties(espeak_VOICE *voice_selector);
|
||||
void SetParameter(int parameter, int value, int relative);
|
||||
|
||||
|
||||
@@ -364,7 +364,7 @@ static espeak_ERROR Synthesize(unsigned int unique_identifier, const void *text,
|
||||
#endif
|
||||
|
||||
if (translator == NULL)
|
||||
SetVoiceByName("default");
|
||||
espeak_SetVoiceByName("default");
|
||||
|
||||
SpeakNextClause(NULL, text, 0);
|
||||
|
||||
@@ -800,11 +800,6 @@ ESPEAK_API espeak_ERROR espeak_Char(wchar_t character)
|
||||
#endif
|
||||
}
|
||||
|
||||
ESPEAK_API espeak_ERROR espeak_SetVoiceByName(const char *name)
|
||||
{
|
||||
return SetVoiceByName(name);
|
||||
}
|
||||
|
||||
ESPEAK_API espeak_ERROR espeak_SetVoiceByProperties(espeak_VOICE *voice_selector)
|
||||
{
|
||||
return SetVoiceByProperties(voice_selector);
|
||||
|
||||
@@ -542,7 +542,6 @@ extern double sonicSpeed;
|
||||
extern int n_soundicon_tab;
|
||||
extern SOUND_ICON soundicon_tab[N_SOUNDICON_TAB];
|
||||
|
||||
espeak_ERROR SetVoiceByName(const char *name);
|
||||
espeak_ERROR SetVoiceByProperties(espeak_VOICE *voice_selector);
|
||||
espeak_ERROR LoadMbrolaTable(const char *mbrola_voice, const char *phtrans, int *srate);
|
||||
void SetParameter(int parameter, int value, int relative);
|
||||
|
||||
@@ -1504,7 +1504,9 @@ static void GetVoices(const char *path)
|
||||
#endif
|
||||
}
|
||||
|
||||
espeak_ERROR SetVoiceByName(const char *name)
|
||||
#pragma GCC visibility push(default)
|
||||
|
||||
espeak_ERROR espeak_SetVoiceByName(const char *name)
|
||||
{
|
||||
espeak_VOICE *v;
|
||||
int ix;
|
||||
@@ -1554,6 +1556,8 @@ espeak_ERROR SetVoiceByName(const char *name)
|
||||
return EE_INTERNAL_ERROR; // voice name not found
|
||||
}
|
||||
|
||||
#pragma GCC visibility pop
|
||||
|
||||
espeak_ERROR SetVoiceByProperties(espeak_VOICE *voice_selector)
|
||||
{
|
||||
const char *voice_id;
|
||||
|
||||
+1
-1
@@ -666,7 +666,7 @@ int main(int argc, char **argv)
|
||||
if (voicename[0] == 0)
|
||||
strcpy(voicename, "default");
|
||||
|
||||
if (SetVoiceByName(voicename) != EE_OK) {
|
||||
if (espeak_SetVoiceByName(voicename) != EE_OK) {
|
||||
memset(&voice_select, 0, sizeof(voice_select));
|
||||
voice_select.languages = voicename;
|
||||
if (SetVoiceByProperties(&voice_select) != EE_OK) {
|
||||
|
||||
Reference in New Issue
Block a user