How to use Wav2Lip on Google Colaboratory

Last Updated: 2022/02/11 10:27:46

Colaboratoryml4a (opens new window)Wav2Lip (opens new window)を試してみました。

Wav2Lip Sample of Monalisa

Wav2Lipは簡単に言うと、機械学習で画像の顔認識を行い、音声画像と合成して喋っているような動画を作成するライブラリです。

下記で生成したものを動画としてアップしましたので、ご確認ください。
サンプル動画では英語となっておりますが、もちろん日本語でも可能です。


下記が読み込んだ音声ファイル(カフカの「変身」から引用)の原稿となります。

As Gregor Samsa awoke one morning from uneasy dreams he found himself transformed in his bed into a gigantic insect. He was lying on his hard, as it were armor-plated, back and when he lifted his head a little he could see his domelike brown belly divided into stiff arched segments on top of which the bed quilt could hardly keep in position and was about to slide off completely. His numerous legs, which were pitifully then compared to the rest of his bulk, waved helplessly before his eyes.


音声は「音読さん」という音声読み上げサービスを利用しています。


作成したColaboratoryのファイルをGitHubにて公開しております。

自分で動かしてみたい方はsample01 (opens new window)sample02 (opens new window)にアクセスしていただき、Open in ColabボタンをクリックしていただければColacolatoryで開くことができます。

(機械学習のライブラリ全般に言えるのですが)基本的には学習不要で pip install ml4a して wav2lip.run を呼び出すだけで音声動画が生成できるので、pythonがわかれば比較的、簡単に利用できるかなと思います。

Last Updated: 2022/02/11 10:27:46
Copyright © Web Ninja All Rights Reserved.