chore: save local changes before pull

This commit is contained in:
beo3000 2026-03-19 20:20:54 +01:00
parent e1a3eba05a
commit 96c3cad097
3 changed files with 11 additions and 5 deletions

View File

@ -3,4 +3,4 @@
"model": "medium",
"language": "de",
"sample_rate": 16000
}
}

View File

@ -231,11 +231,17 @@ def stop_and_transcribe():
rms = float(np.sqrt(np.mean(audio ** 2)))
print(f"Audio: {duration:.1f}s RMS: {rms:.5f}", flush=True)
if duration < 0.3 or rms < 0.0005:
if duration < 0.3 or rms < 0.0001:
print("Too short or silent — skipped.", flush=True)
set_state(AppState.IDLE)
return
# Normalize to target RMS so Whisper gets consistent signal level
target_rms = 0.05
if rms > 0:
audio = audio * (target_rms / rms)
audio = np.clip(audio, -1.0, 1.0)
lang = config["language"] if config["language"] else None
prompt = get_initial_prompt()
segments, _ = model.transcribe(

View File

@ -6,11 +6,11 @@ py -3.13 -m venv .venv-windows
set "VENV=%~dp0.venv-windows"
echo Installing dependencies...
"%VENV%\Scripts\pip" install --upgrade pip
"%VENV%\Scripts\pip" install -r requirements.txt
"%VENV%\Scripts\python.exe" -m pip install --upgrade pip
"%VENV%\Scripts\python.exe" -m pip install -r requirements.txt
echo Installing CUDA 12 DLLs (required for GPU acceleration)...
"%VENV%\Scripts\pip" install -r requirements-cuda.txt
"%VENV%\Scripts\python.exe" -m pip install -r requirements-cuda.txt
echo.
echo Done. Run start.bat to launch.