Like some of you ever know, I had problems with getting custom wakeword with snowboy working fine. I mean, good detection, and no false positive!
I finally get it running fine, even better than snips one actually ( ) after doing home-work and writing a few tools to achieve this.
I get some time to clean all this and share all tips and tools I used for that, so here it is :
Let me know if the doc is understandle, if downloading and running scripts goes fine, etc.
Also, english isnât my mother language, so if some part need some rewrite, donât be shy I wonât feel ashamed (well, maybe, but I will do correction )
Well done.
The 3 .wav are well created but I have these lines below (I donât know if its important or not)
Fyi I use a Jabra and I have created the $HOME/.asoundrc to use it.
recordingâŠ
finished recording
Expression âalsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, &dir )â failed in âsrc/hostapi/alsa/pa_linux_alsa.câ, line: 924
Expression âalsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, &dir )â failed in âsrc/hostapi/alsa/pa_linux_alsa.câ, line: 924
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition âcards.bcm2835_alsa.pcm.front.0:CARD=0â
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5047:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM front
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition âcards.bcm2835_alsa.pcm.surround51.0:CARD=0â
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5047:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition âcards.bcm2835_alsa.pcm.surround51.0:CARD=0â
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5047:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition âcards.bcm2835_alsa.pcm.surround40.0:CARD=0â
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5047:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM surround40
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition âcards.bcm2835_alsa.pcm.surround51.0:CARD=0â
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5047:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM surround41
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition âcards.bcm2835_alsa.pcm.surround51.0:CARD=0â
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5047:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM surround50
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition âcards.bcm2835_alsa.pcm.surround51.0:CARD=0â
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5047:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM surround51
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition âcards.bcm2835_alsa.pcm.surround71.0:CARD=0â
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5047:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM surround71
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition âcards.bcm2835_alsa.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2â
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5047:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM iec958
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition âcards.bcm2835_alsa.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2â
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5047:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition âcards.bcm2835_alsa.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2â
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5047:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
Expression âalsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, &dir )â failed in âsrc/hostapi/alsa/pa_linux_alsa.câ, line: 924
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
At next step (python3 snowboyTrain.py --token ⊠) I have this error :
Building model nestor with options M : 3
Traceback (most recent call last):
File âsnowboyTrain.pyâ, line 67, in
generateModel(args)
File âsnowboyTrain.pyâ, line 18, in generateModel
wavSample1 = get_wave(args.wakeword+"/0.wav").decode()
File âsnowboyTrain.pyâ, line 13, in get_wave
file = infile.read()
File â/usr/lib/python3.7/codecs.pyâ, line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: âutf-8â codec canât decode byte 0x80 in position 24: invalid start byte
If your wav file are good when you play them, all is good then. Never saw this the correction I did was because it canât load your Alda lib to prevent alsa warnings to show but these are not warning but error. Seems your alsa config are problematic.
But if you have three good wav files, cut the leading and trailing noise in audacity and get your pmdl to test.
Building model nestor with options fr | M | 3
Request failed.
{âvoice_samplesâ:[{ârecorder_age_groupâ:["âFalseâ is not a valid choice."]},{ârecorder_age_groupâ:["âFalseâ is not a valid choice."]},{ârecorder_age_groupâ:["âFalseâ is not a valid choice."]}]}
Iâm looking for a way to automatically cut leading and trailing noise to avoid having to do it manually in audacity. If there is some pyaudio guru there