No sound playing back wav file from PiCar-X Example 16. Voice Controlled Car with Vosk

The first part of this example has you do a microphone check. I did this, but when I try to play back the recorded wav file (aplay test.wav), there is no sound. I checked and neither the microphone nor the speaker are muted and their volume is turned up. I copied the file to my Mac and it played back just fine there using VLC, so the problem is definitely not the microphone or the wav file. I went back to example 15, rerunning the Piper test, and it speaks so the problem is not the speaker either. I also tried playing back the wav file using VLC on the Raspberry Pi, but that produced no sound either (although it worked on my Mac). Any idea what the problem is?

Please try running the following command to enable the speaker before playing the audio file:

robot_hat enable_speaker

The speaker on the Robot HAT needs to be activated before it will produce sound. This activation is automatically included in our example scripts, so after running any example, the speaker should work even when playing audio files directly.

Thanks, but I still hear nothing when I try to play back test.wav. I again checked that the speaker is not muted and the volume is up to maximum. Also, again I tried this using both aplay and VLC, and it didn’t worth with either on the PiCar-X Raspberry Pi.

Will Windham

Please provide your detailed address and phone number and original order number if possible to get a robot hat via service@sunfounder.com

My address is:

William Windham

1896 Hardin Ln NE

Palm Bay, FL 32905

My cell phone number is 321-745-0043. My original order number is 1000020514. Do I need to send that to service@sunfounder.com?

My address is:

William Windham

1896 Hardin Ln NE

Palm Bay, FL 32905

My cell phone number is 321-745-0043. My original order number is 1000020514.

Let me know if you need any other information.

William Windham

Thank you for providing your address, phone number, and order number.

We have arranged to send you a replacement Robot HAT.

Please note that delivery typically takes 7–14 working days depending on your location and customs processing.

We apologize for the inconvenience and appreciate your patience.

My new Robot HAT arrived yesterday and I just finished installing it. Unfortunately, that didn’t help at all. I still have exactly the same situation. The sound works just fine in examples 13, 14, and 15, but when I try to play back the wave file in example 16, I get nothing. I have verified that file is valid by copying it to an external drive and playing it on my Mac where it plays just fine. I have also used

robot_hat enable_speaker

but still no sound when trying to play back the wave file. I have also run alsamixer again to verify that the robot_hat speaker is selected and that the volume is up and it is not muted.

So what now?

Will Windham