Dice Ambient Scribe STREAM 1.0

The STREAM API uses websockets to perform real-time transcription and clinical notes generation from media capture devices.

API Flow

General specifications

  • The STREAM endpoint requires that all messages are sent/received as JSON text frames.
  • No messages and data are stored from Dice, so we recommend collation/storage of information on your end.
  • The server or the user should pass their bearer authentication token as an Authorization header when initiating the websocket. Example: url: 'wss://api.dice.com/v1/scribe/copilot/server/listen', protocol: 'copilot-listen-protocol', extra_headers: { 'Authorization': 'Bearer ' }.

Example operation:

  • EMR App opens a websocket connection with the auth token.
  • EMR App sends first message specifying the stream and transcription configuration.
  • EMR App sends small audio chunks for each stream continuously
  • Dice Ambient Scribe sends transcript items continuously
  • EMR App stops media stream and/or sends a message { "object": "stop"}.
  • Dice Ambient Scribe evaluates and sends the clinical note.
  • Dice Ambient Scribe closes the websocket.

Servers

  • wss://api.dice.health/v1/scribe/serverwssserver

    Server API called from backend application

  • wss://api.dice.health/v1/scribe/userwssuser

    User API called from frontend application

Operations

  • PUB /

    Send messages to the API

    Operation IDsendMessage

    Accepts one of the following messages:

    • #0stream_config

      Stream and response config to setup API.

      (Sent from the app to the Scribe API) This is the first message sent to the websocket API to configure the stream as well as the transcription/note generation settings.

      object
      uid: stream_request

      Examples

    • #1audio_chunk

      Small audio segment for transcription/note-generation.

      (Sent from the app to the Scribe API) Short audio chunk payload of an audio track from the consultation. Max duration 1s.

      object
      uid: audio_chunk

      Examples

    • #2stop

      To notify stream stoppage.

      (Sent from the app to the Scribe API) End audio stream and ask Scribe to return the clinical note and close the websocket.

      object
      uid: stop

      Examples

  • SUB /

    Messages that you receive from the API

    Operation IDreceiveMessage

    Accepts one of the following messages:

    • #0transcript_item

      A segment of the ongoing transcript (sent piece-wise)

      (Sent from the Scribe API to the app) A segment of the ongoing transcript. Usually, it's the sentence currently spoken, derived from the most recent audio segments sent. This sentence might be partial because transcription continues as we get audio segments. Update the earlier transcript entry with the identical ID until "is_final" is set to true.

      object
      uid: transcript_item

      Examples

    • #1note

      Clinical note response

      (Sent from the Scribe API to the app) Clinical note generated from the consultation

      object
      uid: note

      Examples

    • #2duration_limit

      Time left in seconds until the stream limit (1 hour) is reached.

      (Sent from the Scribe API to the app) Time left in seconds until the stream limit (1 hour) is reached. Countdown starts at 60s.

      object
      uid: duration_limit

      Examples

    • #3error_msg

      Error Message

      (Sent from the Scribe API to the app) Error Message received from the API

      object
      uid: error_msg

      Examples

Messages

  • #1stream_config

    Stream and response config to setup API.

    (Sent from the app to the Scribe API) This is the first message sent to the websocket API to configure the stream as well as the transcription/note generation settings.

    object
    uid: stream_request
  • #2audio_chunk

    Small audio segment for transcription/note-generation.

    (Sent from the app to the Scribe API) Short audio chunk payload of an audio track from the consultation. Max duration 1s.

    object
    uid: audio_chunk
  • #3stop

    To notify stream stoppage.

    (Sent from the app to the Scribe API) End audio stream and ask Scribe to return the clinical note and close the websocket.

    object
    uid: stop
  • #4transcript_item

    A segment of the ongoing transcript (sent piece-wise)

    (Sent from the Scribe API to the app) A segment of the ongoing transcript. Usually, it's the sentence currently spoken, derived from the most recent audio segments sent. This sentence might be partial because transcription continues as we get audio segments. Update the earlier transcript entry with the identical ID until "is_final" is set to true.

    object
    uid: transcript_item
  • #5note

    Clinical note response

    (Sent from the Scribe API to the app) Clinical note generated from the consultation

    object
    uid: note
  • #6duration_limit

    Time left in seconds until the stream limit (1 hour) is reached.

    (Sent from the Scribe API to the app) Time left in seconds until the stream limit (1 hour) is reached. Countdown starts at 60s.

    object
    uid: duration_limit
  • #7error_msg

    Error Message

    (Sent from the Scribe API to the app) Error Message received from the API

    object
    uid: error_msg

Schemas

  • object
    uid: stream_id
  • object
    uid: stream_request
  • object
    uid: transcript_item
  • object
    uid: note_section
  • object
    uid: audio_chunk
  • object
    uid: note
  • object
    uid: stop
  • object
    uid: duration_limit
  • object
    uid: error_msg