git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@86 d46cf337-b52f-0410-862d-fd96e6ae7743master
| gender female | gender female | ||||
| pitch 140 220 | 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 _| _ |
| gender female | gender female | ||||
| pitch 140 220 | pitch 140 220 | ||||
| mbrola de5 de5_phtrans | |||||
| mbrola de5 de5_phtrans 22050 | |||||
| language de 6 | language de 6 | ||||
| gender male | gender male | ||||
| mbrola de6 de5_phtrans | |||||
| mbrola de6 de6_phtrans 22050 | |||||
| gender female | gender female | ||||
| pitch 140 220 | pitch 140 220 | ||||
| mbrola de7 de5_phtrans | |||||
| mbrola de7 de6_phtrans 22050 | |||||
| 0 Y: NULL 0 2: | 0 Y: NULL 0 2: | ||||
| 0 OI NULL 0 OY | 0 OI NULL 0 OY | ||||
| 0 3 NULL 0 6 | 0 3 NULL 0 6 | ||||
| //0 _! NULL 0 ? | |||||
| 0 _| NULL 0 ? | |||||
| 0 _| VWL 0 ? | |||||
| 0 _! VWL 0 ? | |||||
| 0 pF NULL 0 pf | 0 pF NULL 0 pf | ||||
| 0 r NULL 0 R | 0 r NULL 0 R | ||||
| phlist[ix].length = 0; | phlist[ix].length = 0; | ||||
| phlist[ix].sourceix=0; | phlist[ix].sourceix=0; | ||||
| phlist[ix].synthflags = 0; | phlist[ix].synthflags = 0; | ||||
| phlist[ix++].ph = phoneme_tab[phonPAUSE_VSHORT]; | |||||
| phlist[ix++].ph = phoneme_tab[phonPAUSE_SHORT]; | |||||
| n_phoneme_list = ix; | n_phoneme_list = ix; | ||||
| } // end of MakePhonemeList | } // end of MakePhonemeList |
| 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 | // Load a phoneme name translation table from espeak-data/mbrola | ||||
| int size; | int size; | ||||
| setNoError_MBR(1); // don't stop on phoneme errors | setNoError_MBR(1); // don't stop on phoneme errors | ||||
| #else | #else | ||||
| mb_handle = mbrolib_init( 22050 ); | |||||
| mb_handle = mbrolib_init(srate); | |||||
| mbrolib_parameter m_parameters; | mbrolib_parameter m_parameters; | ||||
| if(mb_handle == NULL) | if(mb_handle == NULL) | ||||
| #endif // USE_MBROLA_LIB | #endif // USE_MBROLA_LIB | ||||
| option_quiet = 1; | option_quiet = 1; | ||||
| samplerate = 16000; | |||||
| samplerate = srate; | |||||
| if(srate == 22050) | |||||
| SetParameter(espeakVOICETYPE,0,0); | |||||
| else | |||||
| SetParameter(espeakVOICETYPE,1,0); | |||||
| strcpy(mbrola_name,mbrola_voice); | strcpy(mbrola_name,mbrola_voice); | ||||
| SetParameter(espeakVOICETYPE,1,0); | |||||
| return(EE_OK); | 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) | int GetMbrName(PHONEME_LIST *plist, PHONEME_TAB *ph, PHONEME_TAB *ph_prev, PHONEME_TAB *ph_next, int *name2, int *split, int *control) |
| #include "translate.h" | #include "translate.h" | ||||
| #include "wave.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; | const int version_phdata = 0x012901; | ||||
| int option_device_number = -1; | int option_device_number = -1; |
| espeak_ERROR SetVoiceByName(const char *name); | espeak_ERROR SetVoiceByName(const char *name); | ||||
| espeak_ERROR SetVoiceByProperties(espeak_VOICE *voice_selector); | 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 SetParameter(int parameter, int value, int relative); | ||||
| void MbrolaTranslate(PHONEME_LIST *plist, int n_phonemes, FILE *f_mbrola); | void MbrolaTranslate(PHONEME_LIST *plist, int n_phonemes, FILE *f_mbrola); | ||||
| int MbrolaSynth(char *p_mbrola); | int MbrolaSynth(char *p_mbrola); |
| n_replace_phonemes = 0; | n_replace_phonemes = 0; | ||||
| option_tone1 = 0; | option_tone1 = 0; | ||||
| option_quiet = 0; | option_quiet = 0; | ||||
| LoadMbrolaTable(NULL,NULL); | |||||
| LoadMbrolaTable(NULL,NULL,0); | |||||
| } | } | ||||
| } // end of VoiceReset | } // end of VoiceReset | ||||
| case V_MBROLA: | case V_MBROLA: | ||||
| { | { | ||||
| int srate = 16000; | |||||
| char name[40]; | char name[40]; | ||||
| char phtrans[40]; | char phtrans[40]; | ||||
| phtrans[0] = 0; | 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; | break; | ||||