Precise-collect not recording any sounds

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

Hi SGee,

I posted an issue for this problem on the forum over a week ago, first one I have done. Would expect to get a response by now even if it is a negative one?

Have you seen Andreas about yet?

Ernie

On my Pi4
Maybe you can use arecord -l or -L and find the capture device.
Then the /etc/asound.conf is kind of like
(you’ll have to sudo “vi”, or “emacs”)

pcm.!default
{
playback.pcm
{
type hw
card 2
device 0
}

playback.capture
{
	type hw
	card 0
	device 0
}

}

I was also not able to record.
I think this is what did it for me, but I’m not sure.
It’s basically combining mu usb mic from Best Buy into the default pcm.
I think you need to reboot.
Nate

Raspberry Pi4 doesn’t come with a microphone

No haven#t seen him around.

During your installation you should’ve came across this setup option, right? If so and followed this path, check if all steps under 4) got applied. And i would guess the firmware applied in this setup is rather old and may conflict with some newer software. Lastly, is there a way to make sure you are running v1? Just to rule out that you’re not running the wrong drivers.

I’m speculating that there are not much GoogleHATs around in this community, thus unsufficient feedback.

Hi SGee,

Thanks for your comments. Yes when I was installing Picroft I took the option 4 to install the Google AIY device. Using drivers the ‘arecord –l’ command seems to recognise the device, see output below.

arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: sndrpigooglevoi [snd_rpi_googlevoicehat_soundcar], device 0: Google voiceHAT SoundCard HiFi voicehat-codec-0 [Google voiceHAT SoundCard HiFi voicehat-codec-0]
Subdevices: 0/1
Subdevice #0: subdevice #0

Also it’s the only device with a mic & speaker that is attached to my raspberry pi and in normal working picroft recognises the wake word even from several metres away (3m to 4m)

On the AIY version question my understanding the V1 connects to standard raspberry pi 3 / 4 and V2 connectors to a raspberry pi zero. See attached photo of mine.

Thanks again for your help.

Ernie

Hi Nate,

Thanks for your feedback.

I don’t understand much about Linux audio systems, the output from the ‘arecord –L’ command looks complicated !

See the output from my pi below:

I had a search for an ‘asound.conf’ file and didn’t find one is that what you would expect after a standard install of picroft?

Do I have to create one in that case?

Thanks again for your help.

Ernie

arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: sndrpigooglevoi [snd_rpi_googlevoicehat_soundcar], device 0: Google voiceHAT SoundCard HiFi voicehat-codec-0 [Google voiceHAT SoundCard HiFi voicehat-codec-0]
Subdevices: 0/1
Subdevice #0: subdevice #0

arecord -L
null
Discard all samples (playback) or generate zero samples (capture)
jack
JACK Audio Connection Kit
pulse
PulseAudio Sound Server
default
Playback/recording through the PulseAudio sound server
sysdefault:CARD=sndrpigooglevoi
snd_rpi_googlevoicehat_soundcar, Google voiceHAT SoundCard HiFi voicehat-codec-0
Default Audio Device
front:CARD=sndrpigooglevoi
snd_rpi_googlevoicehat_soundcar, Google voiceHAT SoundCard HiFi voicehat-codec-0
Default Audio Device
rear:CARD=sndrpigooglevoi
snd_rpi_googlevoicehat_soundcar, Google voiceHAT SoundCard HiFi voicehat-codec-0
Default Audio Device
center_lfe:CARD=sndrpigooglevoi
snd_rpi_googlevoicehat_soundcar, Google voiceHAT SoundCard HiFi voicehat-codec-0
Default Audio Device
side:CARD=sndrpigooglevoi
snd_rpi_googlevoicehat_soundcar, Google voiceHAT SoundCard HiFi voicehat-codec-0
Default Audio Device
surround21:CARD=sndrpigooglevoi
snd_rpi_googlevoicehat_soundcar, Google voiceHAT SoundCard HiFi voicehat-codec-0
Default Audio Device
surround40:CARD=sndrpigooglevoi
snd_rpi_googlevoicehat_soundcar, Google voiceHAT SoundCard HiFi voicehat-codec-0
Default Audio Device
surround41:CARD=sndrpigooglevoi
snd_rpi_googlevoicehat_soundcar, Google voiceHAT SoundCard HiFi voicehat-codec-0
Default Audio Device
surround50:CARD=sndrpigooglevoi
snd_rpi_googlevoicehat_soundcar, Google voiceHAT SoundCard HiFi voicehat-codec-0
Default Audio Device
surround51:CARD=sndrpigooglevoi
snd_rpi_googlevoicehat_soundcar, Google voiceHAT SoundCard HiFi voicehat-codec-0
Default Audio Device
surround71:CARD=sndrpigooglevoi
snd_rpi_googlevoicehat_soundcar, Google voiceHAT SoundCard HiFi voicehat-codec-0
Default Audio Device
iec958:CARD=sndrpigooglevoi
snd_rpi_googlevoicehat_soundcar, Google voiceHAT SoundCard HiFi voicehat-codec-0
Default Audio Device
hdmi: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
modem:CARD=sndrpigooglevoi
snd_rpi_googlevoicehat_soundcar, Google voiceHAT SoundCard HiFi voicehat-codec-0
Default Audio Device
phoneline:CARD=sndrpigooglevoi
snd_rpi_googlevoicehat_soundcar, Google voiceHAT SoundCard HiFi voicehat-codec-0
Default Audio 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

since i think there is nothing big to loose,
try sudo apt-get install -y aiy-python-wheels
as this part was skipped due to an error back in 2018.

and as i can see asound.conf is configured this way (just to make this clear fore other readers)

options snd_rpi_googlevoicehat_soundcard index=0

pcm.softvol {
    type softvol
    slave.pcm dmix
    control {
        name Master
        card 0
    }
}

pcm.micboost {
    type route
    slave.pcm dsnoop
    ttable {
        0.0 30.0
        1.1 30.0
    }
}

pcm.!default {
    type asym
    playback.pcm "plug:softvol"
    capture.pcm "plug:micboost"
}

ctl.!default {
    type hw
    card 0
}

Hi SGee,

Tried the install as you suggested be get an error

sudo apt-get install -y aiy-python-wheels
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package aiy-python-wheels

I then tried echo “deb https://packages.cloud.google.com/apt aiyprojects-stable main” | sudo tee /etc/apt/sources.list.d/aiyprojects.list

followed by:

sudo apt-get update
sudo apt-get upgrade
reboot

but get the same error.

Ernie

Hi Ernie,
I didn’t realize you are using picroft . I am actually trying to get my own picroft off the ground. Also, I am not familiar with the googlevoiceHAT thing.

Pulseaudio is very confusing I am finding. Your capture device is a “source” and the output is a “sink.” There are modules that get loaded for pulse. You can learn what works by loading modules after picroft% pulseaudio -nC ,

I am about to try and do some precise-collecting myself with the new picroft. I was able to with my other install. Also, I was using the app “apulse” to prefix commands and it worked for my other install. It’s acually just alsa, but pretends it’s pulse with programs. It worked for me. :wink:

so you could try “% apulse precise-collect [command]”
-nate