@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 ?
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.
me too
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)
the codes aren't clear to me
could please post a link to a github repo for easy acessibility?
@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
https://gist.github.com/pmwaniki/fece16fff8f53ddb33d13df51054ab02
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).
@pmwaniki File type is in wav
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.
Seen it.. thanks Sir