【ESPnet】Windows11 で ESPnet==202503 を使ってTTS(Text2Speech)を行う

はじめに

ESPnetの記事は以前にも書きました。
touch-sp.hatenablog.com
今回新しいESPnet==202503を使ってみました。

PC環境

Windows 11
CUDA 12.4
Python 3.10

Python環境構築

pip install torch==2.4.1+cu124 torchaudio==2.4.1+cu124 --index-url https://download.pytorch.org/whl/cu124
pip install git+https://github.com/espnet/espnet.git@v.202503
pip install espnet_model_zoo
pip install pyopenjtalk



「requirements.txt」を作ったので以下の1行で環境構築可能です。

pip install -r https://raw.githubusercontent.com/dai-ichiro/myEnvironments/refs/heads/main/ESPnet/requirements_win_202503.txt

実行

前回と全く同じスクリプトを使用しました。

警告

Flash Attentionがないといわれますが無視して問題ありませんでした。

Failed to import Flash Attention, using ESPnet default: No module named 'flash_attn'

その他にも以下のような警告が出ましたが無視して問題ありませんでした。

D:\espnet\env\py310-20250411\lib\site-packages\espnet_model_zoo\downloader.py:364: UserWarning: Not validating checksum
  warnings.warn("Not validating checksum")
D:\espnet\env\py310-20250411\lib\site-packages\torch\nn\utils\weight_norm.py:134: FutureWarning: `torch.nn.utils.weight_norm` is deprecated in favor of `torch.nn.utils.parametrizations.weight_norm`.
  WeightNorm.apply(module, name, dim)
D:\espnet\env\py310-20250411\lib\site-packages\espnet2\gan_tts\vits\monotonic_align\__init__.py:19: UserWarning: Cython version is not available. Fallback to 'EXPERIMETAL' numba version. If you want to use the cython version, please build it as follows: `cd espnet2/gan_tts/vits/monotonic_align; python setup.py build_ext --inplace`
  warnings.warn(
WARNING:root:It seems weight norm is not applied in the pretrained model but the current model uses it. To keep the compatibility, we remove the norm from the current model. This may cause unexpected behavior due to the parameter mismatch in finetuning. To avoid this issue, please change the following parameters in config to false:
 - discriminator_params.follow_official_norm
 - discriminator_params.scale_discriminator_params.use_weight_norm
 - discriminator_params.scale_discriminator_params.use_spectral_norm

See also:
 - https://github.com/espnet/espnet/pull/5240
 - https://github.com/espnet/espnet/pull/5249