LoginSignup
5
11

More than 5 years have passed since last update.

Juliusに音声ファイルを解析させる

Posted at

はじめに

Raspberry Pi+Juliusで音声を認識するでは、Juliusを用いて、USBマイクから取り込んだ音声を直接解析しました。Juliusでは、オプション-input -rawfileを使用すると、音声ファイルを解析することができます。

実現方法

Raspberry Pi+Juliusで音声を認識するの「動作確認」のコマンドを下記のように変更します。

変更後のJuliusコマンド
~/julius/julius-4.4.2.1/julius/julius -C ~/julius/julius-kit/dictation-kit-v4.4/main.jconf -C ~/julius/julius-kit/dictation-kit-v4.4/am-gmm.jconf -nostrip -input rawfile

コマンドが実行され、下記のコンソールが表示されます。

### read waveform input
enter filename->

enter filename->に続いて、音声ファイル名を入力します。
音声ファイルが認識されると、次のように音声認識の結果が表示されます。
下記の例では「おはよう」という音声のファイルを解析させています。

------
### read waveform input
enter filename->ohayo.wav
Stat: adin_file: input speechfile: ohayo.wav
STAT: 17554 samples (1.10 sec.)
STAT: ### speech analysis (waveform -> MFCC)
### Recognition: 1st pass (LR beam)
............................................................................................................pass1_best:  おはよう 。
pass1_best_wordseq: <s> おはよう+感動詞 </s>
pass1_best_phonemeseq: silB | o h a y o: | silE
pass1_best_score: -2833.220215
### Recognition: 2nd pass (RL heuristic best-first)
STAT: 00 _default: 20145 generated, 2524 pushed, 298 nodes popped in 108
sentence1:  おはよう 。
wseq1: <s> おはよう+感動詞 </s>
phseq1: silB | o h a y o: | silE
cmscore1: 0.711 0.219 1.000
score1: -2865.781006

おわりに

無事に解析できました。音声ファイルを解析する場合、Juliusのデフォルトでは音声ファイルは「モノラル」「サンプリングレートが16000」である必要があります。解析対象の音声ファイルがこれら条件に合わない場合は、下記のサイトを参考にjuliusコマンドのオプションで変更するか、音声ファイルの形式を変更しましょう。

公式ドキュメント 第3章 音声データ入力
Julius 音声認識ソフト part2 録音音声認識実行

5
11
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
5
11