|
58 | 58 | "sample_rate": {
|
59 | 59 | "description": "The sample rate of the streamed audio",
|
60 | 60 | "type": "integer",
|
61 |
| - "examples": [16000] |
| 61 | + "examples": [ |
| 62 | + 16000 |
| 63 | + ] |
62 | 64 | },
|
63 | 65 | "word_boost": {
|
64 | 66 | "description": "Add up to 2500 characters of custom vocabulary.\nThe parameter value must be a JSON encoded array of strings.\n",
|
65 | 67 | "type": "string",
|
66 |
| - "examples": ["[\"foo\",\"bar\"]"] |
| 68 | + "examples": [ |
| 69 | + "[\"foo\",\"bar\"]" |
| 70 | + ] |
67 | 71 | },
|
68 | 72 | "encoding": {
|
69 | 73 | "description": "The encoding of the audio data",
|
70 | 74 | "$ref": "#/components/schemas/AudioEncoding"
|
71 | 75 | },
|
72 | 76 | "token": {
|
73 |
| - "description": "Authenticate using a [generated temporary token](https://www.assemblyai.com/docs/speech-to-text/streaming#authenticate-with-a-temporary-token)", |
| 77 | + "description": "Authenticate using a [generated temporary token](https://www.assemblyai.com/docs/speech-to-text/streaming#authenticate-with-a-temporary-token)\n", |
74 | 78 | "type": "string",
|
75 |
| - "format": "password" |
| 79 | + "format": "password", |
| 80 | + "examples": [ |
| 81 | + "eyJhbGciOiJIUzI1..." |
| 82 | + ] |
| 83 | + }, |
| 84 | + "disable_partial_transcripts": { |
| 85 | + "summary": "Disable partial transcripts", |
| 86 | + "description": "Set to true to not receive partial transcripts. Defaults to false.", |
| 87 | + "type": "boolean", |
| 88 | + "default": false |
| 89 | + }, |
| 90 | + "enable_extra_session_information": { |
| 91 | + "summary": "Enable extra session information", |
| 92 | + "description": "Set to true to receive the SessionInformation message before the session ends. Defaults to false.", |
| 93 | + "type": "boolean", |
| 94 | + "default": false |
76 | 95 | }
|
77 | 96 | }
|
78 | 97 | }
|
|
112 | 131 | {
|
113 | 132 | "$ref": "#/components/messages/FinalTranscript"
|
114 | 133 | },
|
| 134 | + { |
| 135 | + "$ref": "#/components/messages/SessionInformation" |
| 136 | + }, |
115 | 137 | {
|
116 | 138 | "$ref": "#/components/messages/SessionTerminated"
|
117 | 139 | },
|
|
126 | 148 | "query-parameters": {
|
127 | 149 | "sample_rate": 16000,
|
128 | 150 | "word_boost": "[\"foo\",\"bar\"]",
|
129 |
| - "encoding": "pcm_s16le" |
| 151 | + "encoding": "pcm_s16le", |
| 152 | + "token": "eyJhbGciOiJIUzI1...", |
| 153 | + "disable_partial_transcripts": true, |
| 154 | + "enable_extra_session_information": true |
130 | 155 | },
|
131 | 156 | "messages": [
|
132 | 157 | {
|
133 |
| - "type": "publish", |
134 | 158 | "messageId": "SendAudio",
|
| 159 | + "type": "publish", |
135 | 160 | "value": "UklGRtjIAABXQVZFZ"
|
136 | 161 | },
|
137 | 162 | {
|
138 |
| - "type": "subscribe", |
139 | 163 | "messageId": "PartialTranscript",
|
| 164 | + "type": "subscribe", |
140 | 165 | "value": {
|
141 | 166 | "audio_start": 0,
|
142 | 167 | "audio_end": 1500,
|
|
154 | 179 | }
|
155 | 180 | },
|
156 | 181 | {
|
157 |
| - "type": "subscribe", |
158 | 182 | "messageId": "FinalTranscript",
|
| 183 | + "type": "subscribe", |
159 | 184 | "value": {
|
160 | 185 | "audio_start": 0,
|
161 | 186 | "audio_end": 1500,
|
|
230 | 255 | "$ref": "#/components/schemas/SessionBegins"
|
231 | 256 | }
|
232 | 257 | },
|
| 258 | + "SessionInformation": { |
| 259 | + "messageId": "SessionInformation", |
| 260 | + "summary": "Information about the session", |
| 261 | + "description": "Information about the session that is concluding.\nThis message is sent at the end of the session, before the SessionTerminated message.\n", |
| 262 | + "payload": { |
| 263 | + "$ref": "#/components/schemas/SessionInformation" |
| 264 | + } |
| 265 | + }, |
233 | 266 | "SessionTerminated": {
|
234 | 267 | "messageId": "SessionTerminated",
|
235 | 268 | "summary": "Session terminated",
|
|
264 | 297 | "RealtimeBaseMessage": {
|
265 | 298 | "type": "object",
|
266 | 299 | "x-fern-sdk-group-name": "realtime",
|
267 |
| - "required": ["message_type"], |
| 300 | + "required": [ |
| 301 | + "message_type" |
| 302 | + ], |
268 | 303 | "properties": {
|
269 | 304 | "message_type": {
|
270 | 305 | "description": "Describes the type of the message",
|
|
284 | 319 | {
|
285 | 320 | "$ref": "#/components/schemas/FinalTranscript"
|
286 | 321 | },
|
| 322 | + { |
| 323 | + "$ref": "#/components/schemas/SessionInformation" |
| 324 | + }, |
287 | 325 | {
|
288 | 326 | "$ref": "#/components/schemas/SessionTerminated"
|
289 | 327 | },
|
|
293 | 331 | ]
|
294 | 332 | },
|
295 | 333 | "RealtimeError": {
|
| 334 | + "summary": "Error message", |
296 | 335 | "type": "object",
|
297 | 336 | "x-fern-sdk-group-name": "realtime",
|
298 | 337 | "additionalProperties": false,
|
299 |
| - "required": ["error"], |
| 338 | + "required": [ |
| 339 | + "error" |
| 340 | + ], |
300 | 341 | "properties": {
|
301 | 342 | "error": {
|
302 | 343 | "type": "string"
|
|
315 | 356 | "SessionBegins",
|
316 | 357 | "PartialTranscript",
|
317 | 358 | "FinalTranscript",
|
| 359 | + "SessionInformation", |
318 | 360 | "SessionTerminated"
|
319 | 361 | ]
|
320 | 362 | },
|
321 | 363 | "RealtimeTranscriptType": {
|
322 | 364 | "type": "string",
|
323 | 365 | "x-fern-sdk-group-name": "realtime",
|
324 |
| - "enum": ["PartialTranscript", "FinalTranscript"] |
| 366 | + "enum": [ |
| 367 | + "PartialTranscript", |
| 368 | + "FinalTranscript" |
| 369 | + ] |
325 | 370 | },
|
326 | 371 | "RealtimeTranscript": {
|
327 | 372 | "x-fern-sdk-group-name": "realtime",
|
|
336 | 381 | "discriminator": "message_type"
|
337 | 382 | },
|
338 | 383 | "SessionBegins": {
|
| 384 | + "summary": "Session start", |
339 | 385 | "x-fern-sdk-group-name": "realtime",
|
340 | 386 | "allOf": [
|
341 | 387 | {
|
342 | 388 | "$ref": "#/components/schemas/RealtimeBaseMessage"
|
343 | 389 | },
|
344 | 390 | {
|
345 | 391 | "type": "object",
|
346 |
| - "required": ["message_type", "session_id", "expires_at"], |
| 392 | + "required": [ |
| 393 | + "message_type", |
| 394 | + "session_id", |
| 395 | + "expires_at" |
| 396 | + ], |
347 | 397 | "properties": {
|
348 | 398 | "message_type": {
|
349 | 399 | "description": "Describes the type of the message",
|
|
374 | 424 | }
|
375 | 425 | ]
|
376 | 426 | },
|
| 427 | + "SessionInformation": { |
| 428 | + "summary": "Information about the session", |
| 429 | + "description": "Information about the session that is concluding.\nThis message is sent at the end of the session, before the SessionTerminated message.\n", |
| 430 | + "x-fern-sdk-group-name": "realtime", |
| 431 | + "allOf": [ |
| 432 | + { |
| 433 | + "$ref": "#/components/schemas/RealtimeBaseMessage" |
| 434 | + }, |
| 435 | + { |
| 436 | + "type": "object", |
| 437 | + "required": [ |
| 438 | + "message_type", |
| 439 | + "audio_duration_seconds" |
| 440 | + ], |
| 441 | + "properties": { |
| 442 | + "message_type": { |
| 443 | + "description": "Describes the type of the message", |
| 444 | + "type": "string", |
| 445 | + "const": "SessionInformation" |
| 446 | + }, |
| 447 | + "audio_duration_seconds": { |
| 448 | + "description": "The total duration of the audio in seconds", |
| 449 | + "type": "number", |
| 450 | + "format": "float" |
| 451 | + } |
| 452 | + }, |
| 453 | + "additionalProperties": false |
| 454 | + } |
| 455 | + ], |
| 456 | + "examples": [ |
| 457 | + { |
| 458 | + "message_type": "SessionInformation", |
| 459 | + "audio_duration_seconds": 232.192 |
| 460 | + } |
| 461 | + ] |
| 462 | + }, |
377 | 463 | "SessionTerminated": {
|
| 464 | + "summary": "Session terminated", |
378 | 465 | "x-fern-sdk-group-name": "realtime",
|
379 | 466 | "allOf": [
|
380 | 467 | {
|
381 | 468 | "$ref": "#/components/schemas/RealtimeBaseMessage"
|
382 | 469 | },
|
383 | 470 | {
|
384 | 471 | "type": "object",
|
385 |
| - "required": ["message_type"], |
| 472 | + "required": [ |
| 473 | + "message_type" |
| 474 | + ], |
386 | 475 | "properties": {
|
387 | 476 | "message_type": {
|
388 | 477 | "description": "Describes the type of the message",
|
|
448 | 537 | "additionalProperties": false
|
449 | 538 | },
|
450 | 539 | "PartialTranscript": {
|
| 540 | + "summary": "As you send audio data to the API, the API immediately starts responding with Partial Transcript results.", |
451 | 541 | "x-fern-sdk-group-name": "realtime",
|
452 | 542 | "allOf": [
|
453 | 543 | {
|
454 | 544 | "$ref": "#/components/schemas/RealtimeBaseTranscript"
|
455 | 545 | },
|
456 | 546 | {
|
457 | 547 | "type": "object",
|
458 |
| - "required": ["message_type"], |
| 548 | + "required": [ |
| 549 | + "message_type" |
| 550 | + ], |
459 | 551 | "properties": {
|
460 | 552 | "message_type": {
|
461 | 553 | "description": "Describes the type of message",
|
|
504 | 596 | ]
|
505 | 597 | },
|
506 | 598 | "FinalTranscript": {
|
| 599 | + "summary": "Transcript text at the end of an utterance with punctuation and casing.", |
507 | 600 | "x-fern-sdk-group-name": "realtime",
|
508 | 601 | "allOf": [
|
509 | 602 | {
|
510 | 603 | "$ref": "#/components/schemas/RealtimeBaseTranscript"
|
511 | 604 | },
|
512 | 605 | {
|
513 | 606 | "type": "object",
|
514 |
| - "required": ["message_type", "punctuated", "text_formatted"], |
| 607 | + "required": [ |
| 608 | + "message_type", |
| 609 | + "punctuated", |
| 610 | + "text_formatted" |
| 611 | + ], |
515 | 612 | "properties": {
|
516 | 613 | "message_type": {
|
517 | 614 | "description": "Describes the type of message",
|
|
614 | 711 | "Word": {
|
615 | 712 | "type": "object",
|
616 | 713 | "x-fern-sdk-group-name": "realtime",
|
617 |
| - "required": ["start", "end", "confidence", "text"], |
| 714 | + "required": [ |
| 715 | + "start", |
| 716 | + "end", |
| 717 | + "confidence", |
| 718 | + "text" |
| 719 | + ], |
618 | 720 | "properties": {
|
619 | 721 | "start": {
|
620 | 722 | "description": "Start time of the word in milliseconds",
|
|
693 | 795 | "description": "Manually end an utterance",
|
694 | 796 | "x-fern-sdk-group-name": "realtime",
|
695 | 797 | "type": "object",
|
696 |
| - "required": ["force_end_utterance"], |
| 798 | + "required": [ |
| 799 | + "force_end_utterance" |
| 800 | + ], |
697 | 801 | "properties": {
|
698 | 802 | "force_end_utterance": {
|
699 | 803 | "description": "A boolean value to communicate that you wish to force the end of the utterance",
|
|
711 | 815 | "description": "Configure the threshold for how long to wait before ending an utterance. Default is 700ms.",
|
712 | 816 | "x-fern-sdk-group-name": "realtime",
|
713 | 817 | "type": "object",
|
714 |
| - "required": ["end_utterance_silence_threshold"], |
| 818 | + "required": [ |
| 819 | + "end_utterance_silence_threshold" |
| 820 | + ], |
715 | 821 | "properties": {
|
716 | 822 | "end_utterance_silence_threshold": {
|
717 | 823 | "description": "The duration threshold in milliseconds",
|
|
728 | 834 | ]
|
729 | 835 | },
|
730 | 836 | "TerminateSession": {
|
| 837 | + "summary": "Terminate session", |
731 | 838 | "x-fern-sdk-group-name": "realtime",
|
732 | 839 | "type": "object",
|
733 |
| - "required": ["terminate_session"], |
| 840 | + "required": [ |
| 841 | + "terminate_session" |
| 842 | + ], |
734 | 843 | "properties": {
|
735 | 844 | "terminate_session": {
|
736 | 845 | "description": "Set to true to end your streaming session forever",
|
|
749 | 858 | "x-fern-sdk-group-name": "realtime",
|
750 | 859 | "description": "The encoding of the audio data",
|
751 | 860 | "default": "pcm_s16le",
|
752 |
| - "enum": ["pcm_s16le", "pcm_mulaw"], |
| 861 | + "enum": [ |
| 862 | + "pcm_s16le", |
| 863 | + "pcm_mulaw" |
| 864 | + ], |
753 | 865 | "x-fern-enum": {
|
754 | 866 | "pcm_s16le": {
|
755 | 867 | "description": "PCM signed 16-bit little-endian",
|
|
770 | 882 | }
|
771 | 883 | }
|
772 | 884 | },
|
773 |
| - "examples": ["pcm_s16le", "pcm_mulaw"] |
| 885 | + "examples": [ |
| 886 | + "pcm_s16le", |
| 887 | + "pcm_mulaw" |
| 888 | + ] |
774 | 889 | }
|
775 | 890 | },
|
776 | 891 | "securitySchemes": {
|
|
0 commit comments