Metavoice-1B는 TTS (Text-To-Steece)에 대해 100k 시간의 음성으로 훈련 된 1.2B 매개 변수 기본 모델입니다. 다음과 같은 우선 순위로 구축되었습니다.
우리는 Apache 2.0 라이센스에 따라 Metavoice-1B를 공개하고 있습니다. 제한없이 사용할 수 있습니다 .
웹 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을 지원합니다 (아키텍처 섹션 참조).
양방향을 위해 다음 형식의 "|"-텔리밍 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와의 Light & Optional Integration이 있습니다.
poetry install -E observable우리는 텍스트와 스피커 정보에서 encodec 토큰을 예측합니다. 그런 다음 오디오를 정리하기 위해 사후 처리가 적용되면서 파형 레벨까지 확산됩니다.
모델은 다음을 지원합니다.
우리는 클러스터를 마샬링하는 24/7의 도움에 대해 함께 감사합니다. 클라우드 플랫폼을 지원해 주신 AWS, GCP 및 Hugging Face 팀에 감사드립니다.
우리가 누군가를 놓친 경우 사전 사과합니다. 우리가 있다면 알려주십시오.