chore: save local changes before pull
This commit is contained in:
parent
e1a3eba05a
commit
96c3cad097
|
|
@ -231,11 +231,17 @@ def stop_and_transcribe():
|
||||||
rms = float(np.sqrt(np.mean(audio ** 2)))
|
rms = float(np.sqrt(np.mean(audio ** 2)))
|
||||||
print(f"Audio: {duration:.1f}s RMS: {rms:.5f}", flush=True)
|
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)
|
print("Too short or silent — skipped.", flush=True)
|
||||||
set_state(AppState.IDLE)
|
set_state(AppState.IDLE)
|
||||||
return
|
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
|
lang = config["language"] if config["language"] else None
|
||||||
prompt = get_initial_prompt()
|
prompt = get_initial_prompt()
|
||||||
segments, _ = model.transcribe(
|
segments, _ = model.transcribe(
|
||||||
|
|
|
||||||
|
|
@ -6,11 +6,11 @@ py -3.13 -m venv .venv-windows
|
||||||
|
|
||||||
set "VENV=%~dp0.venv-windows"
|
set "VENV=%~dp0.venv-windows"
|
||||||
echo Installing dependencies...
|
echo Installing dependencies...
|
||||||
"%VENV%\Scripts\pip" install --upgrade pip
|
"%VENV%\Scripts\python.exe" -m pip install --upgrade pip
|
||||||
"%VENV%\Scripts\pip" install -r requirements.txt
|
"%VENV%\Scripts\python.exe" -m pip install -r requirements.txt
|
||||||
|
|
||||||
echo Installing CUDA 12 DLLs (required for GPU acceleration)...
|
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.
|
||||||
echo Done. Run start.bat to launch.
|
echo Done. Run start.bat to launch.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue