1 Answer. I found a solution that works, as suggested by @ForamJ in the comment, however it took me 30mins to convert 1min audio. # step1 - converting a wav file to numpy array and then converting that to mel-spectrogram my_audio_as_np_array, my_sample_rate= librosa.load ("audio1.wav") # step2 - converting audio np array to spectrogram spec How to Convert FLV to WAV? Click the “Choose Files” button to select your FLV files. Click the “Convert to WAV” button to start the conversion. When the status change to “Done” click the “Download WAV” button. In Python, We have a Library AudioSegment it helps to convert .mp3->.wav and vice versa. from pydub import AudioSegment sound = AudioSegment.from_mp3("somemp3filename.mp3") how to convert a webm file to mp3 with the same quality? and master the compression of wav and mp3 file ? all of that in python Locked post. New comments cannot be posted. To change the speed of the audio without changing the pitch (or creating chipmunk effect). You can use below code. from pydub import AudioSegment from pydub.effects import speedup audio = AudioSegment.from_mp3 (song.mp3) new_file = speedup (audio,1.5,150) new_file.export ("file.mp3", format="mp3") Share. Improve this answer. I am using python with pyav, ffmpeg to decode mp3 in the memory. I know there is some other way to do it, like the pipe ffmpeg command. However, I would like to explore pyav and ffmpeg API. So I ha 5Mf4. Speech recognition supports WAV file format. Here is a sample MP3 to text program using speech_recognition. import speech_recognition as sr from pydub import AudioSegment r = sr.Recognizer() #convert mp3 to wav sound = AudioSegment.from_mp3("recording.mp3") sound.export("recording.wav", format="wav") temp = 'recording.wav' with sr.AudioFile(temp) as source: audio = r.record(source) text = r I'm trying to convert an mp3 file to wav file. using the following code. def change_file (file): print (file) wav='fff'+'.wav' print ('here ') mp3_file=file sound=pydub.AudioSegment.from_mp3 (mp3_file) sound=sound.set_frame_rate (8000) temp=sound.export (wav, format="wav") return temp//doesnt work. 1. I've tried many things to open and convert an audio file into a numpy array but nothing works. import numpy as np import pyglet song = pyglet.media.load ('sample-000000.mp3') np.array (song) I want an array of numbers, not an array containing a pyglet file. Out [1]: array (

how to convert mp3 to wav in python