Refactor app to speech-only transcription tool

Remove image generation, text-to-speech, and chat features.
Keep speech transcription with Whisper.cpp, model manager, and settings.
Support multiple audio formats (WAV, MP3, M4A, OGG, FLAC, WebM, AAC)
via ffmpeg transcoding. Single-call API: upload → transcribe → download
as txt/json/md.
This commit is contained in:
truetype committed 2026-09-16 20:17:09 +02:00
1 parent 313b994c9b
commit 76946f8594
14 files changed
+671 -10753

No files matched your search

+19 -40
View File
@@ -1,5 +1,5 @@
@echo off
title Uncensored AI Studio
title Speech Transcriber
cd /d "%~dp0"
set APP=%~dp0app
@@ -7,18 +7,11 @@ set NODE=%APP%\tools\node-win\node.exe
set NPM=%APP%\tools\node-win\npm.cmd
set DIST=%APP%\dist\index.html
set SETUP=%~dp0scripts\setup\setup.ps1
set CUDA_BACKEND=%APP%\backend\win\cuda\sd-cuda.exe
set VULKAN_BACKEND=%APP%\backend\win\vulkan\sd-vulkan.exe
set LLM_CUDA_BACKEND=%APP%\llm-backend\win\cuda\llama-server.exe
set LLM_HIP_BACKEND=%APP%\llm-backend\win\hip\llama-server.exe
set LLM_VULKAN_BACKEND=%APP%\llm-backend\win\vulkan\llama-server.exe
set LLM_SYCL_BACKEND=%APP%\llm-backend\win\sycl\llama-server.exe
set LLM_CPU_BACKEND=%APP%\llm-backend\win\cpu\llama-server.exe
set SPEECH_BACKEND=%APP%\speech-backend\win\cpu\whisper-cli.exe
set TTS_RUNTIME=%APP%\tts-runtime\node_modules\kokoro-js
set SPEECH_BACKEND_VULKAN=%APP%\speech-backend\win\vulkan\whisper-cli.exe
set SPEECH_BACKEND_CUDA=%APP%\speech-backend\win\cuda\whisper-cli.exe
set SERVE=%~dp0scripts\server\serve.cjs
if "%FRONTEND_PORT%"=="" set FRONTEND_PORT=1420
if "%LLM_PORT%"=="" set LLM_PORT=10086
set SETUP_REASON=
set SETUP_MODE=Repair
@@ -36,44 +29,35 @@ if not exist "%DIST%" (
set SETUP_REASON=Frontend build is missing.
goto :run_setup
)
if not exist "%LLM_CUDA_BACKEND%" if not exist "%LLM_HIP_BACKEND%" if not exist "%LLM_VULKAN_BACKEND%" if not exist "%LLM_SYCL_BACKEND%" if not exist "%LLM_CPU_BACKEND%" (
set SETUP_REASON=llama.cpp text backend is missing.
goto :run_setup
)
if not exist "%SPEECH_BACKEND%" (
set SETUP_REASON=whisper.cpp speech backend is missing.
goto :run_setup
if not exist "%SPEECH_BACKEND_VULKAN%" (
if not exist "%SPEECH_BACKEND_CUDA%" (
set SETUP_REASON=whisper.cpp speech backend is missing.
goto :run_setup
)
)
)
if not exist "%TTS_RUNTIME%" (
set SETUP_REASON=Kokoro text-to-speech runtime is missing.
goto :run_setup
)
if exist "%CUDA_BACKEND%" goto :launch
if exist "%VULKAN_BACKEND%" goto :launch
set SETUP_REASON=No backend binary is installed.
goto :run_setup
goto :launch
:run_setup
echo.
echo ============================================================
echo UNCENSORED AI STUDIO ^| %SETUP_MODE%
echo SPEECH TRANSCRIBER ^| %SETUP_MODE%
echo ============================================================
echo.
if "%SETUP_MODE%"=="First-Time Setup" (
echo This looks like your first run. Setting up automatically...
) else (
echo Uncensored AI Studio needs a quick repair before launch.
echo Speech Transcriber needs a quick repair before launch.
)
if not "%SETUP_REASON%"=="" echo Reason: %SETUP_REASON%
echo Models are not downloaded during setup. Download or import them in the app.
echo Whisper models are not downloaded during setup. Download or import them in the app.
echo.
echo Press any key to continue, or Ctrl+C to cancel.
pause >nul
:: Clear old frontend and backend server processes before setup so app/tools/node-win can be replaced
for /f "tokens=5" %%a in ('netstat -aon 2^>nul ^| findstr ":%FRONTEND_PORT% "') do taskkill /f /pid %%a >nul 2>nul
for /f "tokens=5" %%a in ('netstat -aon 2^>nul ^| findstr ":8080 "') do taskkill /f /pid %%a >nul 2>nul
for /f "tokens=5" %%a in ('netstat -aon 2^>nul ^| findstr ":%LLM_PORT% "') do taskkill /f /pid %%a >nul 2>nul
powershell -ExecutionPolicy Bypass -File "%SETUP%"
if errorlevel 1 (
@@ -90,18 +74,16 @@ goto :launch
:launch
echo.
echo ============================================================
echo UNCENSORED AI STUDIO ^| Launching...
echo SPEECH TRANSCRIBER ^| Launching...
echo ============================================================
echo.
:: Clear frontend and backend ports to prevent address conflicts.
echo Clearing frontend port %FRONTEND_PORT%, backend port 8080, and text port %LLM_PORT%...
:: Clear frontend port to prevent address conflicts.
echo Clearing frontend port %FRONTEND_PORT%...
for /f "tokens=5" %%a in ('netstat -aon 2^>nul ^| findstr ":%FRONTEND_PORT% "') do taskkill /f /pid %%a >nul 2>nul
for /f "tokens=5" %%a in ('netstat -aon 2^>nul ^| findstr ":8080 "') do taskkill /f /pid %%a >nul 2>nul
for /f "tokens=5" %%a in ('netstat -aon 2^>nul ^| findstr ":%LLM_PORT% "') do taskkill /f /pid %%a >nul 2>nul
:: Start frontend server + backend manager (serve.cjs manages sd-vulkan.exe)
echo Starting Uncensored AI Studio...
:: Start frontend server + backend manager
echo Starting Speech Transcriber...
echo Opening browser at http://localhost:%FRONTEND_PORT%...
start /b cmd /c "timeout /t 2 >nul && start http://localhost:%FRONTEND_PORT%"
@@ -109,10 +91,7 @@ echo.
echo ============================================================
echo Running!
echo Web UI: http://localhost:%FRONTEND_PORT%
echo GPU API: Auto-selected by the app (starts at 8080)
echo Text API: Starts when a GGUF model is loaded (port %LLM_PORT%)
echo Speech: Managed locally by the app
echo TTS: Managed locally by the app
echo Speech: Managed locally by the app (whisper.cpp)
echo.
echo Press Ctrl+C in this window to stop all services.
echo ============================================================