Use julius (speech recognition) on raspberryPi. ② Installation

Related article

Use raspberryPi and julus (speech recognition). ① Microphone Use julius (speech recognition) on raspberry Pi. ② Installation Use raspberry Pi and Julius (speech recognition). ③ Dictionary creation Use raspberry Pi and Julius (speech recognition). ④ L Chika Use raspberry Pi and Julius (speech recognition). ⑤ i2c character display

A lot of people use Julius to write articles, but I'm addicted to reading many books, so I'll leave it as a memorandum for the purpose of integration. It's amazing that everyone is doing well.

What to use

raspberryPi 3B+ USB microphone (Sanwa Supply USB microphone unidirectional direct insertion type MM-MCU02BK)

Install Julius install julius
$ wget https://github.com/julius-speech/julius/archive/v4.6.tar.gz

Unzip

$ tar zxvf julius-4.6.tar.gz

Compile and install (2nd line important, addicted)

$ cd julius-4.6
$ ./configure --with-mictype=alsa
$ make
$ sudo make install

This is the error when I got hooked when trying to move julius

Stat: adin_oss: device name = /dev/dsp (application default)
Error: adin_oss: failed to open /dev/dsp
failed to begin input stream

It's not an error to solve this problem. That is this.

$sudo modprobe snd-pcm-oss
modprobe: FATAL: Module snd-pcm-oss not found in directory /lib/modules/4.14.34-v7+

./configure is in the julius-4.6 directory, so if you move to it and then run it, you shouldn't be addicted to it. There was no need to downgrade. It would be great if you could download and unzip it from the beginning.

Check version

 $ julius -version

image.png If it looks like this, it's OK.

Install julius package Many people put the kits in a folder, so I think it's a good idea to name them appropriately and download and unzip them.
$ cd julius-4.6
$ mk julius-kit
$ cd julius-kit

Here is the hierarchical image. It is troublesome to make too many layers. There is no v in front of the number so don't get caught ...

~/julius
    |--julius-4.6
          |--julius-kit
                |--dictation-kit-4.5
                |--grammer-kit-4.3.1

Installation of dictation kit

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

grammer kit installation

$ wget https://osdn.net/dl/julius/grammer-kit-4.3.1zip
$ unzip grammer-kit-4.3.1.zip

Try to move The hierarchy of my folder is like this.
~/julius
    |--julius-4.6
          |--julius-kit
                |--dictation-kit-4.5
                |--grammer-kit-4.3.1

Rewrite the following executable code according to your folder hierarchy.

$ julius -C ~/julius/julius-4.6/julius-kit/dictation-kit-4.5/main.jconf -C ~/julius/julius-4.6/julius-kit/dictation-kit-4.5/am-gmm.jconf -nostrip

image.png After a very long letter, please speak, image.png Regardless of the accuracy, if there is any reaction, it will be successful. image.png Exit with ctrl + C.

I wrote it in the microphone edition, but snd-pcm-oss is not included in 3B +, so even if I type the following code

$ sudo modprobe snd-pcm-oss

I get an error, so please install the ALSA module and set it to use ALSA.

Julius installation complete Next, make your own dictionary. [Use raspberry Pi and Julius (speech recognition). ③ Dictionary creation](https://qiita.com/chiapis2/items/f0bd2ccb0f04d18d8a98)

reference Raspberry Pi Day 3: Recognize voice with Raspberry Pi + Julius Memorandum until julius can be operated with Raspberry pi3 B + (as of March 10, 2019) Run julius with the latest raspi kernel

Recommended Posts

Use julius (speech recognition) on raspberryPi. ② Installation
Use raspberryPi and julius (speech recognition). ① Microphone edition
Use raspberryPi and Julius (speech recognition). ④ L Chika
Use raspberryPi and Julius (speech recognition). ⑤ i2c character display
Use raspberry Pi and Julius (speech recognition). ③ Dictionary creation
Easy installation of OpenCV on RaspberryPi 3+
Use pyvenv on Windows
numba installation on mac
Speech recognition in Python
Use Ansible on Windows
Installation on CentOS8 VirtualBox
Use QuTiP on Windows
Use pip on Windows