- MicroPython Cookbook
- Marwan Alsabbagh
- 151字
- 2021-06-24 14:28:15
How it works...
The Circuit Playground Express board expects an audio file to be in the WAV file format and have a sample rate of 22,050 kHz, be in 16-bit format, and have a mono channel of audio data. Audacity is a versatile audio editor that can open any number of audio formats and perform the necessary changes to convert the audio data into the correct format.
The steps taken in this recipe resample the audio data and convert the audio channels to a single mono channel. Once that is done, the audio data can be exported to the correct WAV format. It is important to note that WAV files are not compressed like other audio formats, so they will take up much more space. This, combined with the storage constraints on this device, mean that only short audio clips should be used so that they can fit on the device.