Playing wav files from sd card.



  • By using the built in wav_player (firmware 1.5 and above) I can play wav files pretty easily. However, when I play them from the sd card this causes a lot of stutter. So far I have tried three different SD cards with the same results. I have used the mix.wav found in the res directory and put it on my SD card and run this code.

    from wav import *
    
    wav_player.playWav('res/mix.wav')
    wav_player.playWav('/sd/mix.wav')
    

    The one played from the memory plays fluently without issues. The one from the SD card stutters and does not run fluently.

    Anyone has an idea on how to solve this?


  • M5Stack

    You can try this guide I made some time ago https://www.hackster.io/lukasmaximus89/play-wav-files-on-your-m5stack-3bee7e I think the code should only be compatible with older versions of the firmware, I haven't tested it recently