tyiannak / pyAudioAnalysis

Python Audio Analysis Library: Feature Extraction, Classification, Segmentation and Applications
Apache License 2.0
5.75k stars 1.18k forks source link

'convert_dir_mp3_to_wav' throwing errors #357

Closed sandybei closed 2 years ago

sandybei commented 2 years ago

Hello!

I was running convert_dir_mp3_to_wav and I was having some problems. I came across the following errors:

  1. line 50: os.system(command.decode('unicode_escape').encode('ascii', 'ignore').replace("\0", ""))

I get the following error: AttributeError: 'str' object has no attribute 'decode'. When applying the encodefunction followed by decode, it worked: os.system(command.encode('ascii', 'ignore').decode('unicode_escape').replace("\0", ""))

  1. line 48:" -ac " + str(num_channels) + "" + filename + "\"" In the string of the avconv command, I believe that a space " " is missing between the number of channels and the filename.

Aer these errors valid? Thank you!

tyiannak commented 2 years ago

Fixed in https://github.com/tyiannak/pyAudioAnalysis/commit/b731570bf1a3557da2b77647613f902ec95b46f4