#2562·DocsGPT

fix: ElevenLabs voice_id is hardcoded, add ELEVENLABS_VOICE_ID and ELEVENLABS_LANGUAGE to settings

Author: immuhammadfurqanCreated Jun 24, 2026Updated Jul 30, 2026

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.