Skip to content

Realtime: connect()/update_session() can't set turn_detection, language, context_bias; turn.* events parsed as UnknownRealtimeEvent #648

Open

Description

@decevy

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:

  1. 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).
  2. _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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions