I am getting oga file from javascript blob and I want to convert it to PCM compatible wav file in python. The approach I am using is as follow
AudioSegment.converter = r"C:/ffmpeg/bin/ffmpeg.exe"
AudioSegment.ffprobe = r"C:/ffmpeg/bin/ffprobe.exe"
sound = AudioSegment.from_file("file.oga")
sound.export("file.wav", format="wav")
For this I have to download ffmpeg locally. Is there any way to convert oga file to wave directly.
This is how i am saving file
f = open('./file.oga', 'wb')
f.write(base64.b64decode(file))
f.close()