Mycroft Community Forum

Precise-collect not recording any sounds

Hi All,

I have built a Picroft on a Raspberry Pi 4 using a Google AIY voice hat as the mic and speaker. This works very well with the default ‘Wake Word’ but I decided to try and create my own custom ‘Wake Word’, first I tried using PocketSphinx defining the Phonemes for my ‘Wake Word’ and this worked reasonably well. I now decided to try and using the Precise engine and train my “Wake Word”. I started with a fresh install of Picroft (Picroft_Buster-Keaton_2020-01-10) applying all the latest updates. I installed Mycroft Precise using the source install method, downloading the source using ‘git clone https://github.com/mycroftai/mycroft-precise’ and then running setup.sh in the Mycroft-precise directory. This worked fine. I then set ‘source .venv/bin/activate’ and used ‘precise-collect’ to record some sample utterances of my ‘Wake Word’. The records seem to work but when I checked the wav files they all seem to just be flat lines as if the mic was mute. The default ‘Wake Word’ still works so the mic configuration would seem to be correct.

Can anyone suggest why I may not be getting any successful recordings?

Ernie

if you try “arecord -d 3 test.wav” (say something, of course) and then play that back, does it work?

Hi baconator,

Thanks for your reply. I have tried what you suggested and it does work but the play back is at a very low amplitude. I loaded the wav file into Audacity and the wave form is only just noticeable. If I use ‘precise-listen /home/pi/.mycroft/precise/hey-mycroft.pb’ that seems to work as I would expect.

Ernie

1 Like

That seems to suggest you might need to check the levels in alsamixer.

Hi,

I tried alsamixer and pressed F6 and selected the google sound card I believer, but it says ‘This sound device does not have any controls’.

Ernie

The “default” is Master. Just hit F4 as you enter alsamixer.

Hi SGee,

Thanks for you reply.

When I enter alsamixer is shows a single column marked ‘Master’ with a value of 99. If I hit F4 the program drops out back to the command prompt.

Ernie

Do you SSH in? The F-keys act weirdly in this case ( the 99 is the output level btw)

Hi SGee,

Thanks for your reply.

I didn’t realise there was a problem with SSH. I connect a HDMI monitor and keyboard so I could run alsamixer without a problem.

I didn’t know what a lot of this means but I think it looks OK. Top left corner shows Card: PulseAudio, when I press F4 / F5 I get the levels for ‘Master’ & ‘’, both set to 100.

F2 gives a lot of system information

Version:	K5.4.51-V71+
Card:		snd-rpi-googlevoicehat-soundcard
Devices:	0:[ 0]: control
		16: [0- 0]: digital audio playback
		24: [0- 0]: digital audio capture
		33:	: timer

Timer	G0:	system timer: 10000.000us (10000000 ticks)
		P0-0-0:	PCM: Playback 0-0-0 SLAVE
		P0-0-1:	PCM: Capture 0-0-1 SLAVE

PCM		00-00 GooglevoiceHAT SoundCard HiFi Voicehat-codec:0  ……….

Does this help at all? As I say the default Mycroft voice capture works as it recognises the default ‘Wake-Word’ so the sound card is working. So it seems strange that the ‘precise-collect’ command fails to record any sound since I assume it’s using the same method.

Thanks again for any help you can give.

Ernie

Maybe this is something for you - if using AIYv2. And if using AIYv2 there is another question if the setup process covered all things needed. Since i think its taylored to AIYv1. But that is all guesswork. @andlo might be able to add something substantial.

If using v1 there is a similar skill in the marketplace.

Another member described a somewhat similar problem, yet there was no answer. Maybe PM him?

about precise/mycroft: Do you use the stable or the dev version of mycroft-core? Since the resulting precise model (mycroft-precise default branch; precise v0.3) wouldn’t be compatible with mycroft-core stable (precise v0.2). It’s not relevant to the problem (i guess) but it’s good to know further down the line.

Hi SGee,

Thanks again for your reply.

As you should see I took your advice and contacted Randal to see if he made any progress with his problem. I also checked what version of the Google AIY I was using, I was not familiar with the version 2, but mine is a hat that attaches directly on a Raspberry Pi 4 so I think this a version 1.

I noticed from the post you directed me to by chiisaa, that someone called Andreas Lorensen wrote the code for AIY v1, would this be the code used in the current release of picroft? If so do you think it may be worth contacting Andreas himself to see if he could help?

Thanks again Ernie

You should file issues on the github repos as first step.

This is why i called @andlo (klick :wink: ) to have a look.

Hi SGee,

Sorry if I misunderstood that you. So you have already been in contact with Andreas. Before I file an issue on the github repos as suggested by baconator should I wait to see what Andreas says or should I do it now?

Ernie

Haven’t seen him around lately, so go ahead and file an issue. Always beneficial to ring the bell on more than one place :wink: You might also consider engaging with the team/community on https://chat.mycroft.ai