From c968eb8a48458cf999b976ef3f6210414861e1cc Mon Sep 17 00:00:00 2001 From: jknapp Date: Sun, 28 Dec 2025 20:28:11 -0800 Subject: [PATCH] Fix RealtimeSTT warmup file and PyTorch CUDA version mismatch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed two build/runtime issues: 1. Windows: Missing warmup_audio.wav file from RealtimeSTT - Added RealtimeSTT to collect_data_files() in spec - Ensures warmup_audio.wav and other RealtimeSTT data files are bundled - Fixes: soundfile.LibsndfileError opening warmup_audio.wav 2. Linux: PyTorch/TorchAudio CUDA version mismatch (12.1 vs 12.4) - Added torchaudio>=2.0.0 explicitly to dependencies - Ensures torchaudio comes from pytorch-cu121 index (same as torch) - Previously RealtimeSTT was pulling torchaudio from PyPI with CUDA 12.4 - Fixes: RuntimeError about CUDA version mismatch Both packages now correctly use the pytorch-cu121 index via tool.uv.sources configuration, ensuring matching CUDA versions. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- local-transcription.spec | 2 +- pyproject.toml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/local-transcription.spec b/local-transcription.spec index 337dab9..ac593c8 100644 --- a/local-transcription.spec +++ b/local-transcription.spec @@ -122,7 +122,7 @@ for package in ['fastapi', 'starlette', 'pydantic', 'pydantic_core', 'anyio', 'u print(f" ⚠ Warning: Could not collect {package}: {e}") # Collect data files for packages that need them -for package in ['fastapi', 'starlette', 'pydantic', 'uvicorn']: +for package in ['fastapi', 'starlette', 'pydantic', 'uvicorn', 'RealtimeSTT']: try: data_files = collect_data_files(package) if data_files: diff --git a/pyproject.toml b/pyproject.toml index 0f08e9d..1b8701d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,6 +16,7 @@ dependencies = [ "sounddevice>=0.4.6", "scipy>=1.10.0", "torch>=2.0.0", + "torchaudio>=2.0.0", # Must match torch CUDA version (from pytorch-cu121 index) "PySide6>=6.6.0", # RealtimeSTT for advanced VAD-based transcription "RealtimeSTT>=0.3.0",