'How do I save the audio file after using setPitch()?

I am using a Flutter plugin called just_sound and the publisher's page says to ask questions about it here on SO.

I've managed to use the setPitch() method to change the pitch of the audio file being played back. I now want to send this modified audio file to Firebase Storage, but it looks like using setPitch doesn't permanently change the pitch of the audio file. It only temporarily changes it during playback. How do I permanently change the pitch so that I can save it to the device and then ultimately send it to Firebase Storage?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source