eightban's memo

残しておきたい記事をまとめてみました。このブログに書いてあるドキュメントやブログで配布しているファイルの使用によって発生するいかなる損害に対してもこのブログの管理者は責任を負いません。使用する場合は自己責任のもとに使用してください。

Python

(VALL-E X)短い時間と少ないデータでテキストから好きな声で変換した音声を生成する AI を Windows パソコンにインストールする方法

更新日:

VALL-E X

VALL-E Xは、モノリンガルスピーカーの別の言語であっても、目に見えないスピーカーを音響プロンプトとしてわずか3秒間登録するだけで、高品質のパーソナライズされた音声を合成できます

インストール

/ WinPython仮想環境でAnaconda を使わない方法

ffmpegのダウンロードと展開ffmpeg-master-latest-win64-gpl.zip

Releases · BtbN/FFmpeg-Builds (github.com)

"D:\WinPython\ffmpeg"に展開します

"D:\WinPython#winpythonPrompt.bat"実行します

git clone https://github.com/Plachtaa/VALL-E-X.git

仮想環境を作成

@echo off
call %~dp0\scripts\env_for_icons.bat  %*
SET PATH=%PATH%;%WINPYDIRBASE%\PortableGit;%WINPYDIRBASE%\PortableGit\bin
SET PATH=%PATH%;%WINPYDIRBASE%\ffmpeg\bin
If not exist %WINPYDIRBASE%\content mkdir  %WINPYDIRBASE%\content 

set APP_NAME=VALL-E-X
set APP_DIR=%WINPYDIRBASE%\content\%APP_NAME%
echo %APP_DIR%
cd %APP_DIR%
if not defined VENV_DIR (set "VENV_DIR=%APP_DIR%\venv")
if EXIST %VENV_DIR% goto :activate_venv


::python.exe -m venv "%VENV_DIR%" 
python.exe -m venv "%VENV_DIR%" --system-site-packages 
if %ERRORLEVEL% == 0 goto :activate_venv
echo Unable to create venv 
goto :skip_venv

:activate_venv
call "%VENV_DIR%\Scripts\activate"
If  exist %WINPYDIRBASE%\content\%APP_NAME%\checkpoints goto :skip_cmd
cmd.exe /k
goto :skip_venv
:skip_cmd
python -X utf8 launch-ui.py
start http://127.0.0.1:7860/
:skip_venv

コマンドプロンプトを開きライブラリをインストール

pytorchがすでにインストールされて--system-site-packages を使って仮想環境を作った場合は不要です

https://pytorch.org/get-started/locally/

環境にあったものをWebサイトから確認して実行します

pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118

必要なライブラリーをインストール

pip install -r requirements.txt

起動

python -X utf8 launch-ui.py

2回目以降はVALL-E-X.batを起動してください

プロンプトとファイルを作ってから生成すると早く作成できます

You need to "Make prompt" first, and upload the encoded prompt (a .npz file)

Get a .npz file as the encoded audio prompt. Use it by "Infer with prompt"

-Python

Copyright© eightban's memo , 2024 All Rights Reserved Powered by STINGER.