LoginSignup
0
0

More than 3 years have passed since last update.

ラズパイ4でjulius 4.6をセットアップ

Posted at

参考
Raspberry PiとJuliusで特定の単語を認識させる | パソコン工房 NEXMAG

試した環境

ReSpeaker Mic Array v2.0
USB-Audioクラス対応のマイクなら他のものでも動くと思う

Raspberry Pi 4 Model B 2GB版
イメージは2020-08-20-raspios-buster-armhfに2020/12/10までのアップデートを適用した状態

julius本体のセットアップ

julius用のディレクトリをホームディレクトリに作成

cd ~
mkdir julius
cd julius

julius Githubリリースページ
https://github.com/julius-speech/julius/releases
今回は4.6を使用した。

wget https://github.com/julius-speech/julius/archive/v4.6.zip
unzip v4.6.zip
cd julius-4.6

julius githubリポジトリREADME.md 1.Build latest Juliusより必要なパッケージと、/dev/dspを追加するためのパッケージを導入

sudo apt install build-essential zlib1g-dev libsdl2-dev libasound2-dev
sudo apt install alsa-utils sox libsox-fmt-all

ビルド&インストール

./configure --with-mictype=alsa
make -j4
sudo make install

juliusディクテーションキットのセットアップ

julius用のディレクトリに戻ってキット用ディレクトリを作成

cd ~/julius
mkdir julius-kit
cd julius-kit

juliusホームページよりディクテーションキットの配布URLを取得
https://julius.osdn.jp/index.php?q=dictation-kit.html
今回は4.5を使用

wget https://osdn.net/dl/julius/dictation-kit-4.5.zip
unzip dictation-kit-4.5.zip

マイクのセットアップ

このままではラズパイ内蔵オーディオデバイスの優先順位が高いため、USBマイクが使われない。
そのため優先順位を上げるよう設定する。

sudo nano /etc/modprobe.d/alsa-base.conf

以下をコピペして保存

alsa-base.conf
options snd slots=snd_usb_audio,snd_bcm2835
options snd_usb_audio index=0
options snd_bcm2835 index=1

julius実行時のオーディオデバイスを環境変数として設定

sudo nano ~/.profile
.profile
export ALSADEV="plughw:0,0"

julius用に/dev/dspを追加

sudo sh -c "echo snd-pcm >> /etc/modules"

ディクテーションキットの動作確認

cd ~/julius/julius-kit/dicration-kit-4.5/
julius -C main.jconf -C am-gmm.jconf -demo

たすけて!もなふわすい~とる~む!と喋ってみた結果...
image.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0