Skip to content

The WAV2LIP-GAN Lip Sync App is a web-based application that allows users to generate lip-synced videos by aligning facial movements in an avatar image with an uploaded audio file. Using the powerful WAV2LIP-GAN model, the app ensures high-quality, synchronized facial animations, even for arbitrary faces and audio inputs.

Notifications You must be signed in to change notification settings

Mahfoozalam1516/Lip-Sync-Avatars

Repository files navigation

Here’s a README.md file template for your WAV2LIP-GAN Lip Sync App that you can use for GitHub:


WAV2LIP-GAN Lip Sync App

This repository contains a web-based application that generates lip-synced videos by synchronizing facial movements with an audio file using the WAV2LIP-GAN model. The app allows users to upload an avatar image and an audio file, processes the input through a pre-trained lip-sync model, and outputs a video with synchronized lip movements.

Features

  • Upload a custom audio file (WAV format) and an avatar image (JPG, PNG).
  • Generates lip-synced videos using the WAV2LIP-GAN model.
  • Built with Streamlit for a user-friendly interface.
  • Outputs video in MP4 format.
  • Error handling for missing files and dependencies.
  • Displays debugging information when errors occur.

Demo

WAV2LIP Demo

Include a demo GIF or image of the app here to showcase the functionality.

Installation

Prerequisites

  • Python 3.7+
  • Ensure you have the following libraries installed in your environment. You can install the required packages using requirements.txt.

Install Dependencies

git clone https://github.com/yourusername/wav2lip-gan-lipsync-app.git
cd wav2lip-gan-lipsync-app

# Install required dependencies
pip install -r requirements.txt

Pre-trained Model

  • Download the pre-trained WAV2LIP-GAN model from the official WAV2LIP repository.
  • Save the checkpoint model in the checkpoints/ directory:
    • Example: checkpoints/wav2lip_gan.pth

Usage

Running the App

Once all dependencies are installed and the model is downloaded, you can run the app locally using the following command:

streamlit run app.py

How to Use the App

  1. Upload an audio file (WAV format).
  2. Upload an avatar image (PNG, JPG, or JPEG format).
  3. Click on Generate Lip-Synced Video.
  4. The app will process the inputs and generate a lip-synced video, which you can download.

Output

  • The lip-synced video is generated in the Outputs directory and displayed in the Streamlit app interface.

File Structure

wav2lip-gan-lipsync-app/
│
├── app.py                  # Streamlit app script
├── requirements.txt         # Python dependencies
├── checkpoints/             # Directory to store the model checkpoint
│   └── wav2lip_gan.pth      # Pre-trained GAN model
├── Outputs/                 # Output folder for generated videos
└── README.md                # This README file

Requirements

The required Python libraries are listed in the requirements.txt file. Install them by running:

pip install -r requirements.txt

Example

Here's an example command for running the WAV2LIP inference from the terminal:

python inference.py --checkpoint_path checkpoints/wav2lip_gan.pth --face input.jpg --audio input.wav --outfile Outputs/output_video.mp4

Troubleshooting

If the app fails to run, check for missing Python modules in the terminal and ensure the paths to the model checkpoint and input files are correct.

Acknowledgments

  • This app utilizes the WAV2LIP model from the original WAV2LIP repository.
  • Thanks to the authors for their work on the WAV2LIP-GAN model.

License

This project is licensed under the MIT License. See the LICENSE file for more details.


You can modify this README file as needed to fit your project or add further sections like Contributing or Known Issues if applicable.

About

The WAV2LIP-GAN Lip Sync App is a web-based application that allows users to generate lip-synced videos by aligning facial movements in an avatar image with an uploaded audio file. Using the powerful WAV2LIP-GAN model, the app ensures high-quality, synchronized facial animations, even for arbitrary faces and audio inputs.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published