Primary competition visual

GIZ NLP Agricultural Keyword Spotter

Helping Uganda
$7 000 USD
Completed (over 5 years ago)
Classification
Automatic Speech Recognition
Natural Language Processing
739 joined
253 active
Starti
Sep 11, 20
Closei
Nov 29, 20
Reveali
Nov 29, 20
User avatar
Federal university of technology akure
Error opening audio file !!!
Help · 24 Oct 2020, 16:06 · 10

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

Discussion 10 answers
User avatar
anascharroud
Sidi mohamed ben abdellah university

me too

25 Oct 2020, 10:33
Upvotes 0
User avatar
pmwaniki
Kemri wellcome trust research programme

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)] subprocess.run(command,stdout=subprocess.PIPE,stdin=subprocess.PIPE)

26 Oct 2020, 16:43
Upvotes 0
User avatar
Federal university of technology akure

the codes aren't clear to me

User avatar
Federal university of technology akure

could please post a link to a github repo for easy acessibility?

User avatar
Lone_Wolf
University of ghana

@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

User avatar
pmwaniki
Kemri wellcome trust research programme

https://gist.github.com/pmwaniki/fece16fff8f53ddb33d13df51054ab02

User avatar
pmwaniki
Kemri wellcome trust research programme

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).

User avatar
Lone_Wolf
University of ghana

@pmwaniki File type is in wav

29 Oct 2020, 10:26
Upvotes 0
User avatar
pmwaniki
Kemri wellcome trust research programme

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.

User avatar
Lone_Wolf
University of ghana

Seen it.. thanks Sir