You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Add the input specifier after offset and duration.
cmd+=f" -i {path}"
{path} isn't wrapped in quotes when creating the cmd string. ffmpeg misinterprets the spaces as arg separators.
Below is an example with dataset/J-Kash Uncensored/Legendary Tales of Georgia, Introduction &Pilot[38].opus as the path. The error raised by ffmpeg is dataset/J-Kash: No such file or directory
Stacktrace
(base) wrx80e@id2:/media/cookie/Designaire/_10_python_pkgs/_12_Speech/vall-e/egs/podcastsv3$ python prepare.py
Traceback (most recent call last):
File "/home/wrx80e/anaconda3/lib/python3.10/site-packages/lhotse/audio.py", line 2351, in read_opus_ffmpeg
channel_string = parse_channel_from_ffmpeg_output(proc.stderr)
File "/home/wrx80e/anaconda3/lib/python3.10/site-packages/lhotse/audio.py", line 2388, in parse_channel_from_ffmpeg_output
raise ValueError(
ValueError: Could not determine the number of channels for OPUS file from the following ffmpeg output (shown as bytestring due to avoid possible encoding issues):
b'/bin/sh: 1: Pilot[38].opus: not found\nffmpeg version 6.0-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2023 the FFmpeg developers\n built with gcc 8 (Debian 8.3.0-6)\n configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg\n libavutil 58. 2.100 / 58. 2.100\n libavcodec 60. 3.100 / 60. 3.100\n libavformat 60. 3.100 / 60. 3.100\n libavdevice 60. 1.100 / 60. 1.100\n libavfilter 9. 3.100 / 9. 3.100\n libswscale 7. 1.100 / 7. 1.100\n libswresample 4. 10.100 / 4. 10.100\n libpostproc 57. 1.100 / 57. 1.100\ndataset/J-Kash: No such file or directory\n'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/media/cookie/Designaire/_10_python_pkgs/_12_Speech/vall-e/egs/podcastsv3/prepare.py", line 189, in <module>
prepare_podcastsv3(args.src_dir, args.manifest_dir)
File "/media/cookie/Designaire/_10_python_pkgs/_12_Speech/vall-e/egs/podcastsv3/prepare.py", line 45, in prepare_podcastsv3
recording = Recording.from_file(opus_path)
File "/home/wrx80e/anaconda3/lib/python3.10/site-packages/lhotse/audio.py", line 426, in from_file
audio_info = info(
File "/home/wrx80e/anaconda3/lib/python3.10/site-packages/lhotse/audio.py", line 1809, in info
return opus_info(path, force_opus_sampling_rate=force_opus_sampling_rate)
File "/home/wrx80e/anaconda3/lib/python3.10/site-packages/lhotse/audio.py", line 2244, in opus_info
samples, sampling_rate = read_opus(
File "/home/wrx80e/anaconda3/lib/python3.10/site-packages/lhotse/audio.py", line 2280, in read_opus
return read_opus_ffmpeg(
File "/home/wrx80e/anaconda3/lib/python3.10/site-packages/lhotse/audio.py", line 2364, in read_opus_ffmpeg
raise AudioLoadingError(
lhotse.audio.AudioLoadingError: Could not determine the number of channels for OPUS file from the following ffmpeg output (shown as bytestring due to avoid possible encoding issues):
b'/bin/sh: 1: Pilot[38].opus: not found\nffmpeg version 6.0-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2023 the FFmpeg developers\n built with gcc 8 (Debian 8.3.0-6)\n configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg\n libavutil 58. 2.100 / 58. 2.100\n libavcodec 60. 3.100 / 60. 3.100\n libavformat 60. 3.100 / 60. 3.100\n libavdevice 60. 1.100 / 60. 1.100\n libavfilter 9. 3.100 / 9. 3.100\n libswscale 7. 1.100 / 7. 1.100\n libswresample 4. 10.100 / 4. 10.100\n libpostproc 57. 1.100 / 57. 1.100\ndataset/J-Kash: No such file or directory\n'
The ffmpeg command for which the program failed is: 'ffmpeg -threads 1 -i dataset/J-Kash Uncensored/Legendary Tales of Georgia, Introduction &Pilot[38].opus -f f32le -threads 1 pipe:1', error code: 127
Suggested change
# Add the input specifier after offset and duration. cmd+=f" -i {path}"
to
# Add the input specifier after offset and duration. cmd+=f" -i \"{path}\""
The text was updated successfully, but these errors were encountered:
lhotse/lhotse/audio/backend.py
Lines 874 to 875 in 567ba29
{path}
isn't wrapped in quotes when creating thecmd
string. ffmpeg misinterprets the spaces as arg separators.Below is an example with
dataset/J-Kash Uncensored/Legendary Tales of Georgia, Introduction &Pilot[38].opus
as the path. The error raised by ffmpeg isdataset/J-Kash: No such file or directory
Stacktrace
Suggested change
to
The text was updated successfully, but these errors were encountered: