GitHub location: janvda/my-google-voice-kit/rhasspy
This service is based on the rhasspy docker image.
It has been extended to support pulseaudio and provides also the utilities: pavucontrol, htop, ps, nano.
/profilesAll rhasspy configuration settings are saved under /profiles folder.
Rhasspy comes with a powerfull web UI (URL: http:<hostname>:12101) allowing to configure the different rhasspy services.
The steps to configure a new snowboy wake word that is generated by snowboy-seasalt service
Assume the new snowboy wake word has the name stemija_macbook_20231026.pmdl
/profiles/en create a sub directory snowboystemija_macbook_20231026.pmdlto this sub directory# command to copy a local file into a container
# FYI with command `docker ps` you can find the container id of the rhasspy service.
docker cp stemija_macbook_20231026.pmdl cdebc96fa0fb:/profiles/en/snowboy/
stemija_macbook_20231026.pmdl as Model and set the sensitivy (e.g. set it 0.5)Your rhasspy profile should look like:
"wake": {
"snowboy": {
"model": "stemija_macbook_20231026.pmdl",
"sensitivity": "0.5"
},
"system": "snowboy"
}
Volume can be set at 2 levels:
With following command you can check the sink audio volume:
pactl list sinks
With following command you set the audio volume of sink 8 to 100%
pactl -- set-sink-volume 8 100%
You can use following speaker-test command to test this:
speaker-test -t wav -c 6
Use the controller ui for this.
Alternatively you can also do it using following pactl commands:
# to get the volume of the sink-inputs
pactl list sink-inputs
# to set the volume of a sink-input
pactl set-sink-input-volume #N VOLUME
Use arecord with Device pulse- so select PulseAudio Sound Server (pulse) in drop down list.
root@b0e9b39a2c20:/# pactl info
Server String: /tmp/pulse_socket
Library Protocol Version: 32
Server Protocol Version: 32
Is Local: yes
Client Index: 33
Tile Size: 65496
User Name: pulseaudio
Host Name: pi3three
Server Name: pulseaudio
Server Version: 12.2
Default Sample Specification: s16le 2ch 48000Hz
Default Channel Map: front-left,front-right
Default Sink: alsa_output.default
Default Source: alsa_input.default
Cookie: cddb:2233
root@b0e9b39a2c20:/#
root@dfdfbb06d5a9:/tmp# speaker-test -t wav -c 6
speaker-test 1.1.8
Playback device is default
Stream parameters are 48000Hz, S16_LE, 6 channels
WAV file(s)
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 32 to 349525
Period size range from 10 to 116509
Using max buffer size 349524
Periods = 4
was set period_size = 87381
was set buffer_size = 349524
0 - Front Left
4 - Center
1 - Front Right
3 - Rear Right
2 - Rear Left
5 - LFE
Time per period = 9.009266
root@b0e9b39a2c20:/# arecord -L
default
Playback/recording through the PulseAudio sound server
null
Discard all samples (playback) or generate zero samples (capture)
jack
JACK Audio Connection Kit
pulse
PulseAudio Sound Server
sysdefault:CARD=sndrpigooglevoi
snd_rpi_googlevoicehat_soundcar, Google voiceHAT SoundCard HiFi voicehat-codec-0
Default Audio Device
dmix:CARD=sndrpigooglevoi,DEV=0
snd_rpi_googlevoicehat_soundcar, Google voiceHAT SoundCard HiFi voicehat-codec-0
Direct sample mixing device
dsnoop:CARD=sndrpigooglevoi,DEV=0
snd_rpi_googlevoicehat_soundcar, Google voiceHAT SoundCard HiFi voicehat-codec-0
Direct sample snooping device
hw:CARD=sndrpigooglevoi,DEV=0
snd_rpi_googlevoicehat_soundcar, Google voiceHAT SoundCard HiFi voicehat-codec-0
Direct hardware device without any conversions
plughw:CARD=sndrpigooglevoi,DEV=0
snd_rpi_googlevoicehat_soundcar, Google voiceHAT SoundCard HiFi voicehat-codec-0
Hardware device with all software conversions
usbstream:CARD=sndrpigooglevoi
snd_rpi_googlevoicehat_soundcar
USB Stream Output
root@b0e9b39a2c20:/# arecord -f S16_LE -d 5 -r 16000 /tmp/test-mic.wav
Recording WAVE '/tmp/test-mic.wav' : Signed 16 bit Little Endian, Rate 16000 Hz, Mono
root@b0e9b39a2c20:/# aplay /tmp/test-mic.wav
Playing WAVE '/tmp/test-mic.wav' : Signed 16 bit Little Endian, Rate 16000 Hz, Mono
root@b0e9b39a2c20:/#
Content type
Image
Digest
sha256:786197a17…
Size
626.1 MB
Last updated
over 2 years ago
docker pull janvda/rhasspy