jiaaro/pydub

SimpleAudio/PyAudio-only playback bug

Martysh12 opened this issue · 0 comments

Unsigned 8-bit WAV files with a 11025hz sample rate will not play correctly using simpleaudio and pyaudio (only ffplay will play it correctly).

Steps to reproduce

  1. Resample an audio file to 11025hz and convert it to an unsigned 8-bit WAV.
  2. Make sure you have only simpleaudio or pyaudio installed. Uninstall ffplay.
  3. Load the audio file into an AudioSegment and play it using pydub.playback.play.
  4. You will hear the sound, except it's extremely loud.

Expected behavior

The sound is played back correctly.

Actual behavior

The audio will be extremely loud. Using ffplay instead of simpleaudio or pyaudio will produce the correct audio.

Your System configuration

  • Python version: 3.11.5
  • Pydub version: 0.25.1
  • ffmpeg or avlib?: ffmpeg
  • ffmpeg/avlib version: n6.0

Is there an audio file you can include to help us reproduce?

I've included an audio file and a test script.

pluck.wav.zip