一、本地tts方案
1. Festival Text to Speech
Flite是一个小型、快速的TTS系统,是著名的语音合成系统festival的C版本,可用于嵌入式系统。不支持中文。
sudo apt-get install festival
echo "Just what do you think you're doing, Dave?" | festival --tts
读出主机名
hostname -I | festival --tts
2. 方法2:Espeak Text to Speech
支持中文
sudo apt-get install espeak
espeak -ven+f3 -k5 -s150 "I've just picked up a fault in the AE35 unit"
espeak -vzh "编程"
3.使用 Ekho(余音)
网址: https://www.eguidedog.net/doc/doc_install_ekho.php
安装方法 :
下载后,执行:
sudo apt-get install libtool libsndfile1-dev libpulse-dev libncurses5-dev libmp3lame-dev libespeak-dev
tar xJvf ekho-xxx.tar.xz
cd ekho-xxx
./configure
make
sudo make install
ekho "hello 123"
如果提示 pa_simple_new() failed: Connection refused
则执行
sudo apt-get install pulseaudio
gconftool-2 -t string --set /system/gstreamer/0.10/default/audiosink pulsesink
4. google text to speech
二、 在线方案
百度语音合成
http://yuyin.baidu.com/docs/tts/135
使用参考:
https://blog.csdn.net/mmmmmmmmlp/article/details/73505825