金子邦彦研究室インストールUbuntu, WSL2Open JTalk のインストールと使用法 (Ubuntu 上)

Open JTalk のインストールと使用法 (Ubuntu 上)

Open JTalk は,日本語テキストからの音声合成システム

hts_engine

  1. hts_engine の Web ページ

    http://sourceforge.net/projects/hts-engine/?source=navbar

  2. hts_engine のインストール

    ◆ bash プログラム (Ubuntu で動作確認済み)

    cd /tmp
    curl -O http://sourceforge.net/projects/hts-engine/files/hts_engine%20API/hts_engine_API-1.08/hts_engine_API-1.08.tar.gz
    curl -O http://sourceforge.net/projects/hts-engine/files/Flite%2Bhts_engine/Flite%2Bhts_engine-1.05/flite%2Bhts_engine-1.05.tar.gz
    curl -O http://sourceforge.net/projects/hts-engine/files/HTS%20voice/hts_voice_cmu_us_arctic_slt-1.05/hts_voice_cmu_us_arctic_slt-1.05.tar.gz
    #
    cd /tmp
    tar -xvzof hts_engine_API-1.08.tar.gz
    cd hts_engine_API-1.08
    ./configure
    make
    sudo make install
    #
    cd /tmp
    tar -xvzof flite+hts_engine-1.05.tar.gz
    cd flite+hts_engine-1.05
    ./configure
    make
    sudo make install
    #
    cd /usr/local/share
    sudo tar -xvzof /tmp/hts_voice_cmu_us_arctic_slt-1.05.tar.gz
    
  3. 使ってみる
    1. 前準備 /tmp/input.txt に英語テキストファイルを作成
    2. 音声ファイルの作成
      flite_hts_engine -m /usr/local/share/hts_voice_cmu_us_arctic_slt-1.05/cmu_us_arctic_slt.htsvoice  -o /tmp/output.wav /tmp/input.txt
      
    3. 再生してみる
      mplayer /tmp/output.wav 
      

open_jtalk

  1. open_jtalk の Web ページ http://sourceforge.net/projects/open-jtalk
  2. インストール
    cd /tmp
    curl -O http://sourceforge.net/projects/open-jtalk/files/Open%20JTalk/open_jtalk-1.07/open_jtalk-1.07.tar.gz
    curl -O http://sourceforge.net/projects/open-jtalk/files/HTS%20voice/hts_voice_nitech_jp_atr503_m001-1.05/hts_voice_nitech_jp_atr503_m001-1.05.tar.gz
    curl -O http://sourceforge.net/projects/open-jtalk/files/Dictionary/open_jtalk_dic-1.07/open_jtalk_dic_utf_8-1.07.tar.gz
    curl -O http://sourceforge.net/projects/mmdagent/files/MMDAgent/MMDAgent-1.4/MMDAgent-1.4.zip
    #
    cd /tmp
    tar -xvzof open_jtalk-1.07.tar.gz
    cd open_jtalk-1.07
    ./configure --with-charset=utf-8
    make
    sudo make install
    #
    cd /usr/local/share
    sudo tar -xvzof /tmp/open_jtalk_dic_utf_8-1.07.tar.gz
    #
    cd /usr/local/share
    sudo tar -xvzof /tmp/hts_voice_nitech_jp_atr503_m001-1.05.tar.gz
    
  3. 使ってみる
    1. 前準備 /tmp/input2.txt にテキストファイルを作成
    2. 音声ファイルの作成
      open_jtalk -m /usr/local/share/hts_voice_nitech_jp_atr503_m001-1.05/nitech_jp_atr503_m001.htsvoice -ow /tmp/output2.wav -x /usr/local/share/open_jtalk_dic_utf_8-1.07 /tmp/input2.txt
      
    3. 再生してみる
      mplayer /tmp/output.wav 
      
  1. インストール

    Ubuntu でのインストール手順例

    sudo apt-add-repository ppa:kakurasan/unstable
    sudo apt -y update
    sudo apt-get upgrade
    sudo apt-get --reinstall install hts-voice-nitech-jp-atr503-m001
    sudo apt-get --reinstall install open-jtalk
    sudo apt-get --reinstall install open-jtalk-mecab-naist-jdic 
    
  2. 文書の準備

    /tmp/1.doc のような名前で保存

  3. シェルスクリプトの作成

    /tmp/hoge.sh のような名前で保存

    #!/bin/sh
    cd /usr/share/hts-voice/nitech-jp-atr503-m001
    # cd /usr/share/hts-voice/mei_normal
    open_jtalk \
    -m /usr/share/hts-voice/nitech-jp-atr503-m001/nitech_jp_atr503_m001.htsvoice \
    -x /var/lib/mecab/dic/open-jtalk/naist-jdic \
    -td tree-dur.inf \
    -tm tree-mgc.inf \
    -tf tree-lf0.inf \
    -tl tree-lpf.inf \
    -md dur.pdf \
    -mm mgc.pdf \
    -mf lf0.pdf \
    -ml lpf.pdf \
    -dm mgc.win1 \
    -dm mgc.win2 \
    -dm mgc.win3 \
    -df lf0.win1 \
    -df lf0.win2 \
    -df lf0.win3 \
    -dl lpf.win1 \
    -ow /tmp/hoge.wav \
    -a 0.07 \
    -u 0.0 \
    -em tree-gv-mgc.inf \
    -ef tree-gv-lf0.inf \
    -cm gv-mgc.pdf \
    -cf gv-lf0.pdf \
    -jm 0.5 \
    -jf 1.2 \
    -k gv-switch.inf \
    -jl 1.0 
    
  4. 実行
    nkf -w /tmp/1.doc | bash /tmp/hoge.sh