環境
Open JTalkとは無料の音声合成ソフトである。テキスト読み上げソフトともいうが。以下のサイトで試すことができる。
http://open-jtalk.sp.nitech.ac.jp/open-jtalk.sp.nitech.ac.jp
インストール
パッケージがあるのでそのままインストール
apt install open-jtalk open-jtalk-mecab-naist-jdic hts-voice-nitech-jp-atr503-m001
確認
# open_jtalk -h
The Japanese TTS System "Open JTalk"
Version 1.07 (http://open-jtalk.sourceforge.net/)
Copyright (C) 2008-2013 Nagoya Institute of Technology
All rights reserved.
The HMM-Based Speech Synthesis Engine "hts_engine API"
Version 1.08 (http://hts-engine.sourceforge.net/)
Copyright (C) 2001-2013 Nagoya Institute of Technology
2001-2008 Tokyo Institute of Technology
All rights reserved.
Yet Another Part-of-Speech and Morphological Analyzer "Mecab"
Version 0.994 (http://mecab.sourceforge.net/)
Copyright (C) 2001-2008 Taku Kudo
2004-2008 Nippon Telegraph and Telephone Corporation
All rights reserved.
NAIST Japanese Dictionary
Version 0.6.1-20090630 (http://naist-jdic.sourceforge.jp/)
Copyright (C) 2009 Nara Institute of Science and Technology
All rights reserved.
open_jtalk - The Japanese TTS system "Open JTalk"
usage:
open_jtalk [ options ] [ infile ]
options: [ def][ min-- max]
-x dir : dictionary directory [ N/A]
-m htsvoice : HTS voice files [ N/A]
-ow s : filename of output wav audio (generated speech) [ N/A]
-ot s : filename of output trace information [ N/A]
-s i : sampling frequency [ auto][ 1-- ]
-p i : frame period (point) [ auto][ 1-- ]
-a f : all-pass constant [ auto][ 0.0-- 1.0]
-b f : postfiltering coefficient [ 0.0][ 0.0-- 1.0]
-r f : speech speed rate [ 1.0][ 0.0-- ]
-fm f : additional half-tone [ 0.0][ -- ]
-u f : voiced/unvoiced threshold [ 0.5][ 0.0-- 1.0]
-jm f : weight of GV for spectrum [ 1.0][ 0.0-- ]
-jf f : weight of GV for log F0 [ 1.0][ 0.0-- ]
-z i : audio buffer size (if i==0, turn off) [ 0][ 0-- ]
infile:
text file [stdin]
このままでもできるが、デフォルトの音声モデルがちょっとアレなので有名なMMDAgentから出ているmeiモデルをダウンロードする。これも無料
ダウンロード & 解凍
wget http://sourceforge.net/projects/mmdagent/files/MMDAgent_Example/MMDAgent_Example-1.7/MMDAgent_Example-1.7.zip
unzip MMDAgent_Example-1.7.zip
でコピー
cp -r MMDAgent_Example-1.7/Voice/mei/ /usr/share/hts-voice/
実行
echo 'こんにちは' | open_jtalk -x /var/lib/mecab/dic/open-jtalk/naist-jdic -m /usr/share/hts-voice/mei/mei_normal.htsvoice -r 1.0 -ow test.wav
参考リンク
Raspberry Piをしゃべらせてコドモ達を起こせ | 柄スタイル