Cheers. I found and ran microphones.py and it pumps out the same sort of initial things I saw in the HA log (and I’m ignoring them!) At the end it pumps out a list and the two with microphones are
Device 2 (USB Camera-B4.09.24.1: Audio (hw:1,0))
{‘defaultHighInputLatency’: 0.096,
‘defaultHighOutputLatency’: -1.0,
‘defaultLowInputLatency’: 0.0239375,
‘defaultLowOutputLatency’: -1.0,
‘defaultSampleRate’: 16000.0,
‘hostApi’: 0,
‘index’: 2,
‘maxInputChannels’: 4,
‘maxOutputChannels’: 0,
‘name’: ‘USB Camera-B4.09.24.1: Audio (hw:1,0)’,
‘structVersion’: 2}
and
Device 4 (mic)
{‘defaultHighInputLatency’: 0.096,
‘defaultHighOutputLatency’: -1.0,
‘defaultLowInputLatency’: 0.0239375,
‘defaultLowOutputLatency’: -1.0,
‘defaultSampleRate’: 16000.0,
‘hostApi’: 0,
‘index’: 4,
‘maxInputChannels’: 128,
‘maxOutputChannels’: 0,
‘name’: ‘mic’,
‘structVersion’: 2}
The reason there arew two is because like many other people, I simply couldn’t get the USB microphone to work with arecord until I had set up an ~/.asoundrc file which has the following:
pcm.!default {
type asym
capture.pcm “mic”
playback.pcm “speaker”
}
pcm.mic {
type plug
slave {
pcm “plughw:1,0”
}
}
pcm.speaker {
type plug
slave {
pcm “hw:0,0”
}
}
I tried all sorts of other combination, but this is the only one that allowed aplay and arecord to ‘just work’. I’m happy to try removing this or other changes recommended.
I changed the ha configuration.yaml to have the following. I couldn’t seem to find any docs on stt_pocketsphix for HA, so I simply did the following. Feel free to correct me!
stt_pocketsphinx:
acoustic_model: /home/pi/ha/rhasspy-tools/pocketsphinx/cmusphinx-en-us-ptm-5.2
language_model: /home/pi/ha/rhasspy-assistant/data/examples.lm
dictionary: /home/pi/ha/rhasspy-assistant/data/mixed.dict
audio_device: 4
I tried both the value 2 and the value 4 restarting HA each time. No joy and to be fair I don’t actually know if either of these values have been picked up and are in use. Is there a way to tell?