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:
Reece H. Dunn
2017-02-04 16:50:57 +00:00
parent bb7630e4c1
commit 6eaf1d2ddc
+8
View File
@@ -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)