-
Notifications
You must be signed in to change notification settings - Fork 636
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.m4a support #104
Comments
At the moment you need to convert them to WAV, e.g.
|
A script to do this for all files in the directory recursively #!/bin/bash
for i in $(find . -type f); do
ext="${i##*.}"
if [[ $ext = m4a ]]
then
p=${i%".m4a"}
echo $i
ffmpeg -v 0 -i $i $p'.wav' </dev/null > /dev/null 2>&1 &
fi
done |
cc @mravanelli |
Thanks, @mogwai for your helpful code snippet. Can it be extended to convert any non .wav, not only m4a, to wav? |
hope this will work #!/bin/bash
for i in $(find dataset -type f); do
ext="${i##*.}"
if [[ $ext != wav ]]
then
p=${i% $ext}
echo $i
echo $p
ffmpeg -v 0 -i $i $p'.wav' </dev/null > /dev/null 2>&1 &
fi
done |
In Python, I used this: from pydub import AudioSegment
for file_path list_of_file_paths:
audio = AudioSegment.from_file(file_path)
audio.export('dest_path', format='wav') Of course, you have to have |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Working with the VoxCeleb2 Dataset which encodes audio in the m4a format I've not been able to use the library to load the files.
I tried using ffpemg to convert to a aac file
ffmpeg -i in.m4a -c:a copy out.aac
and got the same errorThe text was updated successfully, but these errors were encountered: