I’m trying to create a Speech-to-text app using Dash and locally downloaded Whisper model (OpenAI). Whenever I get user input of the audio file, it’s converted to Base64 encoded string which isn’t compatible with Whisper.
My questions -
Is there a way I can save the uploaded file as-is, in mp3 or wav format, rather than dealing with encoded version?
Or, is there a way I can get audio attributes like channel, sampling etc to recreate audio file from encoded string?
@AIMPED Thanks for your prompt response. Yes, I am using dcc.upload() for getting user upload. I had to adapt the code to re-generate the file uploaded from the user depending on the format, but the link helped.