teddybear082 commited on
Commit ·
46e5c09
1
Parent(s): 84d8064
make adding voice directory optional to use built in voices with bat file
Browse files- run_pocket_tts_server_exe.bat +14 -15
run_pocket_tts_server_exe.bat
CHANGED
|
@@ -5,10 +5,11 @@ title Pocket TTS Server Launcher (EXE)
|
|
| 5 |
|
| 6 |
echo.
|
| 7 |
echo ========================================================
|
| 8 |
-
echo
|
| 9 |
-
echo
|
| 10 |
echo ========================================================
|
| 11 |
echo.
|
|
|
|
| 12 |
:: 0. Hugging Face Authentication
|
| 13 |
set "HF_TOKEN=your_token_here_if_you_want_to_hardcode_it"
|
| 14 |
if "%HF_TOKEN%"=="your_token_here_if_you_want_to_hardcode_it" (
|
|
@@ -40,21 +41,19 @@ set /p "INPUT_MODEL=Model Path/Variant (Optional, default=built-in): "
|
|
| 40 |
if not "%INPUT_MODEL%"=="" set "MODEL_PATH=--model_path ^"%INPUT_MODEL%^""
|
| 41 |
|
| 42 |
:: 4. Voices Directory
|
| 43 |
-
|
| 44 |
-
set
|
|
|
|
| 45 |
|
| 46 |
-
if "%INPUT_VOICES%"=="" (
|
| 47 |
-
:: If user hits ENTER, use the local folder path
|
| 48 |
-
set "VOICES_DIR=--voices_dir ^"!DEFAULT_VOICES!^""
|
| 49 |
-
) else (
|
| 50 |
-
:: If user types a path, use that instead
|
| 51 |
set "VOICES_DIR=--voices_dir ^"%INPUT_VOICES%^""
|
| 52 |
)
|
| 53 |
|
| 54 |
:: 5. Streaming Default
|
| 55 |
-
|
| 56 |
-
set
|
| 57 |
-
|
|
|
|
| 58 |
|
| 59 |
echo.
|
| 60 |
echo ========================================================
|
|
@@ -62,8 +61,8 @@ echo Starting Pocket TTS Server (EXE)...
|
|
| 62 |
echo Host: %HOST%
|
| 63 |
echo Port: %PORT%
|
| 64 |
if defined MODEL_PATH echo Model: %MODEL_PATH%
|
| 65 |
-
if defined VOICES_DIR echo Voices: %VOICES_DIR%
|
| 66 |
-
if defined STREAM_ARG echo Streaming: Enabled
|
| 67 |
echo ========================================================
|
| 68 |
echo.
|
| 69 |
|
|
@@ -79,4 +78,4 @@ if %ERRORLEVEL% NEQ 0 (
|
|
| 79 |
echo.
|
| 80 |
echo [ERROR] Server exited with error code %ERRORLEVEL%.
|
| 81 |
pause
|
| 82 |
-
)
|
|
|
|
| 5 |
|
| 6 |
echo.
|
| 7 |
echo ========================================================
|
| 8 |
+
echo Pocket TTS OpenAI Streaming Server Launcher
|
| 9 |
+
echo (Standalone EXE)
|
| 10 |
echo ========================================================
|
| 11 |
echo.
|
| 12 |
+
|
| 13 |
:: 0. Hugging Face Authentication
|
| 14 |
set "HF_TOKEN=your_token_here_if_you_want_to_hardcode_it"
|
| 15 |
if "%HF_TOKEN%"=="your_token_here_if_you_want_to_hardcode_it" (
|
|
|
|
| 41 |
if not "%INPUT_MODEL%"=="" set "MODEL_PATH=--model_path ^"%INPUT_MODEL%^""
|
| 42 |
|
| 43 |
:: 4. Voices Directory
|
| 44 |
+
:: Changed: Now remains empty if the user hits ENTER.
|
| 45 |
+
set "VOICES_DIR="
|
| 46 |
+
set /p "INPUT_VOICES=Voices Directory (Optional, leave blank to skip): "
|
| 47 |
|
| 48 |
+
if not "%INPUT_VOICES%"=="" (
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
set "VOICES_DIR=--voices_dir ^"%INPUT_VOICES%^""
|
| 50 |
)
|
| 51 |
|
| 52 |
:: 5. Streaming Default
|
| 53 |
+
:: Changed: Defaults to ON. Only unsets if the user types 'N'.
|
| 54 |
+
set "STREAM_ARG=--stream"
|
| 55 |
+
set /p "INPUT_STREAM=Enable Streaming? (Y/N) [Y]: "
|
| 56 |
+
if /i "%INPUT_STREAM%"=="N" set "STREAM_ARG="
|
| 57 |
|
| 58 |
echo.
|
| 59 |
echo ========================================================
|
|
|
|
| 61 |
echo Host: %HOST%
|
| 62 |
echo Port: %PORT%
|
| 63 |
if defined MODEL_PATH echo Model: %MODEL_PATH%
|
| 64 |
+
if defined VOICES_DIR (echo Voices: %VOICES_DIR%) else (echo Voices: Default/None)
|
| 65 |
+
if defined STREAM_ARG (echo Streaming: Enabled) else (echo Streaming: Disabled)
|
| 66 |
echo ========================================================
|
| 67 |
echo.
|
| 68 |
|
|
|
|
| 78 |
echo.
|
| 79 |
echo [ERROR] Server exited with error code %ERRORLEVEL%.
|
| 80 |
pause
|
| 81 |
+
)
|