CURRENT ISSUE
Contests
Feature Article
|
|
Issue #207 October 2007
Embedded Speech
Speech Synthesis for Small Applications
by Nicusor Birsan & Ionut Tarsa
Start | Embedding Speech | Speech Synthesis Techniques | Open-Source Project | System Building Blocks | Sound From Luminary Micro | First Big Porting Problem | Synthesizer | Translator | The LM3S811 Speaks | More Speech Applications | Sources & PDF
Listing 3—This task is called from the main routine to synthesize more phonemes or translate the remaining text.
void Task_Speak(void){
static int gen_resume = 0;
int trans=0;
gen_resume = MCU_Generate(MCU_phoneme_list,&MCU_n_phoneme_list,gen_resume);
if(0 == gen_resume){ //if there is nothing in the phoneme list
if(p_cgen != NULL){ //is there more text?
trans = MCUTranslate(NULL); //if so, translate the rest
MCUCalcPitches(1); //analyse prosody
MCUCalcLengths();
gen_resume = MCU_Generate(MCU_phoneme_list,&MCU_n_phoneme_list,0);
if( (trans ==0) && (0 == gen_resume) )
p_cgen = NULL; //finished to synthesize
}
}
}
|