Fix default voice to use server configuration

Changed voice field in NotifyRequest from hardcoded default to None,
allowing the route handler to use settings.default_voice from .env.
Added EnvironmentFile directive to systemd service for reliable config loading.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Cal Corum 2025-12-19 00:35:12 -06:00
parent 5cd0b5a223
commit 7cc2148370
2 changed files with 4 additions and 3 deletions

View File

@ -30,11 +30,11 @@ class NotifyRequest(BaseModel):
),
]
voice: Annotated[
str,
str | None,
Field(
default="en_US-lessac-medium",
default=None,
pattern=r"^[\w-]+$",
description="Piper voice model name",
description="Piper voice model name (uses server default if not specified)",
),
]
rate: Annotated[

View File

@ -7,6 +7,7 @@ After=network.target sound.target
Type=simple
WorkingDirectory=/mnt/NV2/Development/voice-server
Environment=PATH=/mnt/NV2/Development/voice-server/.venv/bin:/usr/bin:/bin
EnvironmentFile=/mnt/NV2/Development/voice-server/.env
ExecStart=/mnt/NV2/Development/voice-server/.venv/bin/uvicorn app.main:app --host 0.0.0.0 --port 8888
Restart=on-failure
RestartSec=5