- MicroPython Cookbook
- Marwan Alsabbagh
- 150字
- 2025-04-04 14:22:37
How to do it...
Let's perform the following steps:
- Start the Audacity software and select File | Open. Then, select the MP3 file and click on Open.
- Details of the audio file should appear in the application, as shown in the following screenshot:

- Select Tracks | Resample and the following dialog box should appear:

- Set the new sample rate to 22050 and then click on OK.
- Now, choose Tracks | Stereo Track to Mono. Instead of the stereo audio streams that were visible, there should only be one single mono channel on the screen:

The audio data is now ready to be exported to the WAV format.
- Next, choose File | Export Audio.
- Set the file format drop-down menu to the value of WAV (Microsoft) signed 16-bit PCM.
- Click on the Save button.
- You can now copy the WAV file to the board and play it back on the device.