まほろば

オープンソース音声合成エンジン「Open JTalk 1.05」




.

オープンソース音声合成エンジン「Open JTalk 1.05」

投稿者:マーチン  2011年12月29日 【記事印刷】

 「Open JTalk」は、名古屋工業大学の徳田・李研究室で開発されているオープンソースの日本語音声合成エンジンで、2011/12/25 にバージョン 1.05がリリースされました。
 「takayanの雑記帳:Open JTalk の VC++2008 用ソリューションファイルを作ってみた。」の記事を頼りに、Windows上でコンパイルをし、オプション設定をいじってみました。

※2012/05/06 追記
 takayan さんが、もっと簡単なインストール方法を紹介してくださっています。こちらを参照ください。
 takayanの雑記帳:Open JTalk を Windows でビルドするバッチファイル

●音声サンプル

【サンプル文章】

市民の皆さんが安心して暮らせる「災害に強いまちづくり」を推進するため、次のとおり総合防災訓練を実施します。


 男性:m001 (16kHz) 再生  男性:m001 (48kHz) 再生
 女性:mei (16kHz)再生  女性:mei (48kHz)再生

●更新情報

・open_jtalk (ファイル NEWS より)
Version 1.05:
* modify pronunciation rule after a decimal point.
* modify accent type detection.
* add new moras and new words.
* fix some bugs.
Version 1.04:
* fix some bugs.
* modify dictionary.

・hts_engine_API (ファイル NEWS より)
Version 1.06:
* modify state duration calculation algorithm.
* change many function from void to boolean.
* change source format.
* bug fixes.
Version 1.05:
* support PortAudio for audio output.

●手順

(1)「Visual C++ 2010 Express」をインストールする。
(2)「7-zip」をインストールする。
(3)「http://open-jtalk.sourceforge.net/」から、以下のファイルをダウンロードする。
open_jtalk-1.05.tar.gz
open_jtalk_dic_shift_jis-1.05.tar.gz
hts_voice_nitech_jp_atr503_m001-1.04.tar.gz
(4)「http://hts-engine.sourceforge.net/」から、以下のファイルをダウンロードする。
hts_engine_API-1.06.tar.gz
(5)takayanの雑記帳 から、以下のファイルをダウンロードする。
open_jtalk_v9_sln-1.01.zip
(6)これを解凍し、「expand.bat」 内の”set ver=1.00” などを編集してから、実行する。

(7)「open_jtalk.sln」をVC++で開き、mecabのソースの dictionary_rewriter.cpp 、viterbi.cpp の2つのファイルの先頭部分に
#include <iterator>
を追加する。(VC++2010の場合)
(8)コンパイルを実行する。
(9)「test.bat」を開き、オプションに”-s 48000 -z 6000 -p 240 -a 0.55 ^” を追加する。
(10)「test.bat」を実行すると、音声読み上げがされる。

●音声の追加

(1)「http://sourceforge.jp/projects/sfnet_mmdagent/」から以下のファイルをダウンロードする。
MMDAgent_Example-1.1.zip
(2)「Voice\mei_normal」フォルダを、open_jtalk.exe のあるフォルダに移動する。

●オプション例

◆m001_16k_105.bat [ダウンロード]


◆m001_48k_105.bat [ダウンロード]


◆mei_16k_105.bat [ダウンロード]


◆mei_48k_105.bat [ダウンロード]


●オプション詳細

オプション説明省略時範囲
-s intsampling frequency16000[ 1--48000]
-z intaudio buffer size 1600[ 0--48000]
-p intframe period (point)話速 80[ 1--]
-a floatall-pass constant声質 0.42[ 0.0--1.0]
-b floatpostfiltering coefficient 0.0[-0.8--0.8]
-g intgamma = -1 / i
(if i=0 then gamma=0)
0[ 0-- ]
-u floatvoiced/unvoiced threshold 0.5[ 0.0--1.0]
-jm floatweight of GV for spectrum音量 1.0[ 0.0--2.0]
-jf floatweight of GV for Log F0抑揚 1.0[ 0.0--2.0]
-jl floatweight of GV for low-pass filter 1.0[ 0.0--2.0]
-lregard input as log gain and output linear one (LSP)
-x dirdictionary directory
-td treedecision trees file for state duration
-tm treedecision trees file for spectrum
-tf treedecision trees file for Log F0
-tl treedecision trees file for low-pass filter
-em treedecision tree file for GV of spectrum
-ef treedecision tree file for GV of Log F0
-el treedecision tree file for GV of low-pass filter
-k treeuse GV switch
-md pdfmodel file for state duration
-mm pdfmodel file for spectrum
-mf pdfmodel file for Log F0
-ml pdfmodel file for low-pass filter
-cm pdffilename of GV for spectrum
-cf pdffilename of GV for Log F0
-cl pdffilename of GV for low-pass filter
-dm winwindow files for calculation delta of spectrum
-df winwindow files for calculation delta of Log F0
-dl winwindow files for calculation delta of low-pass filter
-ow stringfilename of output wav audio (generated speech)
-ot stringfilename of output trace information

●不明な点

(1) -g オプションで、1以上の整数を指定すると、読み上げしません。バグなのだろうか、コンパイル時の warning を無視しているのが悪いのだろうか?
(2)読み上げ文の先頭に全角スペースがあると、"WARNING: JPCommonLabel_push_word() in jpcommon_label.c: First mora should not be short pause." というメッセージを吐く。


◆関連記事

◆関連サイト

.
△ 先頭へ


△ 先頭へ