void setText( char *rel, char *val ) { strcpy( slot_Speak_stat, "PROCESSING" ); if( prop_Speak_stat == AutoOutput ) inqSpeakStat(); if( strcmp(rel,"=")==0 ) { refresh(); text_analysis( val ); /* テキスト解析 */ if( prop_Text_text == AutoOutput ) inqTextText(); if( prop_Speak_text == AutoOutput ) inqSpeakText(); parameter_generation(); /* パラメータ生成(F0,MLSAフィルタ係数,継続長) */ do_synthesis(); /* 合成波形の生成 */ #ifdef PRINTDATA TmpMsg( "Synthesis Done.\n" ); #endif /* } else if( strcmp(rel,"<")==0 ) { } else if( strcmp(rel,"<<")==0 ) { */ } else { unknown_com(); } strcpy( slot_Speak_stat, "READY" ); if( prop_Speak_stat == AutoOutput ) inqSpeakStat(); }
/* 韻律情報の読み込み */ void setProsFile( char *rel, char *filename ) { int error; strcpy( slot_Speak_stat, "PROCESSING" ); if( prop_Speak_stat == AutoOutput ) inqSpeakStat(); if( strcmp(rel,"=")==0 ) { strcpy( slot_Pros_file, filename ); if( prop_ProsFile == AutoOutput ) inqProsFile(); refresh(); /* prosBuf に各種パラメータを読み込む */ error = read_pros_file( filename ); if( ! error ) { text_analysis( input_text ); /* テキスト解析 */ if( prop_Text_text == AutoOutput ) inqTextText(); if( prop_Speak_text == AutoOutput ) inqSpeakText(); /* parameter_generation(); */ init_parameter(); /* パラメータ生成の準備 */ make_duration(); /* 素のテキストから状態継続長を生成 */ modify_duration(); /* 継続長の修正(タグ処理) */ /* 音素継続長が修正されている場合は、状態継続長を 計算しなおす */ update_duration(); /* ここで、prosBuf のデータで音素時間長を設定する。 */ make_cumul_time(); /* 音素時間長の累積を計算 */ modify_voice(); /* 話者のスイッチ、αパラメータの変更(タグ処理) */ if( prop_Text_pho == AutoOutput ) inqTextPho(); if( prop_Speak_pho == AutoOutput ) inqSpeakPho(); if( prop_Text_dur == AutoOutput ) inqTextDur(); if( prop_Speak_dur == AutoOutput ) inqSpeakDur(); make_parameter(); /* パラメータ生成を実行 */ modify_f0(); /* F0の修正(タグ処理) */ modify_power(); /* パワーの修正(タグ処理) */ /* parameter_generation(); ここまで */ /* 生成されたパラメータに対してF0とc0を更新 */ error = set_f0_and_power( filename ); if( ! error ) { do_synthesis(); /* 合成波形の生成 */ } } } else { unknown_com(); } strcpy( slot_Speak_stat, "READY" ); if( prop_Speak_stat == AutoOutput ) inqSpeakStat(); }
void delete_event (GtkWidget *widget, gpointer data) { set_params();//retrieve parameters from entry fields do_synthesis(); //free(param_list); //gtk_widget_destroy (GTK_WIDGET (data)); }
/* 茶筌の結果をファイルから読み込み */ void setParsedText( char *rel, char *filename ) { if( strcmp(rel,"=")==0 ) { refresh(); text_analysis_file( filename ); /* テキスト解析 */ parameter_generation(); /* パラメータ生成(F0,MLSAフィルタ係数,継続長) */ do_synthesis(); /* 合成波形の生成 */ #ifdef PRINTDATA TmpMsg( "Synthesis Done.\n" ); #endif } else { unknown_com(); } }