How to efficiently convert a Flask FileStorage object to a format Whisper API accepts?

I have not tested it yet but others seem to have made it working: