dreamtalk icon indicating copy to clipboard operation
dreamtalk copied to clipboard

Error loading audio file: failed to open file.

Open ikuboo opened this issue 1 year ago • 2 comments

python inference_for_demo_video.py --wav_path data/audio/acknowledgement_english.m4a --style_clip_path data/style_clip/3DMM/M030_front_neutral_level1_001.mat --pose_path data/pose/RichardShelby_front_neutral_level1_001.mat --image_path data/src_img/uncropped/male_face.png --cfg_scale 1.0 --max_gen_len 30 --output_name acknowledgement_english@M030_front_neutral_level1_001@male_face1 ffmpeg: error while loading shared libraries: libopenh264.so.5: cannot open shared object file: No such file or directory Some weights of the model checkpoint at ./models/jonatasgrosman/wav2vec2-large-xlsr-53-english were not used when initializing Wav2Vec2Model: ['lm_head.weight', 'lm_head.bias']

  • This IS expected if you are initializing Wav2Vec2Model from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).
  • This IS NOT expected if you are initializing Wav2Vec2Model from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model). formats: can't open input file `tmp/acknowledgement_english@M030_front_neutral_level1_001@male_face1/acknowledgement_english@M030_front_neutral_level1_001@male_face1_16K.wav': No such file or directory Traceback (most recent call last): File "inference_for_demo_video.py", line 189, in speech_array, sampling_rate = torchaudio.load(wav_16k_path) File "/opt/conda/envs/dreamtalk/lib/python3.7/site-packages/torchaudio/backend/sox_io_backend.py", line 151, in load filepath, frame_offset, num_frames, normalize, channels_first, format) RuntimeError: Error loading audio file: failed to open file.

ikuboo avatar Jan 08 '24 06:01 ikuboo

I met the same question

JingHSY-dev avatar Mar 01 '24 08:03 JingHSY-dev

I solved the question. first: Search for the ‘libopenh264.so.’ folder under the ‘dreamtalk’ environment.: find ~/anaconda3 -name libopenh264.so.* second: cp ~/conda_env_path/lib/libopenh264.so.6 ~/conda_env_path/lib/libopenh264.so.5 Check if it’s working properly using the ‘ffmpeg’ command.

JingHSY-dev avatar Mar 01 '24 09:03 JingHSY-dev