cst_voice *register___VOICENAME__(const char *voxdir)
{
    cst_voice *v = new_voice();

    v->name = "__NICKNAME__";

    /* Sets up language specific parameters in the __VOICENAME__. */
    usenglish_init(v);

    /* Things that weren't filled in already. */
    feat_set_string(v->features,"name","__VOICENAME__");

    /* Lexicon */
    cmu_lex_init();
    feat_set(v->features,"lexicon",lexicon_val(&cmu_lex));

    /* Waveform synthesis */
    feat_set(v->features,"wave_synth_func",uttfunc_val(&clunits_synth));
    feat_set(v->features,"clunit_db",clunit_db_val(&__VOICENAME___db));
    feat_set_int(v->features,"sample_rate",__VOICENAME___db.sts->sample_rate);
    feat_set_string(v->features,"join_type","simple_join");
    feat_set_string(v->features,"resynth_type","fixed");

    /* Unit selection */
    __VOICENAME___db.unit_name_func = __VOICENAME___unit_name;

    __VOICENAME___clunits = v;

    return __VOICENAME___clunits;
}
示例#2
0
cst_voice *register_cmu_us_kal16(const char *voxdir)
{
    cst_voice *v = new_voice();

    usenglish_init(v);

    /* Set up basic values for synthesizing with this voice */
    feat_set_string(v->features,"name","cmu_us_kal_diphone");

    /* Lexicon */
    cmu_lex_init();
    feat_set(v->features,"lexicon",lexicon_val(&cmu_lex));

    /* Intonation */
    feat_set_float(v->features,"int_f0_target_mean",105.0);
    feat_set_float(v->features,"int_f0_target_stddev",14.0);

    /* Post lexical rules */
    feat_set(v->features,"postlex_func",uttfunc_val(&cmu_us_kal_postlex));

    /* Duration */
    feat_set_float(v->features,"duration_stretch",1.1);

    /* Waveform synthesis: diphone_synth */
    feat_set(v->features,"wave_synth_func",uttfunc_val(&diphone_synth));
    feat_set(v->features,"diphone_db",diphone_db_val(&cmu_us_kal_db));
    feat_set_int(v->features,"sample_rate",cmu_us_kal_db.sts->sample_rate);
    feat_set_string(v->features,"resynth_type","fixed");
    feat_set_string(v->features,"join_type","modified_lpc");

    cmu_us_kal_diphone = v;

    return cmu_us_kal_diphone;
}
示例#3
0
int main(int argc, char **argv)
{
    cst_utterance *u;
    cst_relation *r;
    cst_item *item=0;
    int i;

    cmu_lex_init();

    u = new_utterance();
    r = utt_relation_create(u,"Word");

    bbb_relation_load(r,"ttt.txt");

    WordSylSeg(u);

    for (i=0,item=item_next(relation_head(utt_relation(u,"Segment"))); 
	 item; item=item_next(item),i++)
    {
	printf("Segment %s %s %s %s\n",
	       ffeature_string(item,"name"),
	       ffeature_string(item,"n.name"),
	       ffeature_string(item,"p.name"),
	       ffeature_string(item,"R:SylStructure.parent.name")
/*	       ffeature_string(item,"R:SylStructure.parent.R:Word.n.name"), */
/*	       item_feat_float(item,"duration")); */
	       );
    }

    delete_utterance(u);

    return 0;
}
示例#4
0
    cst_voice* register_cmu_us_no_wave( const char* voxdir )
    {
        cst_voice* v = new_voice();
        cst_lexicon* lex;

        v->name = "no_wave_voice";

        /* Set up basic values for synthesizing with this voice */
        usenglish_init( v );
        feat_set_string( v->features, "name", "cmu_us_no_wave" );

        /* Lexicon */
        lex = cmu_lex_init();
        feat_set( v->features, "lexicon", lexicon_val( lex ) );

        /* Intonation */
        feat_set_float( v->features, "int_f0_target_mean", 95.0 );
        feat_set_float( v->features, "int_f0_target_stddev", 11.0 );

        feat_set_float( v->features, "duration_stretch", 1.1 );

        /* Post lexical rules */
        feat_set( v->features, "postlex_func", uttfunc_val( lex->postlex ) );

        /* Waveform synthesis: diphone_synth */
        feat_set( v->features, "wave_synth_func", uttfunc_val( &no_wave_synth ) );

        cmu_us_no_wave = v;

        return cmu_us_no_wave;
    }
示例#5
0
cst_voice *register_cmu_us_kal(const char *voxdir)
{
    cst_voice *v;
    cst_lexicon *lex;

    if (cmu_us_kal_diphone)
        return cmu_us_kal_diphone;  /* Already registered */
    
    v  = new_voice();
    v->name = "kal";

    /* Set up basic values for synthesizing with this voice */
    usenglish_init(v);
#ifndef FLITE_PLUS_HTS_ENGINE
    flite_feat_set_string(v->features,"name","cmu_us_kal_diphone");
#endif /* !FLITE_PLUS_HTS_ENGINE */

    /* Lexicon */
    lex = cmu_lex_init();
    flite_feat_set(v->features,"lexicon",lexicon_val(lex));

#ifndef FLITE_PLUS_HTS_ENGINE
    /* Intonation */
    flite_feat_set_float(v->features,"int_f0_target_mean",95.0);
    flite_feat_set_float(v->features,"int_f0_target_stddev",11.0);

    flite_feat_set_float(v->features,"duration_stretch",1.1); 
#endif /* !FLITE_PLUS_HTS_ENGINE */

    /* Post lexical rules */
    flite_feat_set(v->features,"postlex_func",uttfunc_val(&cmu_us_kal_postlex));

#ifndef FLITE_PLUS_HTS_ENGINE
    /* Waveform synthesis: diphone_synth */
    flite_feat_set(v->features,"wave_synth_func",uttfunc_val(&diphone_synth));
    flite_feat_set(v->features,"diphone_db",diphone_db_val(&cmu_us_kal_db));
    flite_feat_set_int(v->features,"sample_rate",cmu_us_kal_db.sts->sample_rate);
    flite_feat_set_string(v->features,"resynth_type","fixed");
    flite_feat_set_string(v->features,"join_type","modified_lpc");
#endif /* !FLITE_PLUS_HTS_ENGINE */

    cmu_us_kal_diphone = v;

    return cmu_us_kal_diphone;
}
cst_voice *register_cmu_us_kal16(const char *voxdir)
{
    cst_voice *v;
    cst_lexicon *lex;

    if (cmu_us_kal16_diphone)
        return cmu_us_kal16_diphone;  /* Already registered */

    v = new_voice();
    v->name = "kal16";

    /* Sets up language specific parameters in the cmu_us_kal16. */
    usenglish_init(v);

    feat_set_string(v->features,"name","cmu_us_kal16");

    feat_set_float(v->features,"int_f0_target_mean",95.0);
    feat_set_float(v->features,"int_f0_target_stddev",11.0);

    feat_set_float(v->features,"duration_stretch",1.1); 

    /* Lexicon */
    lex = cmu_lex_init();
    feat_set(v->features,"lexicon",lexicon_val(lex));
    feat_set(v->features,"postlex_func",uttfunc_val(lex->postlex));

    /* Waveform synthesis */
    feat_set(v->features,"wave_synth_func",uttfunc_val(&diphone_synth));
    feat_set(v->features,"diphone_db",diphone_db_val(&cmu_us_kal16_db));
    feat_set_int(v->features,"sample_rate",cmu_us_kal16_db.sts->sample_rate);
/*    feat_set_string(v->features,"join_type","simple_join"); */
    feat_set_string(v->features,"join_type","modified_lpc");
    feat_set_string(v->features,"resynth_type","fixed");

    cmu_us_kal16_diphone = v;

    return cmu_us_kal16_diphone;
}
示例#7
0
cst_voice *register_cmu_us_rms(const char *voxdir)
{
    cst_voice *vox;
    cst_lexicon *lex;

    if (cmu_us_rms_cg)
        return cmu_us_rms_cg;  /* Already registered */

    vox = new_voice();
    vox->name = "rms";

    /* Sets up language specific parameters in the cmu_us_rms. */
    usenglish_init(vox);

    /* Things that weren't filled in already. */
    flite_feat_set_string(vox->features,"name","cmu_us_rms");

    /* Lexicon */
    lex = cmu_lex_init();
    flite_feat_set(vox->features,"lexicon",lexicon_val(lex));
    flite_feat_set(vox->features,"postlex_func",uttfunc_val(lex->postlex));

    /* No standard segment durations are needed as its done at the */
    /* HMM state level */
    flite_feat_set_string(vox->features,"no_segment_duration_model","1");
    flite_feat_set_string(vox->features,"no_f0_target_model","1");

    /* Waveform synthesis */
    flite_feat_set(vox->features,"wave_synth_func",uttfunc_val(&cg_synth));
    flite_feat_set(vox->features,"cg_db",cg_db_val(&cmu_us_rms_cg_db));
    flite_feat_set_int(vox->features,"sample_rate",cmu_us_rms_cg_db.sample_rate);

    cmu_us_rms_cg = vox;

    return cmu_us_rms_cg;
}