树莓派添加中文语音合成功能

怎样给树莓派添加中文语音合成功能

首先,在树莓派里下载中文语音合成软件EkhoLinux版。

然后,根据安装说明进行安装。关键的一句是makeCXXFLAGS=-DNO_SSE

再给树莓派插上耳机线。这只是暂时测试,应该寻找音量更大的方案。

把树莓派音量调到最大(这个时候不要把耳机带上,否则音量会过大)

 

amixer -D pulse sset Master 100%

 

运行测试命令:

 

./ekho "hello 123" 

 

这个时候应该可以听到耳机发出微弱的声音。 

 

来自 <http://cto.eguidedog.net/node/167>

 

How to InstallEkho (for Linux and Raspberry Pi)

(updated on Jun 25, 2015)

If you are using Ubuntu Linux, youcan get the deb package and issue following command:

$ sudo dpkg -i ekho_xxx.deb

To build from source, followingcommands will work if you are lucky enough.

$ sudo apt-get install libsndfile1-dev libpulse-devlibncurses5-dev libestools2.1-dev festival-dev libmp3lame-dev
$ tar xJvf ekho-xxx.tar.xz
$ cd ekho-xxx
$ ./configure --enable-festival
$ make
$ sudo make install
$ ekho "hello 123"

If you are building it on RaspberryPi, you need to change `make` to `make CXXFLAGS=-DNO_SSE`.

Please refer to file INSTALL formore information.

If you want to make Ekho work withSpeech-dispatcher, which is the API for screen reader like Orca, you should`configure --enable-speechd`.

For usage of ekho, please try:

$ ekho -h

 

来自 <http://www.eguidedog.net/doc/doc_install_ekho.php>

 

 

 其实到这里并没有结束!

安装之后还需要安装pulseaudio(当然提前需要我们配置好源)

sudo apt-get install pulseaudiopulseaudio-module-zeroconf alsa-utils avahi-daemon

但是还是会报错!

你将运行的进程的用户加入pulse-access组就可以了,我是用piroot身份登录的。

 

所以执行:

sudo usermod -a -Gpulse-access pi

sudo usermod -a -Gpulse-access root

 

听到是杂音,但是使用

#ekho王小二到了 -o demo.mp3 指令,然后播放mp3格式的文件是没有问题的!


然而对于直接使用#ekho“123” 没有声音的问题还是不清楚问题出在什么地方

  • 2
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值