Giter Club home page Giter Club logo

mmvc_trainer's Introduction

MMVC_Trainer

AIを使ったリアルタイムボイスチェンジャーのモデル学習用ツール

Description

AIを使ったリアルタイムボイスチェンジャー「MMVC(RealTime-Many to Many Voice Conversion)」
で使用するモデルを学習するためのリポジトリです。
google colaboratoryを用いることで、個人の環境に依存せず、かつ簡単に機械学習の学習フェーズを実行可能です。

MMVC_Client

MMVCを実際に動かすClient software
https://github.com/isletennos/MMVC_Client

concept

「簡単」「だれでも」「好きな声に」「リアルタイムで」

Demo

作成中

Requirement

・Google アカウント

Install

このリポジトリをダウンロードして、展開、展開したディレクトリをgoogle drive上にアップロードしてください。

Usage

学習用のデータセットの作成および配置

  1. 学習用の話者の音声データとその音声データに対応するテキストを用意します。
    ターゲットにしたい話者の音声データと変換したい話者の音声データと学習の効率化ために使うその他話者の音声データを用意することを推奨します。
    その他話者の音声データには下記コーパス等利用することを推奨します。

    下記の公開コーパス等を利用することを推奨します。

2.下記のようなディレクトリ構成になるように音声データとテキストデータを配置します。

dataset
├── textful
│   ├── 000_jvs001
│   │   ├── text
│   │   │   ├── VOICEACTRESS100_001.txt
│   │   │   ├── VOICEACTRESS100_002.txt
│   │   │   ├── ...
│   │   └── wav
│   │        ├── VOICEACTRESS100_001.wav
│   │        ├── VOICEACTRESS100_002.wav
│   │        ├── ...
│   ├── 001_jvs002
│   │   ├── text
│   │   │   ├── VOICEACTRESS100_001.txt
│   │   │   ├── VOICEACTRESS100_002.txt
│   │   │   ├── ...
│   │   └── wav
│   │        ├── VOICEACTRESS100_001.wav
│   │        ├── VOICEACTRESS100_002.wav
│   │        ├── ...
│   ├── 002_jvs003
│   │   ├── text
│   │   │   ├── VOICEACTRESS100_001.txt
│   │   │   ├── VOICEACTRESS100_002.txt
│   │   │   ├── ...
│   │   └── wav
│   │        ├── VOICEACTRESS100_001.wav
│   │        ├── VOICEACTRESS100_002.wav
│   │        ├── ...
│   ├── ...
│   │        
│   │        
│   │        
│ 
│ 
│ 
└── textless

モデルの学習方法

  1. notebookディレクトリにある「Create_Configfile.ipynb」をgoogle colab 上で実行、学習に必要なconfigファイルを作成

  2. 学習したコンフィグファイル(json)の

    • "eval_interval"
      modelを保存する間隔です。
    • "batch_size"
      colabで割り当てたGPUに合わせて調整してください。

    上記2項目を環境に応じて設定ください。

  3. notebookディレクトリにある「Train_MMVC.ipynb」をgoogle colab 上で実行してください。
    logs/にモデルが生成されます。

学習したモデルの性能検証

  1. notebookディレクトリにある「MMVC_Interface.ipynb」をgoogle colab 上で実行

Q&A

Q1. 下記のようなエラーが発生しました。どうしたらよいですか?

Traceback (most recent call last):
  File "train_ms.py", line 302, in <module>
    main()
  File "train_ms.py", line 50, in main
    mp.spawn(run, nprocs=n_gpus, args=(n_gpus, hps,))
  File "/usr/local/lib/python3.7/dist-packages/torch/multiprocessing/spawn.py", line 200, in spawn
    return start_processes(fn, args, nprocs, join, daemon, start_method='spawn')
  File "/usr/local/lib/python3.7/dist-packages/torch/multiprocessing/spawn.py", line 158, in start_processes
    while not context.join():
  File "/usr/local/lib/python3.7/dist-packages/torch/multiprocessing/spawn.py", line 119, in join
    raise Exception(msg)
Exception: 

-- Process 0 terminated with the following error:
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/torch/multiprocessing/spawn.py", line 20, in _wrap
    fn(i, *args)
  File "/content/drive/MyDrive/MMVC_Trainer/train_ms.py", line 126, in run
    train_and_evaluate(rank, epoch, hps, [net_g, net_d], [optim_g, optim_d], [scheduler_g, scheduler_d], scaler, [train_loader, eval_loader], logger, [writer, writer_eval])
  File "/content/drive/MyDrive/MMVC_Trainer/train_ms.py", line 172, in train_and_evaluate
    hps.data.mel_fmax
  File "/content/drive/MyDrive/MMVC_Trainer/mel_processing.py", line 105, in mel_spectrogram_torch
    center=center, pad_mode='reflect', normalized=False, onesided=True)
  File "/usr/local/lib/python3.7/dist-packages/torch/functional.py", line 465, in stft
    return _VF.stft(input, n_fft, hop_length, win_length, window, normalized, onesided)
RuntimeError: cuFFT doesn't support signals of half type with compute capability less than SM_53, but the device containing input half tensor only has SM_37

A1. お手数ですがコンフィグファイル(json)の
"fp16_run": true,

"fp16_run": false,
に変更ください。

順次更新

Note

なにか不明点があればお気軽にご連絡ください。

Reference

https://arxiv.org/abs/2106.06103
https://github.com/jaywalnut310/vits

Author

Isle Tennos
Twitter : https://twitter.com/IsleTennos

mmvc_trainer's People

Contributors

isletennos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.