初めに
最近出てきた以下のTTSを触ってみます
アーキテクチャは以下のようになっています
依存ライブラリにWeTextProcessingがあるため、WindowsやMacでは動かすのが大変なのでDockerを使うことが推奨されます
Windowsでインストールしようとすると以下のエラーが出ました。
error: Unable to find a compatible Visual Studio installation
この記事では Docker版に対応したリポジトリを公開しており、こちらを元に進めていきます
開発環境
- Windows 11
- RTX 4070 ti super
- Docker
環境構築
リポジトリのクローンします
git clone https://github.com/ayutaz/GLM-TTS.git cd GLM-TTS
Dockerビルド前にモデルをダウンロードしておきます(約10GB):
# ディレクトリ作成 mkdir ckpt # HuggingFace CLIでダウンロード pip install huggingface-hub huggingface-cli download zai-org/GLM-TTS --local-dir ckpt
Dockerイメージのビルドします
docker compose build
推論
CLI推論で確認:
# 中国語サンプル docker compose --profile cli run --rm glm-tts-cli # 英語サンプル docker compose --profile cli run --rm glm-tts-cli python glmtts_inference.py --data=example_en --exp_name=_test_en --use_cache
Web UI(Gradio)で確認:

docker compose up glm-tts