Fix: Bundle Silero VAD model with PyInstaller

Fixed PyInstaller build error where the Voice Activity Detection (VAD)
model was missing from the compiled executable.

Changes:
- Added faster_whisper/assets folder to PyInstaller datas
- Includes silero_vad_v6.onnx (1.2MB) in the build
- Resolves ONNXRuntimeError on transcription start

Error fixed:
[ONNXRuntimeError] : 3 : NO_SUCHFILE : Load model from
.../faster_whisper/assets/silero_vad_v6.onnx failed: File doesn't exist

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-12-26 08:26:58 -08:00
parent 472233aec4
commit 003c27c8d5

View File

@@ -3,18 +3,25 @@
import sys
from pathlib import Path
import os
block_cipher = None
# Determine if we're on Windows
is_windows = sys.platform == 'win32'
# Find faster_whisper assets folder
import faster_whisper
faster_whisper_path = os.path.dirname(faster_whisper.__file__)
vad_assets_path = os.path.join(faster_whisper_path, 'assets')
a = Analysis(
['main.py'],
pathex=[],
binaries=[],
datas=[
('config/default_config.yaml', 'config'),
(vad_assets_path, 'faster_whisper/assets'), # Include VAD model
],
hiddenimports=[
'PySide6.QtCore',