MP3 to WAV conversion -- Working #1964
-
I have been trying everything to get this working, i wanted to use the wav download but the chuinks coming back when it was done downloaded were all staticy in between chunks and clipping it was odd well i had no issues getting the mp3 downloads to work so i tried that i have been trying to get it to 16000 hz 16 bit mono the same as my mic
so the mp3 downloads no problem and the sketch is huge so was saving space here. i could not find a straight forward example on how to do this. it almost works it plays on the board but not in audacity and stuff cause it is not making a correct wav file... and i know that is my fault but i cant seem to figure this out, tried resampling and filterstream and a few more these past few days i know i prob over complicated this. i am going to use open ai for tts too so i wasnt sure which type of .mp3 files they use do wanted it sort of dynamic |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 15 replies
-
I think this is way too complicated: why don't you just adapt the approach from this example or this one when you want to decode to play back some audio ? |
Beta Was this translation helpful? Give feedback.
-
OMG after days it was a simper error in the way i constructed the post to deepgram and the encoded worked this time after i looked at their docs... here is the updated and working sketch in case someone else ever needs it or similar. Encode .mp3 and save to SD as a .wav audio file, while listening thru speaker
|
Beta Was this translation helpful? Give feedback.
-
changed to libMad and not getting the crash a but im not getting it to work the top is teh wav... the waveform look good this time, but this is a prerecorded file for now lol
new attempt
there has to be a easier way to get this working, i have went thru so many examples here and cant get it... the wav file was only 0kb for a while and i was getting that crash every time with libmp3helix when it would try to close |
Beta Was this translation helpful? Give feedback.
-
I was testing some decoding with the setup of using stack variables w/o calling end; |
Beta Was this translation helpful? Give feedback.
-
i had to make a few adjustments and add to the wavConversionTask() buffer cause was getting the ol guru meditation fun lol anyways i got it working with :
i will follow this up with the full working code to contact deepgram TTS |
Beta Was this translation helpful? Give feedback.
-
Full working code Fetching MP3 and converting to WAV while listening thru MAX98357 I2S Audio Amplifier
this should work just fine using any mp3 downloaded off any TTS providers I would def take out of the loop, i just have it there for simplicity sakes |
Beta Was this translation helpful? Give feedback.
Full working code
Fetching MP3 and converting to WAV while listening thru MAX98357 I2S Audio Amplifier