mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-13 09:14:12 +00:00
Look in espeak-ng-data/lang for voices.
This is to support splitting language specification (dictionaries) from voice specification (phon*).
This commit is contained in:
@@ -545,6 +545,11 @@ voice_t *LoadVoice(const char *vname, int control)
|
||||
|
||||
sprintf(path_voices, "%s%cvoices%c", path_home, PATHSEP, PATHSEP);
|
||||
sprintf(buf, "%s%s", path_voices, voicename); // look in the main voices directory
|
||||
|
||||
if (GetFileLength(buf) <= 0) {
|
||||
sprintf(path_voices, "%s%clang%c", path_home, PATHSEP, PATHSEP);
|
||||
sprintf(buf, "%s%s", path_voices, voicename); // look in the main languages directory
|
||||
}
|
||||
}
|
||||
|
||||
f_voice = fopen(buf, "r");
|
||||
@@ -1570,6 +1575,9 @@ ESPEAK_API const espeak_VOICE **espeak_ListVoices(espeak_VOICE *voice_spec)
|
||||
sprintf(path_voices, "%s%cvoices", path_home, PATHSEP);
|
||||
GetVoices(path_voices, strlen(path_voices)+1);
|
||||
|
||||
sprintf(path_voices, "%s%clang", path_home, PATHSEP);
|
||||
GetVoices(path_voices, strlen(path_voices)+1);
|
||||
|
||||
voices_list[n_voices_list] = NULL; // voices list terminator
|
||||
espeak_VOICE **new_voices = (espeak_VOICE **)realloc(voices, sizeof(espeak_VOICE *)*(n_voices_list+1));
|
||||
if (new_voices == NULL)
|
||||
|
||||
Reference in New Issue
Block a user