- MicroPython Cookbook
- Marwan Alsabbagh
- 150字
- 2021-06-24 14:28:15
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:
![](https://epubservercos.yuewen.com/F0709B/19470378808809006/epubprivate/OEBPS/Images/2e53af75-4de3-4618-ac25-0808b3010fc0.png?sign=1739927013-okMlTpqSTcJZo1AGbtjnZoeapjI0iHBA-0-e91182d5ff135b928ab7b6a70c7fea7c)
- Select Tracks | Resample and the following dialog box should appear:
![](https://epubservercos.yuewen.com/F0709B/19470378808809006/epubprivate/OEBPS/Images/ec025055-3467-4fd2-a993-26d6b45e3f27.png?sign=1739927013-uAQtWLVA93FScRGKCAorKjrWywuYA4gh-0-d88f32a0e8e7c2ee912c9b8e361fc953)
- 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:
![](https://epubservercos.yuewen.com/F0709B/19470378808809006/epubprivate/OEBPS/Images/a41bf509-b7ef-4be2-afa8-76a4c9ca5926.png?sign=1739927013-hcTsKUaoit3HGMCB6EZCZ3JjNogtB0T1-0-ec86327c7c262be00fbf309c319f6167)
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.