Table of contents
The ekho library is installed and used in the linux environment (imx6ull platform)
The ekho library is installed and used in the ubuntu environment
Modify the /etc/systemd/system/pulseaudio.service file and save it
Edit the /etc/pulse/client.conf file and save it
问题1:No PulseAudio daemon running, or not running as session daemon.
Problem 2: PulseAudio service failed to start
Question 3: -bash: pacmd: command not found
Question 4: Fail to init audio stream.Fail to init sound.
Background introduction
TTS is the abbreviation of Text To Speech, which is "from text to speech". It is a part of human-machine dialogue that allows machines to speak.
Ekho is a free, open source Chinese speech synthesis software. It currently supports Cantonese, Mandarin (Mandarin), Guangdong Taishan dialect, Zhao'an Hakka, Tibetan, Yayan (the lingua franca of ancient China) and Korean (under trial), and English is implemented indirectly through eSpeak or Festival. Ekho supports Linux, Windows and Android platforms.
download link:
The ekho library is installed and used in the linux environment (imx6ull platform)
Link:
https://pan.baidu.com/s/1FRVDmCo9PzjYmbq4vI4Keg?pwd=myqq
The ekho library is installed and used in the ubuntu environment
Use the platform
Processor model rk3399/rk3399pro/rk3588
tar xvf ekho-8.6.tar.xz
cd ekho-8.6
#这些必须安装的库、若不安装无法编译通过ekho库
apt-get install espeak-ng libsndfile1-dev libespeak-ng-dev pulseaudio libpulse-dev espeak-data -y
#这些是可选择安装的库,不影响ekho源码库安装
apt-get install espeak-ng libespeak-ng-dev libsndfile1-dev libpulse-dev libncurses5-dev libestools-dev festival-dev libvorbis-dev libmp3lame-dev libdotconf-dev texinfo pulseaudio libpulse-ocaml-dev -y
./configure
make
make install
Specify sound card
View available sound card devices
pacmd list-cards
Edit the corresponding information in the /etc/pulse/client.conf file and save it
default-sink = alsa_output.platform-es8316-sound.stereo-fallback
default-source = alsa_input.platform-es8316-sound.stereo-fallback
autospawn = no
The problem encountered in the actual use of ekho is that pulseaudio does not support the use of root users.
Modify the /etc/systemd/system/pulseaudio.service file and save it
[Unit]
Description=PulseAudio system server
[Service]
Type=notify
ExecStart=/usr/bin/pulseaudio --daemonize=no --system --realtime --log-target=journal
[Install]
WantedBy=multi-user.target
Enable pulseaudio service
sudo systemctl --system enable pulseaudio.service
sudo systemctl --system start pulseaudio.service
sudo systemctl --system status pulseaudio.service
Edit the /etc/pulse/client.conf file and save it
default-server = /var/run/pulse/native
Add the root user to the pulse user group
sudo adduser root pulse-access
After restarting the system, you can use the ekho service normally at root.
problem analysis
问题1:No PulseAudio daemon running, or not running as session daemon.
This error indicates that there is no PA service running.
Solution:
pulseaudio --kill && pulseaudio --start
Problem 2: PulseAudio service failed to start
Solution:
Log out all the values filled in /etc/pulse/client.conf and try again.
Question 3: -bash: pacmd: command not found
This error indicates that there is no PA service installed.
Solution:
sudo apt install pulseaudio
Question 4: Fail to init audio stream.Fail to init sound.
This error is that the PA service has not been added with root permissions.
Refer to adding the root user to the pulse user group.