2011-06-03 13 views
5

我正在使用OpenEars FliteController類將文本轉換爲語音。如何使用fliteController類中的withVoice:參數減慢聲音?

我使用的方法:

[self.fliteController說:@「我想我的應用程序,以大聲的說出來的短語。」 withVoice:@「cmu_us_awb8k」];如下所示:

的參數withVoice後可以進入選項

cmu_us_awb8k 
cmu_us_rms8k 
cmu_us_slt8k 
cmu_time_awb 
cmu_us_awb 
cmu_us_kal 
cmu_us_kal16 
cmu_us_rms 
cmu_us_slt 

我嘗試了所有的這些參數與withVoice:

然而,我的客戶是不愉快的聲音。他告訴我這些都很快。所以,我需要一種使用withVoice:參數來減緩演講的方法。我該怎麼做?是否還有其他語音可用?

回答

1

我相信這是OpenEars。不知道如何在OpenEars中進行配置。但你可以看看this demo,它可以根據你的要求進行定製。就像你可以爲音色設置Pitch/Variance/Speed一樣。從鏈接克隆存儲庫。

如果你可以遷移到這一點,將是您的解決方案。如果您對此演示有任何疑問,我可以幫助我爲TextToSpeech準備1個演示,其中包含Play/Pause/Stop選項。

希望它有幫助。

4

速度/俯仰/方差移現在是爲0.911版本OpenEars的特徵。

[:,右發送此消息之前

duration_stretch // Duration of speech 
target_mean // Average pitch of speech 
target_stddev // Variance 

例如:

更改聲音的速度,音調和多變性使用FliteController以下屬性:可以按如下方式使用它self.fliteController說:@「我希望我的應用程序大聲說出一句話。」 withVoice:@ 「cmu_us_awb8k」];

你可以做以下設置self.fliteController:

self.fliteController.duration_stretch = 1.5; // Slow down the speed a bit 
self.fliteController.target_mean = 1.2; // Raise the pitch 
self.fliteController.target_stddev = 1.5; // Increase the variance 

1.0是默認的,0.0是最低值,2.0是一個可能的最大可用值(雖然你可以去高於2.0,它可能不會成爲有用的價值)。

的0.5甲duration_stretch將是兩倍快1.0,2.0的duration_stretch將是1.0速度的一半。 target_mean或target_stddev爲2.0會使平均音高頻率加倍或方差增加一倍,而0.5會將它們減半。

您沒有設置或者覆蓋這些設置 - 如果你不使用它們,它們將被設置爲默認值的聲音。如果你想覆蓋他們之後將其返回到默認設置,只需將它們全部設置爲1.0:

self.fliteController.duration_stretch = 1.0; // Reset the speed 
self.fliteController.target_mean = 1.0; // Reset the pitch 
self.fliteController.target_stddev = 1.0; // Reset the variance