-Installed on OpenJtalk's Raspberry Pi • The actual sound output "Hello"
・ Raspberry Pi3 model B ・ OS: Raspbian
・ Can be operated with Raspberry Pi ssh connection or can be operated with display ・ Japanese input is possible
I installed it by referring to this article.
First, do the following
sudo apt-get update #Update
sudo apt-get install open-jtalk #Installation
Then also install the recommended packages.
sudo apt-get install open-jtalk-mecab-naist-jdic hts-voice-nitech-jp-atr503-m00
Now you can output audio! OpenJtalk is in the order of creating a Japanese audio file and then playing it. First, create an audio file below.
echo "Hello" | open_jtalk -x /var/lib/mecab/dic/open-jtalk/naist-jdic -m /usr/share/hts-voice/nitech-jp-atr503-m001/nitech_jp_atr503_m001.htsvoice -ow ~/ojtalk.wav
You should now have an audio file called ojtalk.wav in the same directory. Let's play next.
aplay ~/ojtalk.wav
"Hello" Was output?
-x dictionary to use -m Which voice to use (male or female, etc.) -ow specify output file
By the way, if it is a 3.5mm analog output, noise may be added and it may not sound good. (I was ...) In that case, try connecting to the display with HDMI and outputting from the display. The noise, probably due to the circuit, disappears.
This time, I created an audio file and then output it, but if you feel a little uncomfortable that the audio file is saved every time you speak, you can do it without creating an audio file below.
echo "Hello" | open_jtalk -x /var/lib/mecab/dic/open-jtalk/naist-jdic -m /usr/share/hts-voice/nitech-jp-atr503-m001/nitech_jp_atr503_m001.htsvoice -ow /dev/stdout | aplay --quiet
Use the MMDAgent package.
First, execute the following to download
wget https://sourceforge.net/projects/mmdagent/files/MMDAgent_Example/MMDAgent_Example-1.7/MMDAgent_Example-1.7.zip
Then unzip the zip
unzip ./MMDAgent_Example-1.7.zip
And mei-chan's voice folder in the folder Copy it under the directory / usr / share / hts-voice /.
sudo cp -r ./MMDAgent_Example-1.7/Voice/mei/ /usr/share/hts-voice/
If you change the acoustic model to this, it will be a female voice. Optional -m acoustic model It is the part corresponding to.
echo "Hello"|open_jtalk -x /var/lib/mecab/dic/open-jtalk/naist-jdic -m /usr/share/hts-voice/mei/mei_normal.htsvoice -ow ~/ojtalk.wav
aplay ~/ojtalk.wav
I think this is a female voice.
This time, we have delivered the installation of OpenJtalk and its test. Next, I would like to create a program that talks about the information obtained by API and what was web scraped! Then!
Recommended Posts