0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Raspberry Pi+Juliusで音声認識(かなり昔に試してみた)

Last updated at Posted at 2024-04-28

はじめに

今回はかなり昔に試してみた初代Raspberry PiにJuliusを入れて音声認識を試したときの備忘録です(以前に試した当時の記事内容ですので、最新のRaspberry Piなどでは動作が違う可能性があります)。

Juliusとは

Juliusとは音声認識の開発・研究の為に京都大学の研究室が中心となって開発されたオープンソースの音声認識エンジンです。
以前は以下のリンクからjuliusをDLできていましたが、今はDLできなくなっています。

動かしてみました

2024/04現在ではDLできなくなっていますので、インストール方法などは割愛します。
当時試行錯誤したときのポイントと感想を記載します。

私は音声認識で使用するためにUSBで接続可能なマイクを購入しました。
DSC01151.JPG

まずUSBオーディオアダプタの優先度を確認します。(下記の場合、内蔵オーディオが優先されているので、USBオーディオを最優先にする設定を行います)

$ cat /proc/asound/modules
0 snd_bcm2835
1 snd_usb_audio

この場合、USBオーディオを優先的に利用したいので、優先度を上げるため、alsa-base.conf内のUSBオーディオのindexをindex=0にします。

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

index=-2をindex=0にします。

# options snd-usb-audio index=-2
options snd-usb-audio index=0

Raspberry Piを再起動します。これでUSBオーディオが優先的に使用できます。

次にカード番号を環境変数に指定します。

export ALSADEV=hw:0

以下のコマンドでJuliusを起動できます。

$ ~/raspberry/julius-4.3.1/julius/julius -C main.jconf -C am-gmm.jconf -demo

<<<please speak>>>と表示されているときに、マイクに向かって何か言葉を話すとjuliusが音声認識を開始します。
DSC01147.JPG

こんにちはおはよう今日はいい天気今日は暑いねと話してみましたが、そこまで精度は高くないようです。当時のバージョンなので、最新版などを使えば制度も上がっていそうですね。
あととても動作がもっさりしています。初代Raspberry Piでスペックが低いせいだと思いますが、マイクで話して数秒かかってやっと認識された文字が表示されます。

終わりに

新しいRaspberry Piを使って最新のJuliusを試してみたいと思います。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?