Desktop EEG and regulation workspace built with Tauri 2, React, TypeScript, Rust, and a local Python music generation service.
/effect-evaluation): baseline/post scale pairing, improvement-rate verdicts, history review, and CSV/JSON report export.music-service.The /effect-evaluation page closes the emotion-regulation evaluation loop for a subject:
phase=baseline) — reuses the shared scale dialog.phase=post).(baseline - post) / baseline. All four dimensions (anxiety, worry, mood, energy) are scored so higher means worse, so this single formula applies to every dimension without inversion. The mean improvement rate at or above the 10% threshold (DEFAULT_IMPROVEMENT_THRESHOLD in src-tauri/src/scale_records.rs) marks the emotion as regulated effectively.Every completed scale submission is persisted to the SQLite scale_records table (in addition to the in-memory status cache), so runs survive restarts. The history tab reviews all completed baseline/post runs, and the export buttons write one run's report (JSON or CSV) or an all-subjects batch summary (CSV) to a user-chosen path through the native save dialog. CSV fields are escaped by hand (RFC 4180, BOM included for Excel); no CSV dependency is used.
pnpm tauri ....uv for music-service.stabilityai/stable-audio-3-small-music.cd D:\tauri-eeg
pnpm install
Set up the Python music service:
cd D:\tauri-eeg\music-service
uv sync
For RTX 50-series / CUDA 12.8 systems, install the CUDA dependency extra:
cd D:\tauri-eeg\music-service
uv sync --extra cu128
uv run python -c "import torch; print(torch.__version__, torch.version.cuda, torch.cuda.is_available())"
The Stable Audio model is downloaded through Hugging Face. To keep the model cache in a stable location on Windows:
[Environment]::SetEnvironmentVariable("HF_HOME", "D:\.hf-cache", "User")
Close and reopen PowerShell, your IDE, and the Tauri app after changing the user environment. For the current terminal session only:
$env:HF_HOME="D:\.hf-cache"
Verify login:
cd D:\tauri-eeg\music-service
uv run hf auth whoami
If needed:
uv run huggingface-cli login
Development frontend only:
cd D:\tauri-eeg
pnpm dev
Tauri desktop app:
cd D:\tauri-eeg
pnpm tauri dev
The Music page tries to start music-service automatically when generating a track. On first use, the model download and load can take longer than the app startup wait. If the app reports:
Music generation service did not become ready.
start the service manually once:
cd D:\tauri-eeg\music-service
$env:HF_HOME="D:\.hf-cache"
uv run python server.py
Keep that terminal open. In another terminal, check readiness:
curl http://127.0.0.1:8000/health
When the health response is ready, generate again from the Music page. The app reuses the running service at http://127.0.0.1:8000.
Notes:
flash_attn warnings are expected when Flash Attention is not installed; the service falls back without it.on_event is deprecated is a FastAPI deprecation warning and does not block generation.WinError 10048 means another service is already using port 8000; stop the old process or reuse it.sm_120, so use the cu128 extra.Current Windows paths:
User database:
C:\Users\<you>\AppData\Local\tauri-eeg\users.sqlite3
Generated music WAV files:
C:\Users\<you>\AppData\Roaming\com.tauri-eeg.app\music
Hugging Face model cache, if configured:
D:\.hf-cache\hub
Generated WAV history can be opened from the Music Player history button. Deleting a generated history item from the app also deletes its WAV file, limited to the app music output directory.
Frontend build:
pnpm build
Frontend tests:
pnpm test
Rust formatting and tests:
cd D:\tauri-eeg\src-tauri
cargo fmt --check
cargo test
Python music-service tests:
cd D:\tauri-eeg\music-service
uv run pytest
src/ React UI, auth, EEG, and music client code
src-tauri/ Tauri/Rust backend commands, SQLite, file handling
music-service/ FastAPI Stable Audio generation service
docs/superpowers/ Design specs and implementation plans
81 commits
TypeScript
58.0%
Rust
26.7%
CSS
10.7%
Python
3.8%
Desktop EEG and regulation workspace built with Tauri 2, React, TypeScript, Rust, and a local Python music generation service.
/effect-evaluation): baseline/post scale pairing, improvement-rate verdicts, history review, and CSV/JSON report export.music-service.The /effect-evaluation page closes the emotion-regulation evaluation loop for a subject:
phase=baseline) — reuses the shared scale dialog.phase=post).(baseline - post) / baseline. All four dimensions (anxiety, worry, mood, energy) are scored so higher means worse, so this single formula applies to every dimension without inversion. The mean improvement rate at or above the 10% threshold (DEFAULT_IMPROVEMENT_THRESHOLD in src-tauri/src/scale_records.rs) marks the emotion as regulated effectively.Every completed scale submission is persisted to the SQLite scale_records table (in addition to the in-memory status cache), so runs survive restarts. The history tab reviews all completed baseline/post runs, and the export buttons write one run's report (JSON or CSV) or an all-subjects batch summary (CSV) to a user-chosen path through the native save dialog. CSV fields are escaped by hand (RFC 4180, BOM included for Excel); no CSV dependency is used.
pnpm tauri ....uv for music-service.stabilityai/stable-audio-3-small-music.cd D:\tauri-eeg
pnpm install
Set up the Python music service:
cd D:\tauri-eeg\music-service
uv sync
For RTX 50-series / CUDA 12.8 systems, install the CUDA dependency extra:
cd D:\tauri-eeg\music-service
uv sync --extra cu128
uv run python -c "import torch; print(torch.__version__, torch.version.cuda, torch.cuda.is_available())"
The Stable Audio model is downloaded through Hugging Face. To keep the model cache in a stable location on Windows:
[Environment]::SetEnvironmentVariable("HF_HOME", "D:\.hf-cache", "User")
Close and reopen PowerShell, your IDE, and the Tauri app after changing the user environment. For the current terminal session only:
$env:HF_HOME="D:\.hf-cache"
Verify login:
cd D:\tauri-eeg\music-service
uv run hf auth whoami
If needed:
uv run huggingface-cli login
Development frontend only:
cd D:\tauri-eeg
pnpm dev
Tauri desktop app:
cd D:\tauri-eeg
pnpm tauri dev
The Music page tries to start music-service automatically when generating a track. On first use, the model download and load can take longer than the app startup wait. If the app reports:
Music generation service did not become ready.
start the service manually once:
cd D:\tauri-eeg\music-service
$env:HF_HOME="D:\.hf-cache"
uv run python server.py
Keep that terminal open. In another terminal, check readiness:
curl http://127.0.0.1:8000/health
When the health response is ready, generate again from the Music page. The app reuses the running service at http://127.0.0.1:8000.
Notes:
flash_attn warnings are expected when Flash Attention is not installed; the service falls back without it.on_event is deprecated is a FastAPI deprecation warning and does not block generation.WinError 10048 means another service is already using port 8000; stop the old process or reuse it.sm_120, so use the cu128 extra.Current Windows paths:
User database:
C:\Users\<you>\AppData\Local\tauri-eeg\users.sqlite3
Generated music WAV files:
C:\Users\<you>\AppData\Roaming\com.tauri-eeg.app\music
Hugging Face model cache, if configured:
D:\.hf-cache\hub
Generated WAV history can be opened from the Music Player history button. Deleting a generated history item from the app also deletes its WAV file, limited to the app music output directory.
Frontend build:
pnpm build
Frontend tests:
pnpm test
Rust formatting and tests:
cd D:\tauri-eeg\src-tauri
cargo fmt --check
cargo test
Python music-service tests:
cd D:\tauri-eeg\music-service
uv run pytest
src/ React UI, auth, EEG, and music client code
src-tauri/ Tauri/Rust backend commands, SQLite, file handling
music-service/ FastAPI Stable Audio generation service
docs/superpowers/ Design specs and implementation plans
81 commits
TypeScript
58.0%
Rust
26.7%
CSS
10.7%
Python
3.8%