1.0.1 • Published 2 years ago

wav2lip v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

npm version

Wav2Lip

Wav2Lip is an npm library over a docker image that contains the Wav2Lip python package

Models

Face detection pre-trained model should be downloaded to models/s3fd.pth. Alternative link if the above does not work.

Wav2Lip pre-trained model ) should be downloaded to models/wav2lip.pth.

Prerequisites

This project requires NodeJS (version 8 or later) and NPM. Node and NPM are really easy to install. To make sure you have them available on your machine, try running the following command.

$ npm -v && node -v
8.19.2
v18.12.0

Table of contents

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Installation

BEFORE YOU INSTALL: please read the prerequisites

Start with cloning this repo on your local machine:

$ git clone https://github.com/0x4139/Wav2Lip.git
$ cd PROJECT

To install and set up the library, run:

$ npm install -S wav2lip

Or if you prefer using Yarn:

$ yarn add --dev wav2lip

Usage

Javascript Example

const Wav2Lip = require("../index")

let instance=new Wav2Lip({
    inputDir:`${__dirname}`,
    outputDir:`${__dirname}`
   });

(async function() {
  try{
    const result = await instance.Run("game.mp4","game.wav")
    console.log(result)
  }catch(err){
    console.log(err)
  }
})();

Javascript Example

git clone https://github.com/0x4139/Wav2Lip
cd Wav2Lip
docker run -v "$(pwd)"/example:/data -v "$(pwd)"/result:/usr/wav2lip/results 0x4139/wav2lip:v1 python inference.py --checkpoint_path checkpoints/wav2lip.pth --face /data/game.mp4 --audio /data/game.wav

Example Results

Results are stored in the chosen mount folder in this case example

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Add your changes: git add .
  4. Commit your changes: git commit -am 'Add some feature'
  5. Push to the branch: git push origin my-new-feature
  6. Submit a pull request :sunglasses:

Credits

Original Wav2Lip work : radrabha.m@research.iiit.ac.in

Built With

  • Docker
  • Node.JS

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

  • Vali Malinoiu - Initial work - 0x4139

See also the list of contributors who participated in this project.

License

MIT License © Vali Malinoiu

1.0.1

2 years ago

1.0.0

2 years ago