New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RP2040 mp3 playback is static #6133
Comments
I was able to reproduce this, but if I convert the mp3 to mono first, it goes away. Reducing the bitrate further didn't fix the issue. |
Lowering the sample rate of the mp3 down from 44100 to 16000 makes the issue go away. I think the noise is just stuttering because the processor isn't keeping up. |
How do you go about lowering the sample rate of the mp3? |
I use Audacity. Lots of tutorials online on how to lower the sample rate and always worked well for me. |
lowered to 16kHz and its producing the same static noise on mine. `import board audio = audiopwmio.PWMAudioOut(board.GP0) decoder = audiomp3.MP3Decoder(open("slow.mp3", "rb")) print("Begin playing!") audio.play(decoder) print("Done playing!")` |
Can you upload |
Here are the ones I'm using: mp3s.zip |
yes I will try your sounds when I get a chance. Again I am using the STEMMA speaker from adafruit |
Your mp3 files play fine for me. I'm just plugging the PWM pin straight into the line in on my computer (I know, probably not the best idea). Could this maybe be an issue that the speaker has with PWM? I will see if anyone can do some more testing with other boards and PWM. |
hmm your stereo.mp3 works for me, but not my slow16kHz.mp3. The stereo.mp3 plays very quietly and the sound goes away when I try changing the volume on the STEMMA speaker itself. how do you connect it straight into the computer line is that pin 0 on the raspberry pi pico? |
@Neradoc reports that slow.mp3 plays ok if you adjust the volume pot on the speaker, can you try that? |
Got it! Thank you for assisting me ! |
Let's document in the shared-bindings docs that MP3 problems could be due to the bit rate being too high. |
While I know this issue was closed several months ago, I am having this exact same problem. In my case, I am using a Feather RP2040 running CircuitPython 7.3.3, and using a Prop-Maker feather as my amplifier. I have downloaded the stereo.mp3 file that folks in this thread say works for them, and it has a lot of static for me. My code is pretty generic:
|
Reported on the forum and confirmed by Neradoc and cater on Discord:
https://forums.adafruit.com/viewtopic.php?f=60&t=189077&p=915505#p915505
The text was updated successfully, but these errors were encountered: