Archives for: January 2010, 14
ruby脚本判断os
January 14th, 2010ruby定义了一个预定义的常量 RUBY_PLATFORM 可以用来实现平台判断.
在ubuntu 9.10下是 i386-linux
在windows下是i386-mswin32
festivaltts4r分析
January 14th, 2010festivaltts4r是ruby的一个gem,用来实现tts.分析它的代码,发现这是一个非常低效的实现,就是直接执行festival --tts的命令来发声.
festival本身提供festival-client模式和api模式,采用这两种应该可以提供更高效的实现.
Using TTS in Ubuntu
January 14th, 2010Ubuntu uses festival as its TTS solution.
sudo aptitude install festival
But it has problem to work with PluseAudio and Bluetooth. For overcoming this problem, I found following wiki. Please notice following section "Configuration for ESD or PulseAudio"
- Open the configuration file by typing gksudo gedit /etc/festival.scm or gedit ~/.festivalrc in a terminal.
- Add the following lines at the end of the file:
(Parameter.set 'Audio_Method 'esdaudio) - Save the file.
Better voice
For using better voice, please following this HOWTO: Make festival TTS use better voices (MBROLA / CMU / HTS)