Adding include_language_detection to Elevenlabs Realtime STT

Adding a param to the config while connecting to the session
This commit is contained in:
Mayur Sirwani
2025-12-09 18:04:08 -08:00
committed by mayurdd
parent c422588071
commit 67401a275b

View File

@@ -427,6 +427,7 @@ class ElevenLabsRealtimeSTTService(WebsocketSTTService):
min_silence_duration_ms: Optional[int] = None
include_timestamps: bool = False
enable_logging: bool = False
include_language_detection: bool = False
def __init__(
self,
@@ -640,6 +641,9 @@ class ElevenLabsRealtimeSTTService(WebsocketSTTService):
if self._params.enable_logging:
params.append(f"enable_logging={str(self._params.enable_logging).lower()}")
if self._params.include_language_detection:
params.append(f"include_language_detection={str(self._params.include_language_detection).lower()}")
# Add VAD parameters if using VAD commit strategy and values are specified
if self._params.commit_strategy == CommitStrategy.VAD:
if self._params.vad_silence_threshold_secs is not None: