respeaker / seeed-voicecard

2 Mic Hat, 4 Mic Array, 6-Mic Circular Array Kit, and 4-Mic Linear Array Kit for Raspberry Pi
GNU General Public License v3.0
470 stars 284 forks source link

[Bug]: Audio playback slower than actual speed (ReSpeaker 2-Mics Pi HAT) #316

Open likelikeslike opened 2 years ago

likelikeslike commented 2 years ago

Describe the bug

To Reproduce Steps to reproduce the behavior:

  1. Record the wav file using arecord or https://github.com/respeaker/mic_hat/blob/master/recording_examples/record.py
  2. Play the audio using aplay or https://github.com/respeaker/mic_hat/blob/master/recording_examples/play.py
  3. The output through 3.5mm Audio Jack headphone sounds slower than it should be (1.5x slower)
  4. I also export the wav file to my laptop and play it, it sounds normal

Expected behavior

The playback speed from the 3.5mm Audio Jack should be the same as the input audio file, but in fact it has been slowdown.

A side note: when I manually specify the sample rate to 22050Hz in the play.py file, and play a wav file of 16000Hz sample rate. The result sounds better than using the same sample rate (16000Hz).

Platform

Relevant log output

No response