Skip To Main Content
Support Knowledge Base

Unable To Run Wav2Lip Inferencing Python Script

Content Type: Error Messages   |   Article ID: 000100340   |   Last Reviewed: 06/02/2025

Description

Ran Wav2Lip Inferencing Python Script but encountered error:

ImportError: cannot import name 'preemphasis' from 'hparams.hparams'

Resolution

  1. Clone Wav2Lip GitHub repository.
    git clone https://github.com/Rudrabha/Wav2Lip.git
  2. Copy the content of hparams.py file and paste to audio.py file.
  3. Change hparams = HParams( to hp = HParams( in audio.py file.
  4. Add ov_inference ("data_video_sun_5s.mp4","data_audio_sun_5s.wav") at the last line in ov_inference.py file.
  5. Run widget install ffmpeg command if ffmpeg is not installed.
  6. Execute ov_inference.py Python script.

Related Products

This article applies to 1 products.