Convert MP3 to WAV using Python

Hi,

I get an error when I try the following code. The purpose is to read a local file and convert it MP3 to WAV

----code:----
import streamlit as st
import pydub
import os

my_file = ‘C:/Users/Robo1753/Desktop/Streamlit_Programs/019-Animals.mp3’
st.write(my_file)

file_var = pydub.AudioSegment.from_mp3(my_file)
file_var.export(“wavefile.wav”, format=‘wav’)

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.