MetAvoice-1Bは、TTSの100K時間の音声(テキストツーチー)でトレーニングされた1.2Bパラメーターベースモデルです。次の優先事項で構築されています。
Apache 2.0ライセンスの下でMetAvoice-1Bをリリースしていますが、制限なしに使用できます。
Web UI
docker-compose up -d ui && docker-compose ps && docker-compose logs -fサーバ
# navigate to <URL>/docs for API definitions
docker-compose up -d server && docker-compose ps && docker-compose logs -f前提条件:
環境のセットアップ
# install ffmpeg
wget https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-amd64-static.tar.xz
wget https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-amd64-static.tar.xz.md5
md5sum -c ffmpeg-git-amd64-static.tar.xz.md5
tar xvf ffmpeg-git-amd64-static.tar.xz
sudo mv ffmpeg-git- * -static/ffprobe ffmpeg-git- * -static/ffmpeg /usr/local/bin/
rm -rf ffmpeg-git- *
# install rust if not installed (ensure you've restarted your terminal after installation)
curl --proto ' =https ' --tlsv1.2 -sSf https://sh.rustup.rs | sh # install poetry if not installed (ensure you've restarted your terminal after installation)
pipx install poetry
# disable any conda envs that might interfere with poetry's venv
conda deactivate
# if running from Linux, keyring backend can hang on `poetry install`. This prevents that.
export PYTHON_KEYRING_BACKEND=keyring.backends.fail.Keyring
# pip's dependency resolver will complain, this is temporary expected behaviour
# full inference & finetuning functionality will still be available
poetry install && poetry run pip install torch==2.2.1 torchaudio==2.2.1注1:問題を提起するときは、最初に詩を試してみてください。注2:このreadmeのすべてのコマンドはデフォルトでpoetryを使用するため、 poetry runを削除することができます。
pip install -r requirements.txt
pip install torch==2.2.1 torchaudio==2.2.1
pip install -e . # You can use `--quantisation_mode int4` or `--quantisation_mode int8` for experimental faster inference. This will degrade the quality of the audio.
# Note: int8 is slower than bf16/fp16 for undebugged reasons. If you want fast, try int4 which is roughly 2x faster than bf16/fp16.
poetry run python -i fam/llm/fast_inference.py
# Run e.g. of API usage within the interactive python session
tts.synthesise(text= " This is a demo of text to speech by MetaVoice-1B, an open-source foundational audio model. " , spk_ref_path= " assets/bria.mp3 " )注:スクリプトは30〜90秒かかり、スタートアップにかかります(ハードウェアに応じて)。これは、速い推論のためにモデルを締めくくるためです。
Ampere、Ada-Lovelace、およびHopper Architecture GPUで、コンパイルされると、Synthesise()APIはリアルタイムよりも速く実行され、リアルタイム係数(RTF)<1.0。
# You can use `--quantisation_mode int4` or `--quantisation_mode int8` for experimental faster inference. This will degrade the quality of the audio.
# Note: int8 is slower than bf16/fp16 for undebugged reasons. If you want fast, try int4 which is roughly 2x faster than bf16/fp16.
# navigate to <URL>/docs for API definitions
poetry run python serving.py
poetry run python app.py最初の段階のLLMの微調整をサポートします(アーキテクチャセクションを参照)。
Finetuneを使用するために、次の形式の「|」と照らされたCSVデータセットが期待されます。
audio_files|captions
./data/audio.wav|./data/caption.txt
データセットオーバーラップチェックを実行しないことに注意してください。そのため、列車とVALのデータセットがばらばらであることを確認してください。
以下を介してサンプルデータセットを使用して試してみてください。
poetry run finetune --train ./datasets/sample_dataset.csv --val ./datasets/sample_val_dataset.csvモデルをトレーニングしたら、次のことを推論に使用できます。
poetry run python -i fam/llm/fast_inference.py --first_stage_path ./my-finetuned_model.pt学習率、フリーズするものなど、ハイパーパラメーターを設定するには、Finetune_Params.pyファイルを編集できます。
wandb_log = Trueを設定し、適切な依存関係をインストールすることで有効にできる、W&Bとのライトおよびオプションの統合があります。
poetry install -E observableテキストとスピーカー情報からのエンコデックトークンを予測します。これは、波形レベルまで拡散され、ポストプロセスが適用され、オーディオのクリーンアップが適用されます。
モデルはサポートしています:
私たちは一緒に感謝しています。彼らのクラスターのマーシャルに24時間年中無休で助けをしてくれました。 AWS、GCP、抱き合ったチームのチームに、クラウドプラットフォームでサポートしてくれたことに感謝します。
誰かを逃した場合、事前に謝罪します。持っている場合はお知らせください。