2025-12-25 18:48:23 -08:00
|
|
|
# -*- mode: python ; coding: utf-8 -*-
|
|
|
|
|
"""PyInstaller spec file for Local Transcription app."""
|
|
|
|
|
|
|
|
|
|
import sys
|
|
|
|
|
from pathlib import Path
|
2025-12-26 08:26:58 -08:00
|
|
|
import os
|
2025-12-25 18:48:23 -08:00
|
|
|
|
|
|
|
|
block_cipher = None
|
|
|
|
|
|
|
|
|
|
# Determine if we're on Windows
|
|
|
|
|
is_windows = sys.platform == 'win32'
|
|
|
|
|
|
2025-12-26 08:26:58 -08:00
|
|
|
# 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')
|
|
|
|
|
|
2025-12-25 18:48:23 -08:00
|
|
|
a = Analysis(
|
|
|
|
|
['main.py'],
|
|
|
|
|
pathex=[],
|
|
|
|
|
binaries=[],
|
|
|
|
|
datas=[
|
|
|
|
|
('config/default_config.yaml', 'config'),
|
2025-12-26 08:26:58 -08:00
|
|
|
(vad_assets_path, 'faster_whisper/assets'), # Include VAD model
|
2025-12-25 18:48:23 -08:00
|
|
|
],
|
|
|
|
|
hiddenimports=[
|
|
|
|
|
'PySide6.QtCore',
|
|
|
|
|
'PySide6.QtWidgets',
|
|
|
|
|
'PySide6.QtGui',
|
|
|
|
|
'faster_whisper',
|
|
|
|
|
'faster_whisper.transcribe',
|
|
|
|
|
'faster_whisper.vad',
|
|
|
|
|
'ctranslate2',
|
|
|
|
|
'sounddevice',
|
|
|
|
|
'noisereduce',
|
|
|
|
|
'webrtcvad',
|
|
|
|
|
'scipy',
|
|
|
|
|
'scipy.signal',
|
|
|
|
|
'numpy',
|
2025-12-26 10:34:11 -08:00
|
|
|
# FastAPI and dependencies
|
2025-12-25 18:48:23 -08:00
|
|
|
'fastapi',
|
2025-12-26 10:34:11 -08:00
|
|
|
'fastapi.routing',
|
|
|
|
|
'fastapi.responses',
|
|
|
|
|
'starlette',
|
|
|
|
|
'starlette.applications',
|
|
|
|
|
'starlette.routing',
|
|
|
|
|
'starlette.responses',
|
|
|
|
|
'starlette.websockets',
|
|
|
|
|
'starlette.middleware',
|
|
|
|
|
'starlette.middleware.cors',
|
|
|
|
|
'pydantic',
|
|
|
|
|
'pydantic.fields',
|
|
|
|
|
'pydantic.main',
|
|
|
|
|
'anyio',
|
|
|
|
|
'anyio._backends',
|
|
|
|
|
'anyio._backends._asyncio',
|
|
|
|
|
'sniffio',
|
|
|
|
|
# Uvicorn and dependencies
|
2025-12-25 18:48:23 -08:00
|
|
|
'uvicorn',
|
|
|
|
|
'uvicorn.logging',
|
|
|
|
|
'uvicorn.loops',
|
|
|
|
|
'uvicorn.loops.auto',
|
|
|
|
|
'uvicorn.protocols',
|
|
|
|
|
'uvicorn.protocols.http',
|
|
|
|
|
'uvicorn.protocols.http.auto',
|
2025-12-26 10:34:11 -08:00
|
|
|
'uvicorn.protocols.http.h11_impl',
|
2025-12-25 18:48:23 -08:00
|
|
|
'uvicorn.protocols.websockets',
|
|
|
|
|
'uvicorn.protocols.websockets.auto',
|
2025-12-26 10:34:11 -08:00
|
|
|
'uvicorn.protocols.websockets.wsproto_impl',
|
2025-12-25 18:48:23 -08:00
|
|
|
'uvicorn.lifespan',
|
|
|
|
|
'uvicorn.lifespan.on',
|
2025-12-26 10:34:11 -08:00
|
|
|
'h11',
|
|
|
|
|
'websockets',
|
|
|
|
|
'websockets.legacy',
|
|
|
|
|
'websockets.legacy.server',
|
|
|
|
|
# Requests (for server sync)
|
|
|
|
|
'requests',
|
|
|
|
|
'urllib3',
|
|
|
|
|
'certifi',
|
|
|
|
|
'charset_normalizer',
|
2025-12-25 18:48:23 -08:00
|
|
|
],
|
|
|
|
|
hookspath=[],
|
|
|
|
|
hooksconfig={},
|
|
|
|
|
runtime_hooks=[],
|
|
|
|
|
excludes=[],
|
|
|
|
|
win_no_prefer_redirects=False,
|
|
|
|
|
win_private_assemblies=False,
|
|
|
|
|
cipher=block_cipher,
|
|
|
|
|
noarchive=False,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
|
|
|
|
|
|
|
|
|
|
exe = EXE(
|
|
|
|
|
pyz,
|
|
|
|
|
a.scripts,
|
|
|
|
|
[],
|
|
|
|
|
exclude_binaries=True,
|
|
|
|
|
name='LocalTranscription',
|
|
|
|
|
debug=False,
|
|
|
|
|
bootloader_ignore_signals=False,
|
|
|
|
|
strip=False,
|
|
|
|
|
upx=True,
|
|
|
|
|
console=True, # Set to False to hide console window
|
|
|
|
|
disable_windowed_traceback=False,
|
|
|
|
|
argv_emulation=False,
|
|
|
|
|
target_arch=None,
|
|
|
|
|
codesign_identity=None,
|
|
|
|
|
entitlements_file=None,
|
|
|
|
|
icon=None, # Add icon file path here if you have one
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
coll = COLLECT(
|
|
|
|
|
exe,
|
|
|
|
|
a.binaries,
|
|
|
|
|
a.zipfiles,
|
|
|
|
|
a.datas,
|
|
|
|
|
strip=False,
|
|
|
|
|
upx=True,
|
|
|
|
|
upx_exclude=[],
|
|
|
|
|
name='LocalTranscription',
|
|
|
|
|
)
|