Does this HAT work “out of the box” with Picovoice Cheetah (specifically the pvrecorder part of it)?
I have had to configure the HAT somewhat unconventionally to work with an Audio Amp Shim (as per this thread - Small Speaker & Dual Mic hats at the same time? - #4 by alphanumeric) and although it records successfully with a command like
arecord -D hw:adau7002,1 -c2 -r48000 -fS32_LE -twav -d5 -R10000 -Vstereo test.wav
… pvrecorder always “Failed to read from device.”
arecord -l gives:
**** List of CAPTURE Hardware Devices ****
card 0: adau7002 [adau7002], device 1: bcm2835-i2s-adau7002-hifi adau7002-hifi-1 [bcm2835-i2s-adau7002-hifi adau7002-hifi-1]
Subdevice #0: subdevice #0
and cheetah_demo_mic --show_audio_devices gives:
Device #0: Monitor of Built-in Audio Stereo
However CLI command
pv_recorder_demo --audio_device_index 0 --output_wav_path pvtest.wav
says first it is Using device: Monitor of Built-in Audio Stereo but ends with OSError: Failed to read from device.
and in Python
recorder = PvRecorder(frame_length=512, device_index=0)
gives the same error when it hits recorder.start()
same with device_index=-1 which shoudl be the default mic.
I have had this working with a USB microphone and an adadfruit speaker but a) need to amplify the sound output, and b) improve captured speech quality otherwise Manny gets a bit confused !
Anything I can do to my configuration to make this work, or anything deeper in pvrecorder that can be tweaked?