VoiceCAP
- 2019-03-28 first edition
- 2021-11-22 bullseye
- 2023-10-24 bookworm
- 2024-03-07 Raspberry Pi 5
VoiceCAP
- Voice Control Board for Raspberry Pi Zero/ZeroW
Features
- Infrared controller with your voice
- Stand-alone use, no need internet
- You need to customize recognized words.
Note
- No warranty
- Hobby use only
- Not included stereo microphone
- The voice recognition rate is NOT 100%.
- Not all IR format supported.
Information
- as 2024-03-07
- Raspberry Pi 2B/3B/3B+/4B/5B/Zero/ZeroW/Zero2W
- NOOBS 3.0(kernel 4.14.xA4.18.xA4.19.x)
- bullseye (kernel 5.10.x)
- bullseye (kernel 6.1.x)
- bookworm (kernel 6.1.x)
- Julius 4.6
- no Raspberry Pi 3A+
- no NOOBS Lite
How to work
- "Julius" is voice recognition engine.
- "Julius server" can recognize your voice.
- "Julius client(remocon.py)" dispatches each shell by order of your voice command.
- Each shell does something to do. Sending infrared ray to control your TV.
- http://julius.osdn.jp/
Requirement
- Raspberry Pi Zero/W/WH set with 16GB microSD card
- Microphone with 3.5mm stereo 3 terminals. AT9902(audio-technica)
Do not use a microphone with 3.5mm 4 terminals
Before installing VoiceCAP software
How to install VoiceCAP software. It takes 90 minutes
- wget http://einstlab.web.fc2.com/RaspberryPi/VoiceCAP.tar
- tar xvf VoiceCAP.tar
- cd VoiceCAP
- ./install.sh
- sudo reboot
Do not apt-get update and apt-get upgrade after installing VoiceCAP. PCM1808 driver may not work.
How to control IR
NEC and AHEA format only.
To receive IR
- cd ~/VoiceCAP/Remocon
- sudo ./getIR2 -n
- AEHA 48 2 32 176 0 76 252
To send IR
- cd ~/VoiceCAP/Remocon
- sudo ./setIR2 AEHA 48 2 32 176 0 76 252
Preset voice command list
voice command | shell |
"max" | name.sh |
"turn on the tv" | onTV.sh |
"turn off the tv" | offTV.sh |
"turn on the aircon" | onAIRCON.sh |
"turn off the aircon" | offAIRCON.sh |
"turn on the light" | onLED1.sh |
"turn off the light" | offLED1.sh |
"channel up" | chUP.sh |
"channel down" | chDOWN.sh |
"channel one" | ch1.sh |
"channel two" | ch2.sh |
"channel four" | ch4.sh |
"channel five" | ch5.sh |
"channel six" | ch6.sh |
"channel seven" | ch7.sh |
"channel eight" | ch8.sh |
You need to customize each shell to adapt your appliance.
Before start
Voice command list consists of vocabulary and grammar.
Set command vocablary as pronunciation
- edit ~/VoiceCAP/en/command.voca
- You can find a pronunciation.
- grep hello ~/julius-master/ENVR-v5.4.Gmm.Bin/ENVR-v5.3.dct
Set command grammar
- edit ~/VoiceCAP/en/command.grammar
Build command
- cd ~/VoiceCAP/en
- mkdfa.pl command
Edit julius client(remocon.py)
- edit ~/VoiceCAP/en/remocon.py
Make or edit each shell
- edit ~/VoiceCAP/Remocon/onTV.sh
To start and stop Julius
To start Julius
- cd ~/VoiceCAP/en
- ./start.sh
To stop Julius
- cd ~/VoiceCAP/en
- ./stop.sh
see also /etc/rc.local
Julius will start automatically in boot.
How to use
To wake up
- "Max" is the name as wake word.
- You will see LED flash twice.
- Voice command will be valid within 10 sec. So time out is 10 sec.
To command
- Then say voice command within 10 sec.
- Try one more if not work.
Julius client judges the score of recognized confidence, if more than 90%.
Rejecting the word if less than 90%.
Additional information
To reduce CPU load
- Use CLI
- normal CPU load is 35%
To shutdown OS
- Push the switch and hold more than 5 sec
How to see IR
- You can see IR with digital camera.
- Watch IR LED.
- $ cd ~/VoiceCAP/Remocon
- $ sudo ./setIR2 AEHA 48 2 32 176 0 61 141
To check PCM1808 driver
- $ cd ~/VoiceCAP/en
- $ ./stop.sh
- $ arecord -l
- **** List of CAPTURE Hardware Devices ****
- card 0: sndrpipcm1808ad [snd_rpi_pcm1808_adc], device 0: PCM1808 ADC HiFi pcm1808-dai-0 []
- Subdevices: 0/1
- Subdevice #0: subdevice #0
To check recording your voice via microphone
- $ cd ~/VoiceCAP/en
- $ ./stop.sh
- $ arecord -vD hw:0,0 -c 2 -d 10 -r 48000 -f S16_LE test.wav
- play the test.wav
- If you have any problem,
- check microphone terminal contact
- check solder jamper, SJ1=open, SJ2=open, SJ3=short
To check Julius
- $ cd ~/VoiceCAP/en
- $ ./stop.sh
- Julius server and Julius client on each terminal
- $ ./server.sh
- $ ./remocon.py
©2018-2024 All rights reserved by Y.Onodera.