0

I'm trying to run a regression on some audio data using pyAudioAnalysis, going off of the instructions here. However, when I run aT.featureAndTrainRegression(args), I get Error: line contains NULL byte as it scans through my csv file.

I've done some digging online, and there's a lot of advice on how to delete or ignore null bytes from your csv, but I didn't have a lot of luck with those approaches; going through and deleting all the null bytes left me with a csv of pure gobbledygook that had no resemblance to the original, and I'm hesitant to try the other side: modifying the audioTrainTest code in pyAudioAnalysis. I mean, enough people use this that I can't believe everyone encounters the error, so there must be a way to solve it without tinkering with the guts of the library.

I'm running a mac with OS10.9, and using Python 2.7 on PyCharm. Any advice would be greatly appreciated. Thanks in advance!

Anil_M
  • 10,893
  • 6
  • 47
  • 74
macinblack
  • 19
  • 6

1 Answers1

0

Figured it out! Turns out the csv filetype I was using (the mac one) wasn't compatible with python, hence the errors. When I saved my csv as a Windows csv all the problems disappeared.

macinblack
  • 19
  • 6
  • Could you point me how you dd it? I'm trying to try the speaker diarization of pyAudioAnalysis and facing the same issue – channae Apr 06 '18 at 10:17
  • Yes. So it turns out that there are many different types/formats of csv file, and I was using the wrong one for the dataset I was trying to load in. Since I was on mac, when I saved my csv it defaulted to the MS-DOS Comma Separated format. Just go into Save As and make sure you choose the Windows Comma Separated format instead. – macinblack Apr 07 '18 at 14:25