mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-05 14:47:26 +00:00
[1.31.14]
SSML: <voice>, if a language is specified, forget previously selected voice name. Voice selection, convert language name to lower-case. espeak-data/mbrola_ph files, allow use by both little and big-endian processors. git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@149 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
+11
-1
@@ -33,6 +33,7 @@
|
||||
#include "translate.h"
|
||||
#include "voice.h"
|
||||
|
||||
extern int Read4Bytes(FILE *f);
|
||||
|
||||
#ifdef USE_MBROLA_LIB
|
||||
|
||||
@@ -115,6 +116,8 @@ espeak_ERROR LoadMbrolaTable(const char *mbrola_voice, const char *phtrans, int
|
||||
// Load a phoneme name translation table from espeak-data/mbrola
|
||||
|
||||
int size;
|
||||
int ix;
|
||||
int *pw;
|
||||
FILE *f_in;
|
||||
char path[sizeof(path_home)+15];
|
||||
|
||||
@@ -160,10 +163,17 @@ espeak_ERROR LoadMbrolaTable(const char *mbrola_voice, const char *phtrans, int
|
||||
fclose(f_in);
|
||||
return(EE_INTERNAL_ERROR);
|
||||
}
|
||||
fread(&mbrola_control,4,1,f_in);
|
||||
|
||||
mbrola_control = Read4Bytes(f_in);
|
||||
pw = (int *)mbrola_tab;
|
||||
for(ix=4; ix<size; ix+=4)
|
||||
{
|
||||
*pw++ = Read4Bytes(f_in);
|
||||
}
|
||||
fread(mbrola_tab,size,1,f_in);
|
||||
fclose(f_in);
|
||||
|
||||
|
||||
#ifdef USE_MBROLA_LIB
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
setVolumeRatio_MBR((float)(mbrola_control & 0xff) /16.0);
|
||||
|
||||
Reference in New Issue
Block a user