fix: ElevenLabs voice_id is hardcoded, add ELEVENLABS_VOICE_ID and ELEVENLABS_LANGUAGE to settings
- Dominant language
- Python
- Stars
- 18.3k
- Forks
- 2.1k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 29
Description
## Bug Description
`application/tts/elevenlabs.py` hardcodes the ElevenLabs voice ID with no way to change it without editing source code:
```python
voice_id="nPczCjzI2devNBz1zQrb", # hardcoded, line 19
```
There is no `ELEVENLABS_VOICE_ID` key in `application/core/settings.py`. The local `lang = "en"` variable is also dead — assigned but only returned, never used to configure synthesis language. Every other ElevenLabs setting (`ELEVENLABS_API_KEY`) is env-configurable. The voice ID is the only exception.
## Expected Behavior
Operators should be able to set `ELEVENLABS_VOICE_ID` and `ELEVENLABS_LANGUAGE` via environment variables, consistent with how all other provider settings work.
## Proposed Fix
Add `ELEVENLABS_VOICE_ID: str = "nPczCjzI2devNBz1zQrb"` and `ELEVENLABS_LANGUAGE: str = "en"` to `Settings` (keeping existing values as defaults for backward compatibility) and update `elevenlabs.py` to read from settings.
Contributor guide
Research direction
Start with application/core/settings.py to see how provider settings are declared, then read application/tts/elevenlabs.py and trace the current voice ID and language values. Confirm that both environment variables use the stated backward-compatible defaults and that the ElevenLabs synthesis call reads them; run the relevant existing project tests if available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- ai, backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100