-
Notifications
You must be signed in to change notification settings - Fork 883
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #266 from Huanshere/new_tts
v2.0 New tts
- Loading branch information
Showing
45 changed files
with
2,016 additions
and
1,116 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -170,4 +170,5 @@ config.backup.yaml | |
|
||
# runtime | ||
runtime/ | ||
dev/ | ||
dev/ | ||
installer_files/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
@echo off | ||
|
||
cd /D "%~dp0" | ||
|
||
set PATH=%PATH%;%SystemRoot%\system32 | ||
|
||
echo "%CD%"| findstr /C:" " >nul && echo This script relies on Miniconda which can not be silently installed under a path with spaces. && goto end | ||
|
||
@rem fix failed install when installing to a separate drive | ||
set TMP=%cd%\installer_files | ||
set TEMP=%cd%\installer_files | ||
|
||
@rem config | ||
set INSTALL_DIR=%cd%\installer_files | ||
set CONDA_ROOT_PREFIX=%cd%\installer_files\conda | ||
set INSTALL_ENV_DIR=%cd%\installer_files\env | ||
set MINICONDA_DOWNLOAD_URL=https://repo.anaconda.com/miniconda/Miniconda3-py310_23.1.0-1-Windows-x86_64.exe | ||
set conda_exists=F | ||
|
||
@rem figure out whether git and conda needs to be installed | ||
call "%CONDA_ROOT_PREFIX%\_conda.exe" --version >nul 2>&1 | ||
if "%ERRORLEVEL%" EQU "0" set conda_exists=T | ||
|
||
@rem (if necessary) install git and conda into a contained environment | ||
@rem download conda | ||
if "%conda_exists%" == "F" ( | ||
echo Downloading Miniconda from %MINICONDA_DOWNLOAD_URL% to %INSTALL_DIR%\miniconda_installer.exe | ||
|
||
mkdir "%INSTALL_DIR%" | ||
call curl -Lk "%MINICONDA_DOWNLOAD_URL%" > "%INSTALL_DIR%\miniconda_installer.exe" || ( echo. && echo Miniconda failed to download. && goto end ) | ||
|
||
echo Installing Miniconda to %CONDA_ROOT_PREFIX% | ||
start /wait "" "%INSTALL_DIR%\miniconda_installer.exe" /InstallationType=JustMe /NoShortcuts=1 /AddToPath=0 /RegisterPython=0 /NoRegistry=1 /S /D=%CONDA_ROOT_PREFIX% | ||
|
||
@rem test the conda binary | ||
echo Miniconda version: | ||
call "%CONDA_ROOT_PREFIX%\_conda.exe" --version || ( echo. && echo Miniconda not found. && goto end ) | ||
) | ||
|
||
@rem create the installer env | ||
if not exist "%INSTALL_ENV_DIR%" ( | ||
echo Packages to install: python=3.10.0 requests rich ruamel.yaml | ||
call "%CONDA_ROOT_PREFIX%\_conda.exe" create --no-shortcuts -y -k --prefix "%INSTALL_ENV_DIR%" python=3.10.0 requests rich "ruamel.yaml" || ( echo. && echo Conda environment creation failed. && goto end ) | ||
) | ||
|
||
@rem check if conda environment was actually created | ||
if not exist "%INSTALL_ENV_DIR%\python.exe" ( echo. && echo Conda environment is empty. && goto end ) | ||
|
||
@rem environment isolation | ||
set PYTHONNOUSERSITE=1 | ||
set PYTHONPATH= | ||
set PYTHONHOME= | ||
@rem ! may cause error if we use cudnn on windows | ||
set "CUDA_PATH=%INSTALL_ENV_DIR%" | ||
set "CUDA_HOME=%CUDA_PATH%" | ||
|
||
@rem activate installer env | ||
call "%CONDA_ROOT_PREFIX%\condabin\conda.bat" activate "%INSTALL_ENV_DIR%" || ( echo. && echo Miniconda hook not found. && goto end ) | ||
|
||
@rem Run pip setup | ||
call python pip_setup.py | ||
|
||
echo. | ||
echo Done! | ||
|
||
:end | ||
pause |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,24 @@ | ||
@echo off | ||
cd /d %~dp0.. | ||
|
||
if exist runtime ( | ||
echo Using runtime folder... | ||
runtime\python.exe batch\utils\batch_processor.py | ||
) else ( | ||
echo Runtime folder not found. Using conda environment... | ||
call conda activate videolingo | ||
python batch\utils\batch_processor.py | ||
call conda deactivate | ||
) | ||
cd /D "%~dp0" | ||
cd .. | ||
|
||
@rem 设置环境变量 | ||
set INSTALL_DIR=%cd%\installer_files | ||
set CONDA_ROOT_PREFIX=%cd%\installer_files\conda | ||
set INSTALL_ENV_DIR=%cd%\installer_files\env | ||
|
||
@rem 环境隔离设置 | ||
set PYTHONNOUSERSITE=1 | ||
set PYTHONPATH= | ||
set PYTHONHOME= | ||
set "CUDA_PATH=%INSTALL_ENV_DIR%" | ||
set "CUDA_HOME=%CUDA_PATH%" | ||
|
||
@rem 激活conda环境 | ||
call "%CONDA_ROOT_PREFIX%\condabin\conda.bat" activate "%INSTALL_ENV_DIR%" || ( echo. && echo Conda environment not found && goto end ) | ||
|
||
@rem 运行批处理脚本 | ||
call python batch\utils\batch_processor.py | ||
|
||
:end | ||
pause |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.