Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

why am i getting error when importing AudioSegment?

i'm trying to use pydub, but when i import it to python with AudioSegment it will give me an error saying it doesn't recognize it. i tried using pip install and searching online. any help?? i'm using python 2.7

from pydub import AudioSegment
like image 938
Sh0z Avatar asked Apr 02 '17 14:04

Sh0z


2 Answers

I was also getting the same issue .and it was coming due to ffmpeg was not correctly configured. i have download latest ffmpeg from official website https://www.ffmpeg.org/download.html and setting up the class path worked for me

like image 66
user3251696 Avatar answered Sep 20 '22 06:09

user3251696


if you're using Linux, try this sudo apt install ffmpeg will fix the problem.

Hope it help !!!

like image 23
leminhnguyen Avatar answered Sep 21 '22 06:09

leminhnguyen