diff --git a/src/agents/multi_user_transcriber.py b/src/agents/multi_user_transcriber.py index f885406d..c1370fa0 100644 --- a/src/agents/multi_user_transcriber.py +++ b/src/agents/multi_user_transcriber.py @@ -49,9 +49,7 @@ def create_stt_provider(): elif STT_PROVIDER == "kyutai": _stt_instance = kyutai.STT(base_url=os.getenv("KYUTAI_STT_BASE_URL")) elif STT_PROVIDER == "voxtral-vllm": - # The plugin resolves base_url / model / api_key from the environment - # itself (with sensible defaults). Passing os.getenv(...) directly would - # forward an explicit None for unset vars, which defeats that fallback. + # The plugin resolves base_url / model / api_key from the environment. _stt_instance = voxtral_vllm_stt.STT() else: raise ValueError(f"Unknown STT_PROVIDER: {STT_PROVIDER}") diff --git a/src/agents/pyproject.toml b/src/agents/pyproject.toml index f0cc5fc5..f5bc097b 100644 --- a/src/agents/pyproject.toml +++ b/src/agents/pyproject.toml @@ -4,7 +4,7 @@ name = "agents" version = "1.15.0" requires-python = ">=3.12" dependencies = [ - "livekit-agents>=1.4.5", + "livekit-agents==1.4.5", "livekit-plugins-deepgram==1.4.5", "livekit-plugins-silero==1.4.5", "livekit-plugins-kyutai-lasuite==0.0.6", diff --git a/src/agents/voxtral_vllm_stt.py b/src/agents/voxtral_vllm_stt.py index c3ba65e1..3d206b03 100644 --- a/src/agents/voxtral_vllm_stt.py +++ b/src/agents/voxtral_vllm_stt.py @@ -49,6 +49,7 @@ class _STTOptions: base_url: str model: str api_key: str | None + target_streaming_delay_ms: int | None @dataclass @@ -76,6 +77,7 @@ class STT(stt.STT): base_url: NotGivenOr[str] = NOT_GIVEN, model: NotGivenOr[str] = NOT_GIVEN, api_key: NotGivenOr[str] = NOT_GIVEN, + target_streaming_delay_ms: NotGivenOr[int] = NOT_GIVEN, vad: vad_module.VAD | None = None, ) -> None: """Build the STT. @@ -86,6 +88,9 @@ class STT(stt.STT): model: Model name exposed by vLLM, default mistralai/Voxtral-Mini-4B-Realtime-2602. api_key: Optional bearer token. Falls back to $VOXTRAL_VLLM_API_KEY. + target_streaming_delay_ms: Target streaming delay in ms forwarded to + vLLM via session.update. Falls back to + $VOXTRAL_VLLM_TARGET_STREAMING_DELAY_MS, else server default. vad: Voice Activity Detector. If omitted, Silero VAD is loaded. """ super().__init__( @@ -109,6 +114,15 @@ class STT(stt.STT): resolved_key = ( api_key if is_given(api_key) else os.environ.get("VOXTRAL_VLLM_API_KEY") ) + resolved_delay = ( + target_streaming_delay_ms + if is_given(target_streaming_delay_ms) + else ( + int(os.environ["VOXTRAL_VLLM_TARGET_STREAMING_DELAY_MS"]) + if os.environ.get("VOXTRAL_VLLM_TARGET_STREAMING_DELAY_MS") + else None + ) + ) if vad is None: try: diff --git a/src/frontend/src/features/rooms/livekit/processors/RnnNoiseProcessor.ts b/src/frontend/src/features/rooms/livekit/processors/RnnNoiseProcessor.ts index e42836a7..cedf696d 100644 --- a/src/frontend/src/features/rooms/livekit/processors/RnnNoiseProcessor.ts +++ b/src/frontend/src/features/rooms/livekit/processors/RnnNoiseProcessor.ts @@ -47,8 +47,6 @@ export class RnnNoiseProcessor implements AudioProcessorInterface { ) this.destinationNode = audioContext.createMediaStreamDestination() - // this.destinationNode.channelCount = 1 - // this.destinationNode.channelCountMode = 'explicit' // Connect the audio processing chain this.sourceNode diff --git a/src/frontend/src/features/subtitle/component/Subtitles.tsx b/src/frontend/src/features/subtitle/component/Subtitles.tsx index 9df26d0f..502eda35 100644 --- a/src/frontend/src/features/subtitle/component/Subtitles.tsx +++ b/src/frontend/src/features/subtitle/component/Subtitles.tsx @@ -65,8 +65,6 @@ const useTranscriptionState = () => { ) => { console.log(participant, segments) - - if (!participant || segments.length === 0) return if (segments.length > 1) {