git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@86 d46cf337-b52f-0410-862d-fd96e6ae7743master
| @@ -3,5 +3,8 @@ language de 7 | |||
| gender female | |||
| pitch 140 220 | |||
| mbrola de5 de5_phtrans | |||
| mbrola de5 de6_phtrans 22050 | |||
| // avoid glottal stops. de5 assumes [?] between pause and vowel | |||
| replace 00 _! _ | |||
| replace 00 _| _ | |||
| @@ -3,5 +3,5 @@ language en | |||
| gender female | |||
| pitch 140 220 | |||
| mbrola de5 de5_phtrans | |||
| mbrola de5 de5_phtrans 22050 | |||
| @@ -2,5 +2,5 @@ name german-mbrola-6 | |||
| language de 6 | |||
| gender male | |||
| mbrola de6 de5_phtrans | |||
| mbrola de6 de6_phtrans 22050 | |||
| @@ -3,5 +3,5 @@ language de 7 | |||
| gender female | |||
| pitch 140 220 | |||
| mbrola de7 de5_phtrans | |||
| mbrola de7 de6_phtrans 22050 | |||
| @@ -21,8 +21,8 @@ | |||
| 0 Y: NULL 0 2: | |||
| 0 OI NULL 0 OY | |||
| 0 3 NULL 0 6 | |||
| //0 _! NULL 0 ? | |||
| 0 _| NULL 0 ? | |||
| 0 _| VWL 0 ? | |||
| 0 _! VWL 0 ? | |||
| 0 pF NULL 0 pf | |||
| 0 r NULL 0 R | |||
| @@ -590,7 +590,7 @@ void Translator::MakePhonemeList(int post_pause, int start_sentence) | |||
| phlist[ix].length = 0; | |||
| phlist[ix].sourceix=0; | |||
| phlist[ix].synthflags = 0; | |||
| phlist[ix++].ph = phoneme_tab[phonPAUSE_VSHORT]; | |||
| phlist[ix++].ph = phoneme_tab[phonPAUSE_SHORT]; | |||
| n_phoneme_list = ix; | |||
| } // end of MakePhonemeList | |||
| @@ -110,8 +110,8 @@ int mbrola_control = 0; | |||
| espeak_ERROR LoadMbrolaTable(const char *mbrola_voice, const char *phtrans) | |||
| {//======================================================================== | |||
| espeak_ERROR LoadMbrolaTable(const char *mbrola_voice, const char *phtrans, int srate) | |||
| {//=================================================================================== | |||
| // Load a phoneme name translation table from espeak-data/mbrola | |||
| int size; | |||
| @@ -137,7 +137,7 @@ espeak_ERROR LoadMbrolaTable(const char *mbrola_voice, const char *phtrans) | |||
| setNoError_MBR(1); // don't stop on phoneme errors | |||
| #else | |||
| mb_handle = mbrolib_init( 22050 ); | |||
| mb_handle = mbrolib_init(srate); | |||
| mbrolib_parameter m_parameters; | |||
| if(mb_handle == NULL) | |||
| @@ -176,11 +176,14 @@ espeak_ERROR LoadMbrolaTable(const char *mbrola_voice, const char *phtrans) | |||
| #endif // USE_MBROLA_LIB | |||
| option_quiet = 1; | |||
| samplerate = 16000; | |||
| samplerate = srate; | |||
| if(srate == 22050) | |||
| SetParameter(espeakVOICETYPE,0,0); | |||
| else | |||
| SetParameter(espeakVOICETYPE,1,0); | |||
| strcpy(mbrola_name,mbrola_voice); | |||
| SetParameter(espeakVOICETYPE,1,0); | |||
| return(EE_OK); | |||
| } | |||
| } // end of LoadMbrolaTable | |||
| int GetMbrName(PHONEME_LIST *plist, PHONEME_TAB *ph, PHONEME_TAB *ph_prev, PHONEME_TAB *ph_next, int *name2, int *split, int *control) | |||
| @@ -35,7 +35,7 @@ | |||
| #include "translate.h" | |||
| #include "wave.h" | |||
| const char *version_string = "1.29.06 11.Sep.07"; | |||
| const char *version_string = "1.29.07 17.Sep.07"; | |||
| const int version_phdata = 0x012901; | |||
| int option_device_number = -1; | |||
| @@ -268,7 +268,7 @@ 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); | |||
| espeak_ERROR LoadMbrolaTable(const char *mbrola_voice, const char *phtrans, int srate); | |||
| void SetParameter(int parameter, int value, int relative); | |||
| void MbrolaTranslate(PHONEME_LIST *plist, int n_phonemes, FILE *f_mbrola); | |||
| int MbrolaSynth(char *p_mbrola); | |||
| @@ -386,7 +386,7 @@ SetToneAdjust(voice,tone_points); | |||
| n_replace_phonemes = 0; | |||
| option_tone1 = 0; | |||
| option_quiet = 0; | |||
| LoadMbrolaTable(NULL,NULL); | |||
| LoadMbrolaTable(NULL,NULL,0); | |||
| } | |||
| } // end of VoiceReset | |||
| @@ -817,11 +817,13 @@ voice_t *LoadVoice(const char *vname, int control) | |||
| case V_MBROLA: | |||
| { | |||
| int srate = 16000; | |||
| char name[40]; | |||
| char phtrans[40]; | |||
| phtrans[0] = 0; | |||
| sscanf(p,"%s %s",name,phtrans); | |||
| LoadMbrolaTable(name,phtrans); | |||
| sscanf(p,"%s %s %d",name,phtrans,&srate); | |||
| LoadMbrolaTable(name,phtrans,srate); | |||
| } | |||
| break; | |||