Python Pydub Permission denied?

Viewed 5153

When i run this code :

from pydub import AudioSegment
sound = AudioSegment.from_mp3("i.mp3")
sound.export("F:\\bh", format="wav")

A ffmpeg window pops up and i get this error:Error Pic

Even if i run it with admin privilleges: Error with admin privilleges

Note :
The error occurs on every location that I try to export

2 Answers

If you are on Windows, face this problem, and also have issues installing simpleaudio, you can try installing pyaudio instead.

If you are using Anaconda, you can install pyaudio with

conda install -c anaconda pyaudio

For me, simpleaudio on Anaconda is only available for Linux and MacOS and not Windows.

See this thread here. They suggest installing simpleaudio (pip install simpleaudio) to resolve this issue. It worked for me.

Related