1

I am building a sound project on an ESP 32 via I2S using an example from: https://github.com/nhatuan84/esp32-i2s-sdcard-wav-player

It works fine with the example wav file t.wav posted in the repository.

But when I try to use a custom wav which I exported from audacity it sounds distorted and/or too slow/fast (it sounds fine when I play it within audacity).

This is an example that is totaly distorted when playing from the esp with I2S: badly sounding wav While it sounds fine when playing from audacity.

I tried different settings in audacity exporting 16 bit, 32 bit. 44100 Hz, 11025.

Any hints or tips what I could try or am doing wrong?

Thx!

Jeroen

4
  • The provided file from the repo is 16 bit mono with 11025 Hz. Have you tried these settings? – chrisl Oct 4 '19 at 21:07
  • @crisl yes I did (at least I think I did but I am no expert on audacity...), it is this file: link 11025 file. This file is not distorted but plays too fast ( I think twice the speed) – Jeroen Oct 5 '19 at 13:32
  • @jstola. Not sure I understand what you propose. I created the wav file from text-to-speech-demo.ng.bluemix.net. Then I opened it in audacity, converted it to several different sample frequencies exported the file to 16 bit pcm wav and put it on the sd. I just tried to copy the file back from the pc and play them and that works fine – Jeroen Oct 5 '19 at 13:39
  • sounds like maybe the data rate is too high, or low, depending on your perspective. i see the github file as a mono 32bit float at 11k. chances are, you just need to keep trying permutations of settings until you nail it. – dandavis Oct 7 '19 at 19:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.