4 4
5These are events emitted from the OpenAI Realtime Translation WebSocket server to the client.5These are events emitted from the OpenAI Realtime Translation WebSocket server to the client.
6 6
7<a id="error"></a>
8
7## error9## error
8 10
9Returned when an error occurs, which could be a client problem or a server11Returned when an error occurs, which could be a client problem or a server
14 16
15Schema name: `RealtimeServerEventError`17Schema name: `RealtimeServerEventError`
16 18
17```json19- `error: RealtimeError`
18{20
19 "(resource) realtime > (model) realtime_error_event > (schema)": {21 Details of the error.
20 "kind": "HttpDeclTypeAlias",22
21 "oasRef": "#/components/schemas/RealtimeServerEventError",23 - `message: string`
22 "docstring": "Returned when an error occurs, which could be a client problem or a server\nproblem. Most errors are recoverable and the session will stay open, we\nrecommend to implementors to monitor and log error messages by default.\n",24
23 "ident": "RealtimeErrorEvent",25 A human-readable error message.
24 "type": {26
25 "kind": "HttpTypeObject",27 - `type: string`
26 "members": [28
27 {29 The type of error (e.g., "invalid_request_error", "server_error").
28 "ident": "error"30
29 },31 - `code: optional string or null`
30 {32
31 "ident": "event_id"33 Error code, if any.
32 },34
33 {35 - `event_id: optional string or null`
34 "ident": "type"36
35 }37 The event_id of the client event that caused the error, if applicable.
36 ]38
37 },39 - `param: optional string or null`
38 "childrenParentSchema": "object",40
39 "children": [41 Parameter related to the error, if any.
40 "(resource) realtime > (model) realtime_error_event > (schema) > (property) error",42
41 "(resource) realtime > (model) realtime_error_event > (schema) > (property) event_id",43- `event_id: string`
42 "(resource) realtime > (model) realtime_error_event > (schema) > (property) type"44
43 ]45 The unique ID of the server event.
44 },46
45 "(resource) realtime > (model) realtime_error_event > (schema) > (property) error": {47- `type: "error"`
46 "kind": "HttpDeclProperty",48
47 "oasRef": "#/components/schemas/RealtimeServerEventError/properties/error",49 The event type, must be `error`.
48 "deprecated": false,50
49 "key": "error",51 - `"error"`
50 "docstring": "Details of the error.",
51 "type": {
52 "kind": "HttpTypeReference",
53 "ident": "RealtimeError",
54 "$ref": "(resource) realtime > (model) realtime_error > (schema)"
55 },
56 "optional": false,
57 "nullable": false,
58 "modelImplicit": false,
59 "schemaType": "object",
60 "modelPath": "(resource) realtime > (model) realtime_error",
61 "childrenParentSchema": "object",
62 "children": [
63 "(resource) realtime > (model) realtime_error > (schema) > (property) message",
64 "(resource) realtime > (model) realtime_error > (schema) > (property) type",
65 "(resource) realtime > (model) realtime_error > (schema) > (property) code",
66 "(resource) realtime > (model) realtime_error > (schema) > (property) event_id",
67 "(resource) realtime > (model) realtime_error > (schema) > (property) param"
68 ]
69 },
70 "(resource) realtime > (model) realtime_error_event > (schema) > (property) event_id": {
71 "kind": "HttpDeclProperty",
72 "oasRef": "#/components/schemas/RealtimeServerEventError/properties/event_id",
73 "deprecated": false,
74 "key": "event_id",
75 "docstring": "The unique ID of the server event.",
76 "type": {
77 "kind": "HttpTypeString"
78 },
79 "optional": false,
80 "nullable": false,
81 "schemaType": "string",
82 "children": []
83 },
84 "(resource) realtime > (model) realtime_error_event > (schema) > (property) type": {
85 "kind": "HttpDeclProperty",
86 "oasRef": "#/components/schemas/RealtimeServerEventError/properties/type",
87 "deprecated": false,
88 "key": "type",
89 "docstring": "The event type, must be `error`.",
90 "type": {
91 "kind": "HttpTypeUnion",
92 "oasRef": "#/components/schemas/RealtimeServerEventError/properties/type",
93 "types": [
94 {
95 "kind": "HttpTypeLiteral",
96 "literal": "error"
97 }
98 ]
99 },
100 "optional": false,
101 "nullable": false,
102 "schemaType": "enum",
103 "childrenParentSchema": "enum",
104 "children": [
105 "(resource) realtime > (model) realtime_error_event > (schema) > (property) type > (member) 0"
106 ]
107 },
108 "(resource) realtime > (model) realtime_error > (schema) > (property) message": {
109 "kind": "HttpDeclProperty",
110 "oasRef": "#/components/schemas/RealtimeServerEventError/properties/error/properties/message",
111 "deprecated": false,
112 "key": "message",
113 "docstring": "A human-readable error message.",
114 "type": {
115 "kind": "HttpTypeString"
116 },
117 "optional": false,
118 "nullable": false,
119 "schemaType": "string",
120 "children": []
121 },
122 "(resource) realtime > (model) realtime_error > (schema) > (property) type": {
123 "kind": "HttpDeclProperty",
124 "oasRef": "#/components/schemas/RealtimeServerEventError/properties/error/properties/type",
125 "deprecated": false,
126 "key": "type",
127 "docstring": "The type of error (e.g., \"invalid_request_error\", \"server_error\").\n",
128 "type": {
129 "kind": "HttpTypeString"
130 },
131 "optional": false,
132 "nullable": false,
133 "schemaType": "string",
134 "children": []
135 },
136 "(resource) realtime > (model) realtime_error > (schema) > (property) code": {
137 "kind": "HttpDeclProperty",
138 "oasRef": "#/components/schemas/RealtimeServerEventError/properties/error/properties/code",
139 "deprecated": false,
140 "key": "code",
141 "docstring": "Error code, if any.",
142 "type": {
143 "kind": "HttpTypeString"
144 },
145 "optional": true,
146 "nullable": true,
147 "schemaType": "string",
148 "children": []
149 },
150 "(resource) realtime > (model) realtime_error > (schema) > (property) event_id": {
151 "kind": "HttpDeclProperty",
152 "oasRef": "#/components/schemas/RealtimeServerEventError/properties/error/properties/event_id",
153 "deprecated": false,
154 "key": "event_id",
155 "docstring": "The event_id of the client event that caused the error, if applicable.\n",
156 "type": {
157 "kind": "HttpTypeString"
158 },
159 "optional": true,
160 "nullable": true,
161 "schemaType": "string",
162 "children": []
163 },
164 "(resource) realtime > (model) realtime_error > (schema) > (property) param": {
165 "kind": "HttpDeclProperty",
166 "oasRef": "#/components/schemas/RealtimeServerEventError/properties/error/properties/param",
167 "deprecated": false,
168 "key": "param",
169 "docstring": "Parameter related to the error, if any.",
170 "type": {
171 "kind": "HttpTypeString"
172 },
173 "optional": true,
174 "nullable": true,
175 "schemaType": "string",
176 "children": []
177 },
178 "(resource) realtime > (model) realtime_error > (schema)": {
179 "kind": "HttpDeclTypeAlias",
180 "oasRef": "#/components/schemas/RealtimeServerEventError/properties/error",
181 "docstring": "Details of the error.",
182 "ident": "RealtimeError",
183 "type": {
184 "kind": "HttpTypeObject",
185 "members": [
186 {
187 "ident": "message"
188 },
189 {
190 "ident": "type"
191 },
192 {
193 "ident": "code"
194 },
195 {
196 "ident": "event_id"
197 },
198 {
199 "ident": "param"
200 }
201 ]
202 },
203 "childrenParentSchema": "object",
204 "children": [
205 "(resource) realtime > (model) realtime_error > (schema) > (property) message",
206 "(resource) realtime > (model) realtime_error > (schema) > (property) type",
207 "(resource) realtime > (model) realtime_error > (schema) > (property) code",
208 "(resource) realtime > (model) realtime_error > (schema) > (property) event_id",
209 "(resource) realtime > (model) realtime_error > (schema) > (property) param"
210 ]
211 },
212 "(resource) realtime > (model) realtime_error_event > (schema) > (property) type > (member) 0": {
213 "kind": "HttpDeclReference",
214 "type": {
215 "kind": "HttpTypeLiteral",
216 "literal": "error"
217 }
218 }
219}
220```
221 52
222### Example53### Example
223 54
235}66}
236```67```
237 68
69<a id="session.created"></a>
70
238## session.created71## session.created
239 72
240Returned when a translation session is created. Emitted automatically when a73Returned when a translation session is created. Emitted automatically when a
245 78
246Schema name: `RealtimeTranslationServerEventSessionCreated`79Schema name: `RealtimeTranslationServerEventSessionCreated`
247 80
248```json81- `event_id: string`
249{82
250 "(resource) realtime > (model) realtime_translation_session_created_event > (schema)": {83 The unique ID of the server event.
251 "kind": "HttpDeclTypeAlias",84
252 "oasRef": "#/components/schemas/RealtimeTranslationServerEventSessionCreated",85- `session: RealtimeTranslationSession`
253 "docstring": "Returned when a translation session is created. Emitted automatically when a\nnew connection is established as the first server event. This event contains\nthe default translation session configuration.\n",86
254 "ident": "RealtimeTranslationSessionCreatedEvent",87 The translation session configuration.
255 "type": {88
256 "kind": "HttpTypeObject",89 - `id: string`
257 "members": [90
258 {91 Unique identifier for the session that looks like `sess_1234567890abcdef`.
259 "ident": "event_id"92
260 },93 - `audio: object { input, output }`
261 {94
262 "ident": "session"95 Configuration for translation input and output audio.
263 },96
264 {97 - `input: optional object { noise_reduction, transcription }`
265 "ident": "type"98
266 }99 - `noise_reduction: optional object { type } or null`
267 ]100
268 },101 Optional input noise reduction.
269 "childrenParentSchema": "object",102
270 "children": [103 - `type: NoiseReductionType`
271 "(resource) realtime > (model) realtime_translation_session_created_event > (schema) > (property) event_id",104
272 "(resource) realtime > (model) realtime_translation_session_created_event > (schema) > (property) session",105 Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.
273 "(resource) realtime > (model) realtime_translation_session_created_event > (schema) > (property) type"106
274 ]107 - `"near_field"`
275 },108
276 "(resource) realtime > (model) realtime_translation_session_created_event > (schema) > (property) event_id": {109 - `"far_field"`
277 "kind": "HttpDeclProperty",110
278 "oasRef": "#/components/schemas/RealtimeTranslationServerEventSessionCreated/properties/event_id",111 - `transcription: optional object { model } or null`
279 "deprecated": false,112
280 "key": "event_id",113 Optional source-language transcription. When configured, the server emits
281 "docstring": "The unique ID of the server event.",114 `session.input_transcript.delta` events. Translation itself still runs from
282 "type": {115 the input audio stream.
283 "kind": "HttpTypeString"116
284 },117 - `model: string`
285 "optional": false,118
286 "nullable": false,119 The transcription model used for source transcript deltas.
287 "schemaType": "string",120
288 "children": []121 - `output: optional object { language }`
289 },122
290 "(resource) realtime > (model) realtime_translation_session_created_event > (schema) > (property) session": {123 - `language: optional string`
291 "kind": "HttpDeclProperty",124
292 "oasRef": "#/components/schemas/RealtimeTranslationServerEventSessionCreated/properties/session",125 Target language for translated output audio and transcript deltas.
293 "deprecated": false,126
294 "key": "session",127 - `expires_at: number`
295 "docstring": "The translation session configuration.",128
296 "title": "Realtime translation session",129 Expiration timestamp for the session, in seconds since epoch.
297 "type": {130
298 "kind": "HttpTypeReference",131 - `model: string`
299 "ident": "RealtimeTranslationSession",132
300 "$ref": "(resource) realtime > (model) realtime_translation_session > (schema)"133 The Realtime translation model used for this session. This field is set at
301 },134 session creation and cannot be changed with `session.update`.
302 "optional": false,135
303 "nullable": false,136 - `type: "translation"`
304 "modelImplicit": false,137
305 "schemaType": "object",138 The session type. Always `translation` for Realtime translation sessions.
306 "modelPath": "(resource) realtime > (model) realtime_translation_session",139
307 "childrenParentSchema": "object",140 - `"translation"`
308 "children": [141
309 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) id",142- `type: "session.created"`
310 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) audio",143
311 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) expires_at",144 The event type, must be `session.created`.
312 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) model",145
313 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) type"146 - `"session.created"`
314 ]
315 },
316 "(resource) realtime > (model) realtime_translation_session_created_event > (schema) > (property) type": {
317 "kind": "HttpDeclProperty",
318 "oasRef": "#/components/schemas/RealtimeTranslationServerEventSessionCreated/properties/type",
319 "deprecated": false,
320 "key": "type",
321 "docstring": "The event type, must be `session.created`.",
322 "type": {
323 "kind": "HttpTypeUnion",
324 "oasRef": "#/components/schemas/RealtimeTranslationServerEventSessionCreated/properties/type",
325 "types": [
326 {
327 "kind": "HttpTypeLiteral",
328 "literal": "session.created"
329 }
330 ]
331 },
332 "optional": false,
333 "nullable": false,
334 "schemaType": "enum",
335 "childrenParentSchema": "enum",
336 "children": [
337 "(resource) realtime > (model) realtime_translation_session_created_event > (schema) > (property) type > (member) 0"
338 ]
339 },
340 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) id": {
341 "kind": "HttpDeclProperty",
342 "oasRef": "#/components/schemas/RealtimeTranslationSession/properties/id",
343 "deprecated": false,
344 "key": "id",
345 "docstring": "Unique identifier for the session that looks like `sess_1234567890abcdef`.\n",
346 "type": {
347 "kind": "HttpTypeString"
348 },
349 "optional": false,
350 "nullable": false,
351 "schemaType": "string",
352 "children": []
353 },
354 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) audio": {
355 "kind": "HttpDeclProperty",
356 "oasRef": "#/components/schemas/RealtimeTranslationSession/properties/audio",
357 "deprecated": false,
358 "key": "audio",
359 "docstring": "Configuration for translation input and output audio.\n",
360 "type": {
361 "kind": "HttpTypeObject",
362 "members": [
363 {
364 "ident": "input"
365 },
366 {
367 "ident": "output"
368 }
369 ]
370 },
371 "optional": false,
372 "nullable": false,
373 "schemaType": "object",
374 "childrenParentSchema": "object",
375 "children": [
376 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) audio > (property) input",
377 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) audio > (property) output"
378 ]
379 },
380 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) expires_at": {
381 "kind": "HttpDeclProperty",
382 "oasRef": "#/components/schemas/RealtimeTranslationSession/properties/expires_at",
383 "deprecated": false,
384 "key": "expires_at",
385 "docstring": "Expiration timestamp for the session, in seconds since epoch.",
386 "type": {
387 "kind": "HttpTypeNumber"
388 },
389 "constraints": {
390 "format": "unixtime"
391 },
392 "optional": false,
393 "nullable": false,
394 "schemaType": "integer",
395 "children": []
396 },
397 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) model": {
398 "kind": "HttpDeclProperty",
399 "oasRef": "#/components/schemas/RealtimeTranslationSession/properties/model",
400 "deprecated": false,
401 "key": "model",
402 "docstring": "The Realtime translation model used for this session. This field is set at\nsession creation and cannot be changed with `session.update`.\n",
403 "type": {
404 "kind": "HttpTypeString"
405 },
406 "optional": false,
407 "nullable": false,
408 "schemaType": "string",
409 "children": []
410 },
411 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) type": {
412 "kind": "HttpDeclProperty",
413 "oasRef": "#/components/schemas/RealtimeTranslationSession/properties/type",
414 "deprecated": false,
415 "key": "type",
416 "docstring": "The session type. Always `translation` for Realtime translation sessions.\n",
417 "type": {
418 "kind": "HttpTypeUnion",
419 "oasRef": "#/components/schemas/RealtimeTranslationSession/properties/type",
420 "types": [
421 {
422 "kind": "HttpTypeLiteral",
423 "literal": "translation"
424 }
425 ]
426 },
427 "optional": false,
428 "nullable": false,
429 "schemaType": "enum",
430 "childrenParentSchema": "enum",
431 "children": [
432 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) type > (member) 0"
433 ]
434 },
435 "(resource) realtime > (model) realtime_translation_session > (schema)": {
436 "kind": "HttpDeclTypeAlias",
437 "oasRef": "#/components/schemas/RealtimeTranslationSession",
438 "docstring": "A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.\n",
439 "ident": "RealtimeTranslationSession",
440 "type": {
441 "kind": "HttpTypeObject",
442 "members": [
443 {
444 "ident": "id"
445 },
446 {
447 "ident": "audio"
448 },
449 {
450 "ident": "expires_at"
451 },
452 {
453 "ident": "model"
454 },
455 {
456 "ident": "type"
457 }
458 ]
459 },
460 "childrenParentSchema": "object",
461 "children": [
462 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) id",
463 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) audio",
464 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) expires_at",
465 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) model",
466 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) type"
467 ]
468 },
469 "(resource) realtime > (model) realtime_translation_session_created_event > (schema) > (property) type > (member) 0": {
470 "kind": "HttpDeclReference",
471 "type": {
472 "kind": "HttpTypeLiteral",
473 "literal": "session.created"
474 }
475 },
476 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) audio > (property) input": {
477 "kind": "HttpDeclProperty",
478 "oasRef": "#/components/schemas/RealtimeTranslationSession/properties/audio/properties/input",
479 "deprecated": false,
480 "key": "input",
481 "type": {
482 "kind": "HttpTypeObject",
483 "members": [
484 {
485 "ident": "noise_reduction"
486 },
487 {
488 "ident": "transcription"
489 }
490 ]
491 },
492 "optional": true,
493 "nullable": false,
494 "schemaType": "object",
495 "childrenParentSchema": "object",
496 "children": [
497 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) audio > (property) input > (property) noise_reduction",
498 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) audio > (property) input > (property) transcription"
499 ]
500 },
501 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) audio > (property) output": {
502 "kind": "HttpDeclProperty",
503 "oasRef": "#/components/schemas/RealtimeTranslationSession/properties/audio/properties/output",
504 "deprecated": false,
505 "key": "output",
506 "type": {
507 "kind": "HttpTypeObject",
508 "members": [
509 {
510 "ident": "language"
511 }
512 ]
513 },
514 "optional": true,
515 "nullable": false,
516 "schemaType": "object",
517 "childrenParentSchema": "object",
518 "children": [
519 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) audio > (property) output > (property) language"
520 ]
521 },
522 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) type > (member) 0": {
523 "kind": "HttpDeclReference",
524 "type": {
525 "kind": "HttpTypeLiteral",
526 "literal": "translation"
527 }
528 },
529 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) audio > (property) input > (property) noise_reduction": {
530 "kind": "HttpDeclProperty",
531 "oasRef": "#/components/schemas/RealtimeTranslationSession/properties/audio/properties/input/properties/noise_reduction",
532 "deprecated": false,
533 "key": "noise_reduction",
534 "docstring": "Optional input noise reduction.\n",
535 "type": {
536 "kind": "HttpTypeObject",
537 "members": [
538 {
539 "ident": "type"
540 }
541 ]
542 },
543 "optional": true,
544 "nullable": true,
545 "schemaType": "object",
546 "childrenParentSchema": "object",
547 "children": [
548 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) audio > (property) input > (property) noise_reduction > (property) type"
549 ]
550 },
551 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) audio > (property) input > (property) transcription": {
552 "kind": "HttpDeclProperty",
553 "oasRef": "#/components/schemas/RealtimeTranslationSession/properties/audio/properties/input/properties/transcription",
554 "deprecated": false,
555 "key": "transcription",
556 "docstring": "Optional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.\n",
557 "type": {
558 "kind": "HttpTypeObject",
559 "members": [
560 {
561 "ident": "model"
562 }
563 ]
564 },
565 "optional": true,
566 "nullable": true,
567 "schemaType": "object",
568 "childrenParentSchema": "object",
569 "children": [
570 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) audio > (property) input > (property) transcription > (property) model"
571 ]
572 },
573 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) audio > (property) output > (property) language": {
574 "kind": "HttpDeclProperty",
575 "oasRef": "#/components/schemas/RealtimeTranslationSession/properties/audio/properties/output/properties/language",
576 "deprecated": false,
577 "key": "language",
578 "docstring": "Target language for translated output audio and transcript deltas.\n",
579 "type": {
580 "kind": "HttpTypeString"
581 },
582 "optional": true,
583 "nullable": false,
584 "schemaType": "string",
585 "children": []
586 },
587 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) audio > (property) input > (property) noise_reduction > (property) type": {
588 "kind": "HttpDeclProperty",
589 "oasRef": "#/components/schemas/RealtimeTranslationSession/properties/audio/properties/input/properties/noise_reduction/anyOf/0/properties/type",
590 "deprecated": false,
591 "key": "type",
592 "docstring": "Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.\n",
593 "type": {
594 "kind": "HttpTypeReference",
595 "ident": "NoiseReductionType",
596 "$ref": "(resource) realtime > (model) noise_reduction_type > (schema)"
597 },
598 "optional": false,
599 "nullable": false,
600 "modelImplicit": false,
601 "schemaType": "enum",
602 "modelPath": "(resource) realtime > (model) noise_reduction_type",
603 "childrenParentSchema": "enum",
604 "children": [
605 "(resource) realtime > (model) noise_reduction_type > (schema) > (member) 0",
606 "(resource) realtime > (model) noise_reduction_type > (schema) > (member) 1"
607 ]
608 },
609 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) audio > (property) input > (property) transcription > (property) model": {
610 "kind": "HttpDeclProperty",
611 "oasRef": "#/components/schemas/RealtimeTranslationSession/properties/audio/properties/input/properties/transcription/anyOf/0/properties/model",
612 "deprecated": false,
613 "key": "model",
614 "docstring": "The transcription model used for source transcript deltas.",
615 "type": {
616 "kind": "HttpTypeString"
617 },
618 "optional": false,
619 "nullable": false,
620 "schemaType": "string",
621 "children": []
622 },
623 "(resource) realtime > (model) noise_reduction_type > (schema) > (member) 0": {
624 "kind": "HttpDeclReference",
625 "type": {
626 "kind": "HttpTypeLiteral",
627 "literal": "near_field"
628 }
629 },
630 "(resource) realtime > (model) noise_reduction_type > (schema) > (member) 1": {
631 "kind": "HttpDeclReference",
632 "type": {
633 "kind": "HttpTypeLiteral",
634 "literal": "far_field"
635 }
636 },
637 "(resource) realtime > (model) noise_reduction_type > (schema)": {
638 "kind": "HttpDeclTypeAlias",
639 "oasRef": "#/components/schemas/NoiseReductionType",
640 "docstring": "Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.\n",
641 "ident": "NoiseReductionType",
642 "type": {
643 "kind": "HttpTypeUnion",
644 "oasRef": "#/components/schemas/NoiseReductionType",
645 "types": [
646 {
647 "kind": "HttpTypeLiteral",
648 "literal": "near_field"
649 },
650 {
651 "kind": "HttpTypeLiteral",
652 "literal": "far_field"
653 }
654 ]
655 },
656 "childrenParentSchema": "enum",
657 "children": [
658 "(resource) realtime > (model) noise_reduction_type > (schema) > (member) 0",
659 "(resource) realtime > (model) noise_reduction_type > (schema) > (member) 1"
660 ]
661 }
662}
663```
664 147
665### Example148### Example
666 149
691}174}
692```175```
693 176
177<a id="session.updated"></a>
178
694## session.updated179## session.updated
695 180
696Returned when a translation session is updated with a `session.update` event,181Returned when a translation session is updated with a `session.update` event,
700 185
701Schema name: `RealtimeTranslationServerEventSessionUpdated`186Schema name: `RealtimeTranslationServerEventSessionUpdated`
702 187
703```json188- `event_id: string`
704{189
705 "(resource) realtime > (model) realtime_translation_session_updated_event > (schema)": {190 The unique ID of the server event.
706 "kind": "HttpDeclTypeAlias",191
707 "oasRef": "#/components/schemas/RealtimeTranslationServerEventSessionUpdated",192- `session: RealtimeTranslationSession`
708 "docstring": "Returned when a translation session is updated with a `session.update` event,\nunless there is an error.\n",193
709 "ident": "RealtimeTranslationSessionUpdatedEvent",194 The translation session configuration.
710 "type": {195
711 "kind": "HttpTypeObject",196 - `id: string`
712 "members": [197
713 {198 Unique identifier for the session that looks like `sess_1234567890abcdef`.
714 "ident": "event_id"199
715 },200 - `audio: object { input, output }`
716 {201
717 "ident": "session"202 Configuration for translation input and output audio.
718 },203
719 {204 - `input: optional object { noise_reduction, transcription }`
720 "ident": "type"205
721 }206 - `noise_reduction: optional object { type } or null`
722 ]207
723 },208 Optional input noise reduction.
724 "childrenParentSchema": "object",209
725 "children": [210 - `type: NoiseReductionType`
726 "(resource) realtime > (model) realtime_translation_session_updated_event > (schema) > (property) event_id",211
727 "(resource) realtime > (model) realtime_translation_session_updated_event > (schema) > (property) session",212 Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.
728 "(resource) realtime > (model) realtime_translation_session_updated_event > (schema) > (property) type"213
729 ]214 - `"near_field"`
730 },215
731 "(resource) realtime > (model) realtime_translation_session_updated_event > (schema) > (property) event_id": {216 - `"far_field"`
732 "kind": "HttpDeclProperty",217
733 "oasRef": "#/components/schemas/RealtimeTranslationServerEventSessionUpdated/properties/event_id",218 - `transcription: optional object { model } or null`
734 "deprecated": false,219
735 "key": "event_id",220 Optional source-language transcription. When configured, the server emits
736 "docstring": "The unique ID of the server event.",221 `session.input_transcript.delta` events. Translation itself still runs from
737 "type": {222 the input audio stream.
738 "kind": "HttpTypeString"223
739 },224 - `model: string`
740 "optional": false,225
741 "nullable": false,226 The transcription model used for source transcript deltas.
742 "schemaType": "string",227
743 "children": []228 - `output: optional object { language }`
744 },229
745 "(resource) realtime > (model) realtime_translation_session_updated_event > (schema) > (property) session": {230 - `language: optional string`
746 "kind": "HttpDeclProperty",231
747 "oasRef": "#/components/schemas/RealtimeTranslationServerEventSessionUpdated/properties/session",232 Target language for translated output audio and transcript deltas.
748 "deprecated": false,233
749 "key": "session",234 - `expires_at: number`
750 "docstring": "The translation session configuration.",235
751 "title": "Realtime translation session",236 Expiration timestamp for the session, in seconds since epoch.
752 "type": {237
753 "kind": "HttpTypeReference",238 - `model: string`
754 "ident": "RealtimeTranslationSession",239
755 "$ref": "(resource) realtime > (model) realtime_translation_session > (schema)"240 The Realtime translation model used for this session. This field is set at
756 },241 session creation and cannot be changed with `session.update`.
757 "optional": false,242
758 "nullable": false,243 - `type: "translation"`
759 "modelImplicit": false,244
760 "schemaType": "object",245 The session type. Always `translation` for Realtime translation sessions.
761 "modelPath": "(resource) realtime > (model) realtime_translation_session",246
762 "childrenParentSchema": "object",247 - `"translation"`
763 "children": [248
764 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) id",249- `type: "session.updated"`
765 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) audio",250
766 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) expires_at",251 The event type, must be `session.updated`.
767 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) model",252
768 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) type"253 - `"session.updated"`
769 ]
770 },
771 "(resource) realtime > (model) realtime_translation_session_updated_event > (schema) > (property) type": {
772 "kind": "HttpDeclProperty",
773 "oasRef": "#/components/schemas/RealtimeTranslationServerEventSessionUpdated/properties/type",
774 "deprecated": false,
775 "key": "type",
776 "docstring": "The event type, must be `session.updated`.",
777 "type": {
778 "kind": "HttpTypeUnion",
779 "oasRef": "#/components/schemas/RealtimeTranslationServerEventSessionUpdated/properties/type",
780 "types": [
781 {
782 "kind": "HttpTypeLiteral",
783 "literal": "session.updated"
784 }
785 ]
786 },
787 "optional": false,
788 "nullable": false,
789 "schemaType": "enum",
790 "childrenParentSchema": "enum",
791 "children": [
792 "(resource) realtime > (model) realtime_translation_session_updated_event > (schema) > (property) type > (member) 0"
793 ]
794 },
795 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) id": {
796 "kind": "HttpDeclProperty",
797 "oasRef": "#/components/schemas/RealtimeTranslationSession/properties/id",
798 "deprecated": false,
799 "key": "id",
800 "docstring": "Unique identifier for the session that looks like `sess_1234567890abcdef`.\n",
801 "type": {
802 "kind": "HttpTypeString"
803 },
804 "optional": false,
805 "nullable": false,
806 "schemaType": "string",
807 "children": []
808 },
809 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) audio": {
810 "kind": "HttpDeclProperty",
811 "oasRef": "#/components/schemas/RealtimeTranslationSession/properties/audio",
812 "deprecated": false,
813 "key": "audio",
814 "docstring": "Configuration for translation input and output audio.\n",
815 "type": {
816 "kind": "HttpTypeObject",
817 "members": [
818 {
819 "ident": "input"
820 },
821 {
822 "ident": "output"
823 }
824 ]
825 },
826 "optional": false,
827 "nullable": false,
828 "schemaType": "object",
829 "childrenParentSchema": "object",
830 "children": [
831 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) audio > (property) input",
832 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) audio > (property) output"
833 ]
834 },
835 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) expires_at": {
836 "kind": "HttpDeclProperty",
837 "oasRef": "#/components/schemas/RealtimeTranslationSession/properties/expires_at",
838 "deprecated": false,
839 "key": "expires_at",
840 "docstring": "Expiration timestamp for the session, in seconds since epoch.",
841 "type": {
842 "kind": "HttpTypeNumber"
843 },
844 "constraints": {
845 "format": "unixtime"
846 },
847 "optional": false,
848 "nullable": false,
849 "schemaType": "integer",
850 "children": []
851 },
852 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) model": {
853 "kind": "HttpDeclProperty",
854 "oasRef": "#/components/schemas/RealtimeTranslationSession/properties/model",
855 "deprecated": false,
856 "key": "model",
857 "docstring": "The Realtime translation model used for this session. This field is set at\nsession creation and cannot be changed with `session.update`.\n",
858 "type": {
859 "kind": "HttpTypeString"
860 },
861 "optional": false,
862 "nullable": false,
863 "schemaType": "string",
864 "children": []
865 },
866 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) type": {
867 "kind": "HttpDeclProperty",
868 "oasRef": "#/components/schemas/RealtimeTranslationSession/properties/type",
869 "deprecated": false,
870 "key": "type",
871 "docstring": "The session type. Always `translation` for Realtime translation sessions.\n",
872 "type": {
873 "kind": "HttpTypeUnion",
874 "oasRef": "#/components/schemas/RealtimeTranslationSession/properties/type",
875 "types": [
876 {
877 "kind": "HttpTypeLiteral",
878 "literal": "translation"
879 }
880 ]
881 },
882 "optional": false,
883 "nullable": false,
884 "schemaType": "enum",
885 "childrenParentSchema": "enum",
886 "children": [
887 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) type > (member) 0"
888 ]
889 },
890 "(resource) realtime > (model) realtime_translation_session > (schema)": {
891 "kind": "HttpDeclTypeAlias",
892 "oasRef": "#/components/schemas/RealtimeTranslationSession",
893 "docstring": "A Realtime translation session. Translation sessions continuously translate input\naudio into the configured output language.\n",
894 "ident": "RealtimeTranslationSession",
895 "type": {
896 "kind": "HttpTypeObject",
897 "members": [
898 {
899 "ident": "id"
900 },
901 {
902 "ident": "audio"
903 },
904 {
905 "ident": "expires_at"
906 },
907 {
908 "ident": "model"
909 },
910 {
911 "ident": "type"
912 }
913 ]
914 },
915 "childrenParentSchema": "object",
916 "children": [
917 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) id",
918 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) audio",
919 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) expires_at",
920 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) model",
921 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) type"
922 ]
923 },
924 "(resource) realtime > (model) realtime_translation_session_updated_event > (schema) > (property) type > (member) 0": {
925 "kind": "HttpDeclReference",
926 "type": {
927 "kind": "HttpTypeLiteral",
928 "literal": "session.updated"
929 }
930 },
931 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) audio > (property) input": {
932 "kind": "HttpDeclProperty",
933 "oasRef": "#/components/schemas/RealtimeTranslationSession/properties/audio/properties/input",
934 "deprecated": false,
935 "key": "input",
936 "type": {
937 "kind": "HttpTypeObject",
938 "members": [
939 {
940 "ident": "noise_reduction"
941 },
942 {
943 "ident": "transcription"
944 }
945 ]
946 },
947 "optional": true,
948 "nullable": false,
949 "schemaType": "object",
950 "childrenParentSchema": "object",
951 "children": [
952 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) audio > (property) input > (property) noise_reduction",
953 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) audio > (property) input > (property) transcription"
954 ]
955 },
956 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) audio > (property) output": {
957 "kind": "HttpDeclProperty",
958 "oasRef": "#/components/schemas/RealtimeTranslationSession/properties/audio/properties/output",
959 "deprecated": false,
960 "key": "output",
961 "type": {
962 "kind": "HttpTypeObject",
963 "members": [
964 {
965 "ident": "language"
966 }
967 ]
968 },
969 "optional": true,
970 "nullable": false,
971 "schemaType": "object",
972 "childrenParentSchema": "object",
973 "children": [
974 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) audio > (property) output > (property) language"
975 ]
976 },
977 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) type > (member) 0": {
978 "kind": "HttpDeclReference",
979 "type": {
980 "kind": "HttpTypeLiteral",
981 "literal": "translation"
982 }
983 },
984 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) audio > (property) input > (property) noise_reduction": {
985 "kind": "HttpDeclProperty",
986 "oasRef": "#/components/schemas/RealtimeTranslationSession/properties/audio/properties/input/properties/noise_reduction",
987 "deprecated": false,
988 "key": "noise_reduction",
989 "docstring": "Optional input noise reduction.\n",
990 "type": {
991 "kind": "HttpTypeObject",
992 "members": [
993 {
994 "ident": "type"
995 }
996 ]
997 },
998 "optional": true,
999 "nullable": true,
1000 "schemaType": "object",
1001 "childrenParentSchema": "object",
1002 "children": [
1003 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) audio > (property) input > (property) noise_reduction > (property) type"
1004 ]
1005 },
1006 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) audio > (property) input > (property) transcription": {
1007 "kind": "HttpDeclProperty",
1008 "oasRef": "#/components/schemas/RealtimeTranslationSession/properties/audio/properties/input/properties/transcription",
1009 "deprecated": false,
1010 "key": "transcription",
1011 "docstring": "Optional source-language transcription. When configured, the server emits\n`session.input_transcript.delta` events. Translation itself still runs from\nthe input audio stream.\n",
1012 "type": {
1013 "kind": "HttpTypeObject",
1014 "members": [
1015 {
1016 "ident": "model"
1017 }
1018 ]
1019 },
1020 "optional": true,
1021 "nullable": true,
1022 "schemaType": "object",
1023 "childrenParentSchema": "object",
1024 "children": [
1025 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) audio > (property) input > (property) transcription > (property) model"
1026 ]
1027 },
1028 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) audio > (property) output > (property) language": {
1029 "kind": "HttpDeclProperty",
1030 "oasRef": "#/components/schemas/RealtimeTranslationSession/properties/audio/properties/output/properties/language",
1031 "deprecated": false,
1032 "key": "language",
1033 "docstring": "Target language for translated output audio and transcript deltas.\n",
1034 "type": {
1035 "kind": "HttpTypeString"
1036 },
1037 "optional": true,
1038 "nullable": false,
1039 "schemaType": "string",
1040 "children": []
1041 },
1042 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) audio > (property) input > (property) noise_reduction > (property) type": {
1043 "kind": "HttpDeclProperty",
1044 "oasRef": "#/components/schemas/RealtimeTranslationSession/properties/audio/properties/input/properties/noise_reduction/anyOf/0/properties/type",
1045 "deprecated": false,
1046 "key": "type",
1047 "docstring": "Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.\n",
1048 "type": {
1049 "kind": "HttpTypeReference",
1050 "ident": "NoiseReductionType",
1051 "$ref": "(resource) realtime > (model) noise_reduction_type > (schema)"
1052 },
1053 "optional": false,
1054 "nullable": false,
1055 "modelImplicit": false,
1056 "schemaType": "enum",
1057 "modelPath": "(resource) realtime > (model) noise_reduction_type",
1058 "childrenParentSchema": "enum",
1059 "children": [
1060 "(resource) realtime > (model) noise_reduction_type > (schema) > (member) 0",
1061 "(resource) realtime > (model) noise_reduction_type > (schema) > (member) 1"
1062 ]
1063 },
1064 "(resource) realtime > (model) realtime_translation_session > (schema) > (property) audio > (property) input > (property) transcription > (property) model": {
1065 "kind": "HttpDeclProperty",
1066 "oasRef": "#/components/schemas/RealtimeTranslationSession/properties/audio/properties/input/properties/transcription/anyOf/0/properties/model",
1067 "deprecated": false,
1068 "key": "model",
1069 "docstring": "The transcription model used for source transcript deltas.",
1070 "type": {
1071 "kind": "HttpTypeString"
1072 },
1073 "optional": false,
1074 "nullable": false,
1075 "schemaType": "string",
1076 "children": []
1077 },
1078 "(resource) realtime > (model) noise_reduction_type > (schema) > (member) 0": {
1079 "kind": "HttpDeclReference",
1080 "type": {
1081 "kind": "HttpTypeLiteral",
1082 "literal": "near_field"
1083 }
1084 },
1085 "(resource) realtime > (model) noise_reduction_type > (schema) > (member) 1": {
1086 "kind": "HttpDeclReference",
1087 "type": {
1088 "kind": "HttpTypeLiteral",
1089 "literal": "far_field"
1090 }
1091 },
1092 "(resource) realtime > (model) noise_reduction_type > (schema)": {
1093 "kind": "HttpDeclTypeAlias",
1094 "oasRef": "#/components/schemas/NoiseReductionType",
1095 "docstring": "Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.\n",
1096 "ident": "NoiseReductionType",
1097 "type": {
1098 "kind": "HttpTypeUnion",
1099 "oasRef": "#/components/schemas/NoiseReductionType",
1100 "types": [
1101 {
1102 "kind": "HttpTypeLiteral",
1103 "literal": "near_field"
1104 },
1105 {
1106 "kind": "HttpTypeLiteral",
1107 "literal": "far_field"
1108 }
1109 ]
1110 },
1111 "childrenParentSchema": "enum",
1112 "children": [
1113 "(resource) realtime > (model) noise_reduction_type > (schema) > (member) 0",
1114 "(resource) realtime > (model) noise_reduction_type > (schema) > (member) 1"
1115 ]
1116 }
1117}
1118```
1119 254
1120### Example255### Example
1121 256
1146}281}
1147```282```
1148 283
284<a id="session.closed"></a>
285
1149## session.closed286## session.closed
1150 287
1151Returned when a realtime translation session is closed.288Returned when a realtime translation session is closed.
1154 291
1155Schema name: `RealtimeTranslationServerEventSessionClosed`292Schema name: `RealtimeTranslationServerEventSessionClosed`
1156 293
1157```json294- `event_id: string`
1158{295
1159 "(resource) realtime > (model) realtime_translation_session_closed_event > (schema)": {296 The unique ID of the server event.
1160 "kind": "HttpDeclTypeAlias",297
1161 "oasRef": "#/components/schemas/RealtimeTranslationServerEventSessionClosed",298- `type: "session.closed"`
1162 "docstring": "Returned when a realtime translation session is closed.\n",299
1163 "ident": "RealtimeTranslationSessionClosedEvent",300 The event type, must be `session.closed`.
1164 "type": {301
1165 "kind": "HttpTypeObject",302 - `"session.closed"`
1166 "members": [
1167 {
1168 "ident": "event_id"
1169 },
1170 {
1171 "ident": "type"
1172 }
1173 ]
1174 },
1175 "childrenParentSchema": "object",
1176 "children": [
1177 "(resource) realtime > (model) realtime_translation_session_closed_event > (schema) > (property) event_id",
1178 "(resource) realtime > (model) realtime_translation_session_closed_event > (schema) > (property) type"
1179 ]
1180 },
1181 "(resource) realtime > (model) realtime_translation_session_closed_event > (schema) > (property) event_id": {
1182 "kind": "HttpDeclProperty",
1183 "oasRef": "#/components/schemas/RealtimeTranslationServerEventSessionClosed/properties/event_id",
1184 "deprecated": false,
1185 "key": "event_id",
1186 "docstring": "The unique ID of the server event.",
1187 "type": {
1188 "kind": "HttpTypeString"
1189 },
1190 "optional": false,
1191 "nullable": false,
1192 "schemaType": "string",
1193 "children": []
1194 },
1195 "(resource) realtime > (model) realtime_translation_session_closed_event > (schema) > (property) type": {
1196 "kind": "HttpDeclProperty",
1197 "oasRef": "#/components/schemas/RealtimeTranslationServerEventSessionClosed/properties/type",
1198 "deprecated": false,
1199 "key": "type",
1200 "docstring": "The event type, must be `session.closed`.",
1201 "type": {
1202 "kind": "HttpTypeUnion",
1203 "oasRef": "#/components/schemas/RealtimeTranslationServerEventSessionClosed/properties/type",
1204 "types": [
1205 {
1206 "kind": "HttpTypeLiteral",
1207 "literal": "session.closed"
1208 }
1209 ]
1210 },
1211 "optional": false,
1212 "nullable": false,
1213 "schemaType": "enum",
1214 "childrenParentSchema": "enum",
1215 "children": [
1216 "(resource) realtime > (model) realtime_translation_session_closed_event > (schema) > (property) type > (member) 0"
1217 ]
1218 },
1219 "(resource) realtime > (model) realtime_translation_session_closed_event > (schema) > (property) type > (member) 0": {
1220 "kind": "HttpDeclReference",
1221 "type": {
1222 "kind": "HttpTypeLiteral",
1223 "literal": "session.closed"
1224 }
1225 }
1226}
1227```
1228 303
1229### Example304### Example
1230 305
1235}310}
1236```311```
1237 312
313<a id="session.input_transcript.delta"></a>
314
1238## session.input_transcript.delta315## session.input_transcript.delta
1239 316
1240Returned when optional source-language transcript text is available. This event317Returned when optional source-language transcript text is available. This event
1247 324
1248Schema name: `RealtimeTranslationServerEventSessionInputTranscriptDelta`325Schema name: `RealtimeTranslationServerEventSessionInputTranscriptDelta`
1249 326
1250```json327- `delta: string`
1251{328
1252 "(resource) realtime > (model) realtime_translation_input_transcript_delta_event > (schema)": {329 Append-only source-language transcript text.
1253 "kind": "HttpDeclTypeAlias",330
1254 "oasRef": "#/components/schemas/RealtimeTranslationServerEventSessionInputTranscriptDelta",331- `event_id: string`
1255 "docstring": "Returned when optional source-language transcript text is available. This event\nis emitted only when `audio.input.transcription` is configured.\n\nTranscript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.\n",332
1256 "ident": "RealtimeTranslationInputTranscriptDeltaEvent",333 The unique ID of the server event.
1257 "type": {334
1258 "kind": "HttpTypeObject",335- `type: "session.input_transcript.delta"`
1259 "members": [336
1260 {337 The event type, must be `session.input_transcript.delta`.
1261 "ident": "delta"338
1262 },339 - `"session.input_transcript.delta"`
1263 {340
1264 "ident": "event_id"341- `elapsed_ms: optional number or null`
1265 },342
1266 {343 Timing metadata for stream alignment, derived from the translation frame
1267 "ident": "type"344 when available. It advances in 200 ms increments, but multiple transcript
1268 },345 deltas may share the same `elapsed_ms`. Treat it as alignment metadata,
1269 {346 not a unique transcript-delta identifier.
1270 "ident": "elapsed_ms"
1271 }
1272 ]
1273 },
1274 "childrenParentSchema": "object",
1275 "children": [
1276 "(resource) realtime > (model) realtime_translation_input_transcript_delta_event > (schema) > (property) delta",
1277 "(resource) realtime > (model) realtime_translation_input_transcript_delta_event > (schema) > (property) event_id",
1278 "(resource) realtime > (model) realtime_translation_input_transcript_delta_event > (schema) > (property) type",
1279 "(resource) realtime > (model) realtime_translation_input_transcript_delta_event > (schema) > (property) elapsed_ms"
1280 ]
1281 },
1282 "(resource) realtime > (model) realtime_translation_input_transcript_delta_event > (schema) > (property) delta": {
1283 "kind": "HttpDeclProperty",
1284 "oasRef": "#/components/schemas/RealtimeTranslationServerEventSessionInputTranscriptDelta/properties/delta",
1285 "deprecated": false,
1286 "key": "delta",
1287 "docstring": "Append-only source-language transcript text.",
1288 "type": {
1289 "kind": "HttpTypeString"
1290 },
1291 "optional": false,
1292 "nullable": false,
1293 "schemaType": "string",
1294 "children": []
1295 },
1296 "(resource) realtime > (model) realtime_translation_input_transcript_delta_event > (schema) > (property) event_id": {
1297 "kind": "HttpDeclProperty",
1298 "oasRef": "#/components/schemas/RealtimeTranslationServerEventSessionInputTranscriptDelta/properties/event_id",
1299 "deprecated": false,
1300 "key": "event_id",
1301 "docstring": "The unique ID of the server event.",
1302 "type": {
1303 "kind": "HttpTypeString"
1304 },
1305 "optional": false,
1306 "nullable": false,
1307 "schemaType": "string",
1308 "children": []
1309 },
1310 "(resource) realtime > (model) realtime_translation_input_transcript_delta_event > (schema) > (property) type": {
1311 "kind": "HttpDeclProperty",
1312 "oasRef": "#/components/schemas/RealtimeTranslationServerEventSessionInputTranscriptDelta/properties/type",
1313 "deprecated": false,
1314 "key": "type",
1315 "docstring": "The event type, must be `session.input_transcript.delta`.",
1316 "type": {
1317 "kind": "HttpTypeUnion",
1318 "oasRef": "#/components/schemas/RealtimeTranslationServerEventSessionInputTranscriptDelta/properties/type",
1319 "types": [
1320 {
1321 "kind": "HttpTypeLiteral",
1322 "literal": "session.input_transcript.delta"
1323 }
1324 ]
1325 },
1326 "optional": false,
1327 "nullable": false,
1328 "schemaType": "enum",
1329 "childrenParentSchema": "enum",
1330 "children": [
1331 "(resource) realtime > (model) realtime_translation_input_transcript_delta_event > (schema) > (property) type > (member) 0"
1332 ]
1333 },
1334 "(resource) realtime > (model) realtime_translation_input_transcript_delta_event > (schema) > (property) elapsed_ms": {
1335 "kind": "HttpDeclProperty",
1336 "oasRef": "#/components/schemas/RealtimeTranslationServerEventSessionInputTranscriptDelta/properties/elapsed_ms",
1337 "deprecated": false,
1338 "key": "elapsed_ms",
1339 "docstring": "Timing metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n",
1340 "type": {
1341 "kind": "HttpTypeNumber"
1342 },
1343 "optional": true,
1344 "nullable": true,
1345 "schemaType": "integer",
1346 "children": []
1347 },
1348 "(resource) realtime > (model) realtime_translation_input_transcript_delta_event > (schema) > (property) type > (member) 0": {
1349 "kind": "HttpDeclReference",
1350 "type": {
1351 "kind": "HttpTypeLiteral",
1352 "literal": "session.input_transcript.delta"
1353 }
1354 }
1355}
1356```
1357 347
1358### Example348### Example
1359 349
1366}356}
1367```357```
1368 358
359<a id="session.output_transcript.delta"></a>
360
1369## session.output_transcript.delta361## session.output_transcript.delta
1370 362
1371Returned when translated transcript text is available.363Returned when translated transcript text is available.
1377 369
1378Schema name: `RealtimeTranslationServerEventSessionOutputTranscriptDelta`370Schema name: `RealtimeTranslationServerEventSessionOutputTranscriptDelta`
1379 371
1380```json372- `delta: string`
1381{373
1382 "(resource) realtime > (model) realtime_translation_output_transcript_delta_event > (schema)": {374 Append-only transcript text for the translated output audio.
1383 "kind": "HttpDeclTypeAlias",375
1384 "oasRef": "#/components/schemas/RealtimeTranslationServerEventSessionOutputTranscriptDelta",376- `event_id: string`
1385 "docstring": "Returned when translated transcript text is available.\n\nTranscript deltas are append-only text fragments. Clients should not insert\nunconditional spaces between deltas.\n",377
1386 "ident": "RealtimeTranslationOutputTranscriptDeltaEvent",378 The unique ID of the server event.
1387 "type": {379
1388 "kind": "HttpTypeObject",380- `type: "session.output_transcript.delta"`
1389 "members": [381
1390 {382 The event type, must be `session.output_transcript.delta`.
1391 "ident": "delta"383
1392 },384 - `"session.output_transcript.delta"`
1393 {385
1394 "ident": "event_id"386- `elapsed_ms: optional number or null`
1395 },387
1396 {388 Timing metadata for stream alignment, derived from the translation frame
1397 "ident": "type"389 when available. It advances in 200 ms increments, but multiple transcript
1398 },390 deltas may share the same `elapsed_ms`. Treat it as alignment metadata,
1399 {391 not a unique transcript-delta identifier.
1400 "ident": "elapsed_ms"
1401 }
1402 ]
1403 },
1404 "childrenParentSchema": "object",
1405 "children": [
1406 "(resource) realtime > (model) realtime_translation_output_transcript_delta_event > (schema) > (property) delta",
1407 "(resource) realtime > (model) realtime_translation_output_transcript_delta_event > (schema) > (property) event_id",
1408 "(resource) realtime > (model) realtime_translation_output_transcript_delta_event > (schema) > (property) type",
1409 "(resource) realtime > (model) realtime_translation_output_transcript_delta_event > (schema) > (property) elapsed_ms"
1410 ]
1411 },
1412 "(resource) realtime > (model) realtime_translation_output_transcript_delta_event > (schema) > (property) delta": {
1413 "kind": "HttpDeclProperty",
1414 "oasRef": "#/components/schemas/RealtimeTranslationServerEventSessionOutputTranscriptDelta/properties/delta",
1415 "deprecated": false,
1416 "key": "delta",
1417 "docstring": "Append-only transcript text for the translated output audio.",
1418 "type": {
1419 "kind": "HttpTypeString"
1420 },
1421 "optional": false,
1422 "nullable": false,
1423 "schemaType": "string",
1424 "children": []
1425 },
1426 "(resource) realtime > (model) realtime_translation_output_transcript_delta_event > (schema) > (property) event_id": {
1427 "kind": "HttpDeclProperty",
1428 "oasRef": "#/components/schemas/RealtimeTranslationServerEventSessionOutputTranscriptDelta/properties/event_id",
1429 "deprecated": false,
1430 "key": "event_id",
1431 "docstring": "The unique ID of the server event.",
1432 "type": {
1433 "kind": "HttpTypeString"
1434 },
1435 "optional": false,
1436 "nullable": false,
1437 "schemaType": "string",
1438 "children": []
1439 },
1440 "(resource) realtime > (model) realtime_translation_output_transcript_delta_event > (schema) > (property) type": {
1441 "kind": "HttpDeclProperty",
1442 "oasRef": "#/components/schemas/RealtimeTranslationServerEventSessionOutputTranscriptDelta/properties/type",
1443 "deprecated": false,
1444 "key": "type",
1445 "docstring": "The event type, must be `session.output_transcript.delta`.",
1446 "type": {
1447 "kind": "HttpTypeUnion",
1448 "oasRef": "#/components/schemas/RealtimeTranslationServerEventSessionOutputTranscriptDelta/properties/type",
1449 "types": [
1450 {
1451 "kind": "HttpTypeLiteral",
1452 "literal": "session.output_transcript.delta"
1453 }
1454 ]
1455 },
1456 "optional": false,
1457 "nullable": false,
1458 "schemaType": "enum",
1459 "childrenParentSchema": "enum",
1460 "children": [
1461 "(resource) realtime > (model) realtime_translation_output_transcript_delta_event > (schema) > (property) type > (member) 0"
1462 ]
1463 },
1464 "(resource) realtime > (model) realtime_translation_output_transcript_delta_event > (schema) > (property) elapsed_ms": {
1465 "kind": "HttpDeclProperty",
1466 "oasRef": "#/components/schemas/RealtimeTranslationServerEventSessionOutputTranscriptDelta/properties/elapsed_ms",
1467 "deprecated": false,
1468 "key": "elapsed_ms",
1469 "docstring": "Timing metadata for stream alignment, derived from the translation frame\nwhen available. It advances in 200 ms increments, but multiple transcript\ndeltas may share the same `elapsed_ms`. Treat it as alignment metadata,\nnot a unique transcript-delta identifier.\n",
1470 "type": {
1471 "kind": "HttpTypeNumber"
1472 },
1473 "optional": true,
1474 "nullable": true,
1475 "schemaType": "integer",
1476 "children": []
1477 },
1478 "(resource) realtime > (model) realtime_translation_output_transcript_delta_event > (schema) > (property) type > (member) 0": {
1479 "kind": "HttpDeclReference",
1480 "type": {
1481 "kind": "HttpTypeLiteral",
1482 "literal": "session.output_transcript.delta"
1483 }
1484 }
1485}
1486```
1487 392
1488### Example393### Example
1489 394
1496}401}
1497```402```
1498 403
404<a id="session.output_audio.delta"></a>
405
1499## session.output_audio.delta406## session.output_audio.delta
1500 407
1501Returned when translated output audio is available. The `delta` contains a408Returned when translated output audio is available. The `delta` contains a
1506 413
1507Schema name: `RealtimeTranslationServerEventSessionOutputAudioDelta`414Schema name: `RealtimeTranslationServerEventSessionOutputAudioDelta`
1508 415
1509```json416- `delta: string`
1510{417
1511 "(resource) realtime > (model) realtime_translation_output_audio_delta_event > (schema)": {418 Base64-encoded translated audio data.
1512 "kind": "HttpDeclTypeAlias",419
1513 "oasRef": "#/components/schemas/RealtimeTranslationServerEventSessionOutputAudioDelta",420- `event_id: string`
1514 "docstring": "Returned when translated output audio is available. The `delta` contains a\nPCM16 audio chunk whose length can vary. Clients should decode and queue the\ncomplete delta instead of assuming a fixed byte or sample count.\n",421
1515 "ident": "RealtimeTranslationOutputAudioDeltaEvent",422 The unique ID of the server event.
1516 "type": {423
1517 "kind": "HttpTypeObject",424- `type: "session.output_audio.delta"`
1518 "members": [425
1519 {426 The event type, must be `session.output_audio.delta`.
1520 "ident": "delta"427
1521 },428 - `"session.output_audio.delta"`
1522 {429
1523 "ident": "event_id"430- `channels: optional number`
1524 },431
1525 {432 Number of audio channels.
1526 "ident": "type"433
1527 },434- `elapsed_ms: optional number or null`
1528 {435
1529 "ident": "channels"436 Timing metadata for stream alignment, derived from the translation frame
1530 },437 when available. Treat `elapsed_ms` as alignment metadata, not a unique
1531 {438 event identifier.
1532 "ident": "elapsed_ms"439
1533 },440- `format: optional "pcm16"`
1534 {441
1535 "ident": "format"442 Audio encoding for `delta`.
1536 },443
1537 {444 - `"pcm16"`
1538 "ident": "sample_rate"445
1539 }446- `sample_rate: optional number`
1540 ]447
1541 },448 Sample rate of the audio delta.
1542 "childrenParentSchema": "object",
1543 "children": [
1544 "(resource) realtime > (model) realtime_translation_output_audio_delta_event > (schema) > (property) delta",
1545 "(resource) realtime > (model) realtime_translation_output_audio_delta_event > (schema) > (property) event_id",
1546 "(resource) realtime > (model) realtime_translation_output_audio_delta_event > (schema) > (property) type",
1547 "(resource) realtime > (model) realtime_translation_output_audio_delta_event > (schema) > (property) channels",
1548 "(resource) realtime > (model) realtime_translation_output_audio_delta_event > (schema) > (property) elapsed_ms",
1549 "(resource) realtime > (model) realtime_translation_output_audio_delta_event > (schema) > (property) format",
1550 "(resource) realtime > (model) realtime_translation_output_audio_delta_event > (schema) > (property) sample_rate"
1551 ]
1552 },
1553 "(resource) realtime > (model) realtime_translation_output_audio_delta_event > (schema) > (property) delta": {
1554 "kind": "HttpDeclProperty",
1555 "oasRef": "#/components/schemas/RealtimeTranslationServerEventSessionOutputAudioDelta/properties/delta",
1556 "deprecated": false,
1557 "key": "delta",
1558 "docstring": "Base64-encoded translated audio data.",
1559 "type": {
1560 "kind": "HttpTypeString"
1561 },
1562 "optional": false,
1563 "nullable": false,
1564 "schemaType": "string",
1565 "children": []
1566 },
1567 "(resource) realtime > (model) realtime_translation_output_audio_delta_event > (schema) > (property) event_id": {
1568 "kind": "HttpDeclProperty",
1569 "oasRef": "#/components/schemas/RealtimeTranslationServerEventSessionOutputAudioDelta/properties/event_id",
1570 "deprecated": false,
1571 "key": "event_id",
1572 "docstring": "The unique ID of the server event.",
1573 "type": {
1574 "kind": "HttpTypeString"
1575 },
1576 "optional": false,
1577 "nullable": false,
1578 "schemaType": "string",
1579 "children": []
1580 },
1581 "(resource) realtime > (model) realtime_translation_output_audio_delta_event > (schema) > (property) type": {
1582 "kind": "HttpDeclProperty",
1583 "oasRef": "#/components/schemas/RealtimeTranslationServerEventSessionOutputAudioDelta/properties/type",
1584 "deprecated": false,
1585 "key": "type",
1586 "docstring": "The event type, must be `session.output_audio.delta`.",
1587 "type": {
1588 "kind": "HttpTypeUnion",
1589 "oasRef": "#/components/schemas/RealtimeTranslationServerEventSessionOutputAudioDelta/properties/type",
1590 "types": [
1591 {
1592 "kind": "HttpTypeLiteral",
1593 "literal": "session.output_audio.delta"
1594 }
1595 ]
1596 },
1597 "optional": false,
1598 "nullable": false,
1599 "schemaType": "enum",
1600 "childrenParentSchema": "enum",
1601 "children": [
1602 "(resource) realtime > (model) realtime_translation_output_audio_delta_event > (schema) > (property) type > (member) 0"
1603 ]
1604 },
1605 "(resource) realtime > (model) realtime_translation_output_audio_delta_event > (schema) > (property) channels": {
1606 "kind": "HttpDeclProperty",
1607 "oasRef": "#/components/schemas/RealtimeTranslationServerEventSessionOutputAudioDelta/properties/channels",
1608 "deprecated": false,
1609 "key": "channels",
1610 "docstring": "Number of audio channels.",
1611 "type": {
1612 "kind": "HttpTypeNumber"
1613 },
1614 "default": 1,
1615 "optional": true,
1616 "nullable": false,
1617 "schemaType": "integer",
1618 "children": []
1619 },
1620 "(resource) realtime > (model) realtime_translation_output_audio_delta_event > (schema) > (property) elapsed_ms": {
1621 "kind": "HttpDeclProperty",
1622 "oasRef": "#/components/schemas/RealtimeTranslationServerEventSessionOutputAudioDelta/properties/elapsed_ms",
1623 "deprecated": false,
1624 "key": "elapsed_ms",
1625 "docstring": "Timing metadata for stream alignment, derived from the translation frame\nwhen available. Treat `elapsed_ms` as alignment metadata, not a unique\nevent identifier.\n",
1626 "type": {
1627 "kind": "HttpTypeNumber"
1628 },
1629 "optional": true,
1630 "nullable": true,
1631 "schemaType": "integer",
1632 "children": []
1633 },
1634 "(resource) realtime > (model) realtime_translation_output_audio_delta_event > (schema) > (property) format": {
1635 "kind": "HttpDeclProperty",
1636 "oasRef": "#/components/schemas/RealtimeTranslationServerEventSessionOutputAudioDelta/properties/format",
1637 "deprecated": false,
1638 "key": "format",
1639 "docstring": "Audio encoding for `delta`.",
1640 "type": {
1641 "kind": "HttpTypeUnion",
1642 "oasRef": "#/components/schemas/RealtimeTranslationServerEventSessionOutputAudioDelta/properties/format",
1643 "types": [
1644 {
1645 "kind": "HttpTypeLiteral",
1646 "literal": "pcm16"
1647 }
1648 ]
1649 },
1650 "optional": true,
1651 "nullable": false,
1652 "schemaType": "enum",
1653 "childrenParentSchema": "enum",
1654 "children": [
1655 "(resource) realtime > (model) realtime_translation_output_audio_delta_event > (schema) > (property) format > (member) 0"
1656 ]
1657 },
1658 "(resource) realtime > (model) realtime_translation_output_audio_delta_event > (schema) > (property) sample_rate": {
1659 "kind": "HttpDeclProperty",
1660 "oasRef": "#/components/schemas/RealtimeTranslationServerEventSessionOutputAudioDelta/properties/sample_rate",
1661 "deprecated": false,
1662 "key": "sample_rate",
1663 "docstring": "Sample rate of the audio delta.",
1664 "type": {
1665 "kind": "HttpTypeNumber"
1666 },
1667 "default": 24000,
1668 "optional": true,
1669 "nullable": false,
1670 "schemaType": "integer",
1671 "children": []
1672 },
1673 "(resource) realtime > (model) realtime_translation_output_audio_delta_event > (schema) > (property) type > (member) 0": {
1674 "kind": "HttpDeclReference",
1675 "type": {
1676 "kind": "HttpTypeLiteral",
1677 "literal": "session.output_audio.delta"
1678 }
1679 },
1680 "(resource) realtime > (model) realtime_translation_output_audio_delta_event > (schema) > (property) format > (member) 0": {
1681 "kind": "HttpDeclReference",
1682 "type": {
1683 "kind": "HttpTypeLiteral",
1684 "literal": "pcm16"
1685 }
1686 }
1687}
1688```
1689 449
1690### Example450### Example
1691 451