From 022e4e82dda1c77e4ae7968c76f72718c18de767 Mon Sep 17 00:00:00 2001 From: "Reece H. Dunn" Date: Sat, 4 Feb 2017 16:34:09 +0000 Subject: [PATCH] Don't check if the MBROLA voice data is present on Windows. With the original eSpeak Windows port, the MBROLA voices had to be present in an mbrola folder of the espeak-data. This will be different in espeak-ng, allowing the MBROLA voice files to be located elsewhere on the system. --- src/libespeak-ng/voices.c | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/src/libespeak-ng/voices.c b/src/libespeak-ng/voices.c index 83b93570..16082b5a 100644 --- a/src/libespeak-ng/voices.c +++ b/src/libespeak-ng/voices.c @@ -274,10 +274,8 @@ void ReadTonePoints(char *string, int *tone_pts) &tone_pts[8], &tone_pts[9]); } -static espeak_VOICE *ReadVoiceFile(FILE *f_in, const char *fname, const char *leafname) +static espeak_VOICE *ReadVoiceFile(FILE *f_in, const char *fname) { - (void)leafname; // unused (except for PLATFORM_WINDOWS) - // Read a Voice file, allocate a VOICE_DATA and set data from the // file's language, gender, name lines @@ -297,19 +295,6 @@ static espeak_VOICE *ReadVoiceFile(FILE *f_in, const char *fname, const char *le int n_variants = 4; // default, number of variants of this voice before using another voice int gender; -#ifdef PLATFORM_WINDOWS - char fname_buf[sizeof(path_home)+15]; - if (memcmp(leafname, "mb-", 3) == 0) { - // check whether the mbrola speech data is present for this voice - memcpy(vname, &leafname[3], 3); - vname[3] = 0; - sprintf(fname_buf, "%s/mbrola/%s", path_home, vname); - - if (GetFileLength(fname_buf) <= 0) - return 0; - } -#endif - vname[0] = 0; vgender[0] = 0; age = 0; @@ -1440,7 +1425,7 @@ static void GetVoices(const char *path) continue; // pass voice file name within the voices directory - voice_data = ReadVoiceFile(f_voice, fname+len_path_voices, FindFileData.cFileName); + voice_data = ReadVoiceFile(f_voice, fname+len_path_voices); fclose(f_voice); if (voice_data != NULL) @@ -1476,7 +1461,7 @@ static void GetVoices(const char *path) continue; // pass voice file name within the voices directory - voice_data = ReadVoiceFile(f_voice, fname+len_path_voices, ent->d_name); + voice_data = ReadVoiceFile(f_voice, fname+len_path_voices); fclose(f_voice); if (voice_data != NULL)