File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -113,6 +113,49 @@ Use the received URL to establish a WebSocket connection for:
113113
114114See the [ WebSocket Streaming] ( /api-reference/voice/websocket-streaming ) documentation for details.
115115
116+ ### Message Flow
117+
118+ ``` mermaid
119+ sequenceDiagram
120+ participant Client
121+ participant Voice API
122+
123+ Note over Client,Voice API: Step 1: Request Session (POST)
124+
125+ Client->>Voice API: Configuration options
126+ Voice API->>Client: Streaming URL
127+
128+ Note over Client,Voice API: Step 2: Start Streaming (WebSocket)
129+
130+ Client->>Voice API: Establish WebSocket connection<br>using the streaming URL
131+
132+ Note over Client,Voice API: WebSocket
133+
134+ par
135+ loop Send audio data
136+ Client->>Voice API: SourceMediaChunk
137+ end
138+ and
139+ loop Receive updates
140+ Voice API-->>Client: SourceTranscriptUpdate
141+ Voice API-->>Client: TargetTranscriptUpdate
142+ end
143+ end
144+
145+ Client->>Voice API: EndOfSourceAudio
146+
147+ loop Final updates
148+ Voice API-->>Client: SourceTranscriptUpdate
149+ Voice API-->>Client: TargetTranscriptUpdate
150+ end
151+
152+ Voice API-->>Client: EndOfSourceTranscript
153+
154+ Voice API-->>Client: EndOfTargetTranscript<br>(once per target language)
155+
156+ Note over Client,Voice API: Connection Closed
157+ ```
158+
116159## Limitations and Constraints
117160
118161* Maximum 5 target languages per stream
You can’t perform that action at this time.
0 commit comments