Skip to content

Commit 443fb2a

Browse files
committed
fix(backend): bundle faster_whisper VAD model in PyInstaller build
Add faster_whisper/assets directory to PyInstaller datas to include silero_vad_v6.onnx model required for voice activity detection during audio transcription.
1 parent a5711b4 commit 443fb2a

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

backend/think.spec

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ elif sys.platform == 'win32':
1313
else:
1414
sqlite_vec_ext = sqlite_vec_dir / 'vec0.so'
1515

16+
# Find faster_whisper assets (VAD model for speech detection)
17+
import faster_whisper
18+
faster_whisper_dir = Path(faster_whisper.__file__).parent
19+
faster_whisper_assets = faster_whisper_dir / 'assets'
20+
1621
# SQLCipher library - only needed on macOS/Linux
1722
# Note: rotki-pysqlcipher3 bundles SQLCipher statically on Windows
1823
sqlcipher_lib = None
@@ -32,11 +37,15 @@ if sqlcipher_lib and os.path.exists(sqlcipher_lib):
3237
if sqlite_vec_ext.exists():
3338
binaries.append((str(sqlite_vec_ext), 'sqlite_vec'))
3439

40+
datas = []
41+
if faster_whisper_assets.exists():
42+
datas.append((str(faster_whisper_assets), 'faster_whisper/assets'))
43+
3544
a = Analysis(
3645
['run.py'],
3746
pathex=[SPECPATH],
3847
binaries=binaries,
39-
datas=[],
48+
datas=datas,
4049
hiddenimports=[
4150
'app',
4251
'app.main',

0 commit comments

Comments
 (0)