SparkFun Forums 

Where electronics enthusiasts find answers.

Questions &/or issues related to products in the Audio category should be posted in this forum.
User avatar
By kenam123
Product: SparkFun I2S Audio Breakout - MAX98357A (DEV-14809)
IDE: Arduino IDE 1.8.9
Libraries :
  • ESP8266 Audio Arduino Library
  • ESP8266_Spiram Arduino Library
Code: ESP8266 Audio Arduino Library Examples -> PlayWAVFromPROGMEM
Attachments: (28 kb, 1 file)

I have successfully assembled and run the example sketches, but ares struggling to play custom sounds. I believe that the problem can be resolved simply by identifying a method for exporting .wavs. Attached is a sample .wav I would like to be able to play from memory.

  • Opened .wav file in Audacity 2.3.0 and exported as .wav (Microsoft header/encoded signed 16-bit PCM)
  • Opened .wav file in HxD and exported the contents of the file with the "Copy As > C" function under "Edit"
  • Replaced the contents of the example char array (PlayWAVFromPROGMEM.ino, viola.h) with the generated char array contents, name of array unchanged.
  • Compile and Upload is successful
  • Serial Output consistently indicates that the file is retrieved from memory.
  • No Audio from the speaker or loud bursts of static depending on array export settings.
  • Error during silence:
    Code: Select all
    AudioGeneratorWAV::ReadWAVInfo: cannot read WAV, invalid RIFF header, got: D5D5D5D5 
    AudioGeneratorWAV::begin: failed during ReadWAVInfo
You do not have the required permissions to view the files attached to this post.