Spaces:
Paused
Download docs/desktop-packaging.md from nathycodes/presentercoach: direct link, hf CLI and curl.
- Browser
- Download file 4.11 kB
-
https://huggingface.co/spaces/nathycodes/presentercoach/resolve/main/docs/desktop-packaging.md
- Command line
-
hf download hf://spaces/nathycodes/presentercoach/docs/desktop-packaging.md
-
curl -L -o desktop-packaging.md https://huggingface.co/spaces/nathycodes/presentercoach/resolve/main/docs/desktop-packaging.md
Desktop Packaging Path
This repo still supports a desktop-oriented runtime foundation, but Docker is the default and recommended path. The packaging target for the desktop foundation remains a future macOS .app, which can then be wrapped in a .dmg.
Runtime split
Desktop mode runs the same product in three layers:
- A local FastAPI process using SQLite and local file storage
- A local Next.js standalone server
- A native desktop shell, ideally Tauri, which opens the local web UI
The shell is not the product logic. It is only the native wrapper around the local web and API processes.
MLX Audio runtime
Desktop ASR can use mlx-audio directly inside the local API process, but it is no longer the default path.
- Supported target: macOS on Apple Silicon
- Default desktop backend:
TRANSCRIPTION_BACKEND=server - Default MLX model:
mlx-community/parakeet-tdt-0.6b-v3 - MLX models are downloaded manually from the app UI into the desktop app data directory through
huggingface_hubif you explicitly switch to theMLX Audiobackend
Docker and the Linux API container remain the primary supported runtime and use the server transcription backend.
What is in the repo now
infra/scripts/desktop_api.pyStarts the API in desktop mode with:- SQLite in the user's application data directory
- local recording storage in the same application data root
- local-only auth enabled by default
infra/scripts/prepare_desktop_web.mjsPrepares the Next standalone output for local desktop serving by copying static and public assets into the standalone bundle.infra/scripts/desktop_web.mjsRuns the prepared standalone Next server against the local desktop API.infra/scripts/desktop_runtime.mjsOrchestrates both desktop processes together.apps/api/requirements-desktop.txtDesktop runtime dependencies without the Postgres-specific dependency chain.
Local desktop runtime
Docker remains the recommended way to run the app:
cd video_record
docker compose up --build
Use the desktop runtime only if you specifically need the local standalone workflow.
Build the desktop-ready web bundle:
cd video_record
npm run desktop:build:web
Start the desktop API only:
cd video_record
python3 -m venv .venv-desktop
source .venv-desktop/bin/activate
pip install -r apps/api/requirements-desktop.txt
npm run desktop:start:api
Start the prepared standalone web bundle:
cd video_record
npm run desktop:start:web
Or run both together after the API environment is installed:
cd video_record
npm run desktop:start
Desktop data location
Desktop mode writes to the per-user application data directory:
- macOS:
~/Library/Application Support/Speech-Machine - Windows:
%APPDATA%\\Speech-Machine - Linux:
$XDG_DATA_HOME/sparks-coachor~/.local/share/sparks-coach
Inside that directory:
data/video_coach.dbstorage/models/hf/<sanitized-repo-id>/
Downloaded MLX Audio models are not stored in the global Hugging Face cache for the app flow. The app keeps its own local model snapshots under models/hf/, and the MLX backend only treats a model as available after a successful app-managed download.
Environment overrides
You can seed desktop settings from .env.desktop.example.
Useful variables:
TRANSCRIPTION_BACKENDDESKTOP_API_PORTDESKTOP_WEB_PORTNEXT_PUBLIC_API_URLLOCAL_ADMIN_EMAILLOCAL_ADMIN_PASSWORDWHISPER_MODELWHISPER_DEVICEMLX_AUDIO_MODEL
Next packaging step
The remaining step to reach a real .dmg is a native shell that launches these two local runtimes and packages them as a Mac app bundle.
Recommended implementation:
- Freeze the desktop API launcher into a bundled sidecar binary
- Bundle the standalone web server with its Node runtime
- Add a Tauri shell that starts both sidecars on launch
- Sign and notarize the generated
.app - Wrap the
.appin a.dmg
This keeps the existing product code mostly intact while moving the installer experience to a proper desktop model.