Raspberry pi 4とJulius
お題:音声コマンドでスクリプトを動かしたいだけなのにGoogleHomeもAmazonAlexaも大げさな仕掛けを要求するのに辟易したので簡潔にできないかの模索
スクリプトを実行するラズパイで音声認識できればいいじゃんと検索
ここを参考に https://qiita.com/mininobu/items/f181b762955932cec6d6
とりあえず音声を認識するのは確認できた
パラメータで調整できるかもだが精度がいまいちっぽい
動作確認の方法じゃ自動実行には使えないので方法の確立が必要
これなら手順は多くても考える要素の少ないHomeやAlexaがマシ
次策
Speech-to-Text API
Home Assistant: https://www.home-assistant.io/installation/raspberrypi
willow: https://github.com/toverainc/willow
実行環境
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.2 LTS
Release: 22.04
Codename: jammy
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.2 LTS
Release: 22.04
Codename: jammy
参照元と異なる要点のみ
現在(2023年5月17日)においてディクテーションキットは4.5に対応している
Juliusのソースはここから取得
$ wget https://github.com/julius-speech/julius/archive/v4.5.tar.gz
説明通りが一番と深く考えず作業したけど
$ git clone https://github.com/julius-speech/julius -b v4.5 --depth 1
で良いんじゃないかな?コンパイルは最新環境を認識しないのでオプションを追加する
$ ./configure --with-mictype=alsa --build=aarch64-unknown-linux-gnu
ディクテーションキットはここから取得
git-lfsを使わないと正しく取得できないのでインストールする$ sudo apt install git-lfs
$ git clone https://github.com/julius-speech/dictation-kit.git
$ git clone https://github.com/julius-speech/dictation-kit.git
--
コメント
コメントを投稿