You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Realtime: connect()/update_session() can't set turn_detection, language, context_bias; turn.* events parsed as UnknownRealtimeEvent #648
In mistralai 3.5.0 (and main @ 89da0f8), the generated models support turn detection (TurnDetectionStartEvent, TurnDetectionEndEvent, RealtimeTranscriptionSessionUpdatePayload.turn_detection), but the hand-written realtime layer in src/mistralai/extra/realtime/ doesn't expose them:
RealtimeTranscription.connect() and RealtimeConnection.update_session() only accept audio_format and target_streaming_delay_ms. There's no way to set turn_detection, language or context_bias, which the realtime docs list as session fields (https://docs.mistral.ai/studio/audio/speech-to-text/transcribe-in-realtime).
_MESSAGE_MODELS in extra/realtime/connection.py has no entries for turn.start, turn.eager_end, turn.resume, turn.end, so they're returned as UnknownRealtimeEvent.
Expected: session fields from the docs can be passed through the SDK, and turn events are parsed into their models.
Workaround: a raw WebSocket as in the docs examples, or reading UnknownRealtimeEvent.content.
Activity