GIZ NLP Agricultural Keyword Spotter
$7,000 USD
Classify audio utterances in Luganda and English from Uganda
688 data scientists enrolled, 246 on the leaderboard
11 September—29 November 23:59
Ends in 55 hours
Error opening audio file !!!

I'm getting a runtime error that says " Error opening audio file" when using the audios given in file.

The file type is webm. Convert them to .wav first. The code below might help. You will need ffmpeg installed "sudo apt install ffmpeg"

#convert to wave file def convert_webm_to_wav(file,old_dir,new_dir): #ffmpeg -i ./big-buck-bunny_trailer.webm -c:a pcm_f32le ./out.wav command = ['ffmpeg', '-i', os.path.join(old_dir,file), '-acodec', 'pcm_s16le', '-ac', '1', '-ar', '22050', os.path.join(new_dir,file)],stdout=subprocess.PIPE,stdin=subprocess.PIPE)

@pmwaniki The files extensions are in wav and i didnt run into any issues generating the spectogram images for te added files.. Even though it ran .. does your interpretation of the added files being in a different format mean I need to reconvert them to wav ?

Sorry i'm kinda new to Audio tasks

It depends on which library one is using and what software are available. If one is using librosa, ffmpeg need to be installed (at least in Linux, I don't know about windows).

While the extension says ".wav" the format is different. You can confirm this by running "file [filename].wav" on the terminal. the files in the "audio_files" folder are ".wav" while the rest are not. If you are using librosa to load the files you will see the difference.