开发者

can we change the pitch in flite engine for iphone

开发者 https://www.devze.com 2023-01-16 07:04 出处:网络
i am using flite engine to generate soun开发者_如何转开发d n iphone everything is fine now is it possible to change the pitch of sound lets say i want to put my sound... can i do that??Yes,

i am using flite engine to generate soun开发者_如何转开发d n iphone everything is fine now is it possible to change the pitch of sound lets say i want to put my sound ... can i do that??


Yes,

In the FliteTTS.m you can see the below method defined. This can be called anywhere FliteTTS is included in the same way you already call speakText. I have no clue what sensible values for these are though..

-(void)setPitch:(float)pitch variance:(float)variance speed:(float)speed
{
feat_set_float(voice->features,"int_f0_target_mean", pitch);
feat_set_float(voice->features,"int_f0_target_stddev",variance);
feat_set_float(voice->features,"duration_stretch",speed); 
}

Google searchinf for the int_f0 variable gives a few useful examples

http://webcache.googleusercontent.com/search?q=cache:Ko7Ef9t8gUwJ:www.speech.cs.cmu.edu/flite/doc/flite_8.html+int_f0_target_mean&cd=1&hl=en&ct=clnk&gl=uk&lr=lang_en&source=www.google.co.uk

For example in our `cmu_us_sls_diphone' voice (a US English female diphone voice). We had to change the default parameters from

feat_set_float(v->features,"int_f0_target_mean",110.0);
feat_set_float(v->features,"int_f0_target_stddev",15.0);

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

to

feat_set_float(v->features,"int_f0_target_mean",167.0);
feat_set_float(v->features,"int_f0_target_stddev",25.0);

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

I imagine putting these values directly into the FliteTTS will allow you to explore.

0

精彩评论

暂无评论...
验证码 换一张
取 消