vis-agent 0.5.22.dev9332__py3-none-any.whl → 0.5.22.dev9358__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,737 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://vis.blockether.com/schema/voice.json",
4
+ "title": "Live voice",
5
+ "description": "Local speech with exclusive capture, bounded media and independent task control.",
6
+ "x-vis-voice-limits": {
7
+ "sample_rate": 24000,
8
+ "frame_ms": 20,
9
+ "frame_samples": 480,
10
+ "header_bytes": 12,
11
+ "input_buffer_ms": 2000,
12
+ "output_credit_ms": 1000,
13
+ "preroll_ms": 200,
14
+ "max_utterance_ms": 30000,
15
+ "endpoint_silence_ms": 1100,
16
+ "min_speech_ms": 120,
17
+ "lease_ms": 15000,
18
+ "heartbeat_ms": 5000,
19
+ "ticket_ms": 15000,
20
+ "max_control_bytes": 8192,
21
+ "max_sessions": 1,
22
+ "max_pending_utterances": 2,
23
+ "max_pending_segments": 8,
24
+ "max_projection_chars": 65536,
25
+ "max_speech_segment_chars": 400,
26
+ "max_speech_segments": 256,
27
+ "max_admissions": 1024,
28
+ "max_retained_sessions": 16,
29
+ "retention_ms": 300000,
30
+ "max_pending_inputs": 32
31
+ },
32
+ "x-vis-voice-frame": {
33
+ "byte_order": "little_endian",
34
+ "encoding": "pcm_s16le",
35
+ "channels": 1,
36
+ "fields": [
37
+ "generation",
38
+ "stream_id",
39
+ "sample_offset"
40
+ ]
41
+ },
42
+ "$defs": {
43
+ "uint32": {
44
+ "type": "integer",
45
+ "minimum": 0,
46
+ "maximum": 4294967295
47
+ },
48
+ "start": {
49
+ "type": "object",
50
+ "properties": {
51
+ "schema": {
52
+ "const": 1
53
+ },
54
+ "client_id": {
55
+ "type": "string",
56
+ "format": "uuid"
57
+ },
58
+ "language": {
59
+ "const": "en"
60
+ },
61
+ "privacy": {
62
+ "const": "local_speech"
63
+ },
64
+ "muted": {
65
+ "type": "boolean"
66
+ }
67
+ },
68
+ "required": [
69
+ "schema",
70
+ "client_id",
71
+ "language",
72
+ "privacy",
73
+ "muted"
74
+ ],
75
+ "additionalProperties": false
76
+ },
77
+ "frame_header": {
78
+ "type": "object",
79
+ "properties": {
80
+ "generation": {
81
+ "type": "integer",
82
+ "minimum": 0,
83
+ "maximum": 4294967295
84
+ },
85
+ "stream_id": {
86
+ "type": "integer",
87
+ "minimum": 0,
88
+ "maximum": 4294967295
89
+ },
90
+ "sample_offset": {
91
+ "type": "integer",
92
+ "minimum": 0,
93
+ "maximum": 4294967295
94
+ }
95
+ },
96
+ "required": [
97
+ "generation",
98
+ "stream_id",
99
+ "sample_offset"
100
+ ],
101
+ "additionalProperties": false
102
+ },
103
+ "utterance.start": {
104
+ "type": "object",
105
+ "properties": {
106
+ "type": {
107
+ "const": "utterance.start"
108
+ },
109
+ "capture_generation": {
110
+ "type": "integer",
111
+ "minimum": 0,
112
+ "maximum": 4294967295
113
+ },
114
+ "utterance_id": {
115
+ "type": "integer",
116
+ "minimum": 0,
117
+ "maximum": 4294967295
118
+ }
119
+ },
120
+ "required": [
121
+ "type",
122
+ "capture_generation",
123
+ "utterance_id"
124
+ ],
125
+ "additionalProperties": false
126
+ },
127
+ "utterance.end": {
128
+ "type": "object",
129
+ "properties": {
130
+ "type": {
131
+ "const": "utterance.end"
132
+ },
133
+ "capture_generation": {
134
+ "type": "integer",
135
+ "minimum": 0,
136
+ "maximum": 4294967295
137
+ },
138
+ "utterance_id": {
139
+ "type": "integer",
140
+ "minimum": 0,
141
+ "maximum": 4294967295
142
+ }
143
+ },
144
+ "required": [
145
+ "type",
146
+ "capture_generation",
147
+ "utterance_id"
148
+ ],
149
+ "additionalProperties": false
150
+ },
151
+ "output.interrupt": {
152
+ "type": "object",
153
+ "properties": {
154
+ "type": {
155
+ "const": "output.interrupt"
156
+ },
157
+ "output_epoch": {
158
+ "type": "integer",
159
+ "minimum": 0,
160
+ "maximum": 4294967295
161
+ },
162
+ "reason": {
163
+ "enum": [
164
+ "barge_in",
165
+ "stop_speech",
166
+ "device_change"
167
+ ]
168
+ }
169
+ },
170
+ "required": [
171
+ "type",
172
+ "output_epoch",
173
+ "reason"
174
+ ],
175
+ "additionalProperties": false
176
+ },
177
+ "playback.receipt": {
178
+ "type": "object",
179
+ "properties": {
180
+ "type": {
181
+ "const": "playback.receipt"
182
+ },
183
+ "output_epoch": {
184
+ "type": "integer",
185
+ "minimum": 0,
186
+ "maximum": 4294967295
187
+ },
188
+ "segment_id": {
189
+ "type": "integer",
190
+ "minimum": 0,
191
+ "maximum": 4294967295
192
+ },
193
+ "played": {
194
+ "type": "integer",
195
+ "minimum": 0,
196
+ "maximum": 4294967295
197
+ }
198
+ },
199
+ "required": [
200
+ "type",
201
+ "output_epoch",
202
+ "segment_id",
203
+ "played"
204
+ ],
205
+ "additionalProperties": false
206
+ },
207
+ "capture.mute": {
208
+ "type": "object",
209
+ "properties": {
210
+ "type": {
211
+ "const": "capture.mute"
212
+ },
213
+ "muted": {
214
+ "type": "boolean"
215
+ }
216
+ },
217
+ "required": [
218
+ "type",
219
+ "muted"
220
+ ],
221
+ "additionalProperties": false
222
+ },
223
+ "output.mute": {
224
+ "type": "object",
225
+ "properties": {
226
+ "type": {
227
+ "const": "output.mute"
228
+ },
229
+ "muted": {
230
+ "type": "boolean"
231
+ }
232
+ },
233
+ "required": [
234
+ "type",
235
+ "muted"
236
+ ],
237
+ "additionalProperties": false
238
+ },
239
+ "task.cancel": {
240
+ "type": "object",
241
+ "properties": {
242
+ "type": {
243
+ "const": "task.cancel"
244
+ },
245
+ "turn_id": {
246
+ "type": "string",
247
+ "format": "uuid"
248
+ }
249
+ },
250
+ "required": [
251
+ "type",
252
+ "turn_id"
253
+ ],
254
+ "additionalProperties": false
255
+ },
256
+ "heartbeat": {
257
+ "type": "object",
258
+ "properties": {
259
+ "type": {
260
+ "const": "heartbeat"
261
+ }
262
+ },
263
+ "required": [
264
+ "type"
265
+ ],
266
+ "additionalProperties": false
267
+ },
268
+ "session.end": {
269
+ "type": "object",
270
+ "properties": {
271
+ "type": {
272
+ "const": "session.end"
273
+ }
274
+ },
275
+ "required": [
276
+ "type"
277
+ ],
278
+ "additionalProperties": false
279
+ },
280
+ "client_control": {
281
+ "oneOf": [
282
+ {
283
+ "$ref": "#/$defs/utterance.start"
284
+ },
285
+ {
286
+ "$ref": "#/$defs/utterance.end"
287
+ },
288
+ {
289
+ "$ref": "#/$defs/output.interrupt"
290
+ },
291
+ {
292
+ "$ref": "#/$defs/playback.receipt"
293
+ },
294
+ {
295
+ "$ref": "#/$defs/capture.mute"
296
+ },
297
+ {
298
+ "$ref": "#/$defs/output.mute"
299
+ },
300
+ {
301
+ "$ref": "#/$defs/task.cancel"
302
+ },
303
+ {
304
+ "$ref": "#/$defs/heartbeat"
305
+ },
306
+ {
307
+ "$ref": "#/$defs/session.end"
308
+ }
309
+ ]
310
+ },
311
+ "state": {
312
+ "type": "object",
313
+ "properties": {
314
+ "voice_session_id": {
315
+ "type": "string",
316
+ "format": "uuid"
317
+ },
318
+ "capture_generation": {
319
+ "type": "integer",
320
+ "minimum": 0,
321
+ "maximum": 4294967295
322
+ },
323
+ "output_epoch": {
324
+ "type": "integer",
325
+ "minimum": 0,
326
+ "maximum": 4294967295
327
+ },
328
+ "capture": {
329
+ "enum": [
330
+ "off",
331
+ "muted",
332
+ "live",
333
+ "device_lost"
334
+ ]
335
+ },
336
+ "utterance": {
337
+ "enum": [
338
+ "idle",
339
+ "open",
340
+ "provisional",
341
+ "final",
342
+ "admitted",
343
+ "rejected"
344
+ ]
345
+ },
346
+ "agent": {
347
+ "enum": [
348
+ "idle",
349
+ "queued",
350
+ "running",
351
+ "waiting_for_input",
352
+ "cancelling",
353
+ "terminal"
354
+ ]
355
+ },
356
+ "output": {
357
+ "enum": [
358
+ "idle",
359
+ "committed",
360
+ "synthesizing",
361
+ "playing",
362
+ "interrupted",
363
+ "drained",
364
+ "muted"
365
+ ]
366
+ }
367
+ },
368
+ "required": [
369
+ "voice_session_id",
370
+ "capture_generation",
371
+ "output_epoch",
372
+ "capture",
373
+ "utterance",
374
+ "agent",
375
+ "output"
376
+ ],
377
+ "additionalProperties": false
378
+ },
379
+ "event.session.ready": {
380
+ "type": "object",
381
+ "properties": {
382
+ "type": {
383
+ "const": "session.ready"
384
+ },
385
+ "state": {
386
+ "$ref": "#/$defs/state"
387
+ },
388
+ "capabilities": {
389
+ "type": "object"
390
+ },
391
+ "limits": {
392
+ "type": "object"
393
+ }
394
+ },
395
+ "required": [
396
+ "type",
397
+ "state",
398
+ "capabilities",
399
+ "limits"
400
+ ],
401
+ "additionalProperties": false
402
+ },
403
+ "event.session.state": {
404
+ "type": "object",
405
+ "properties": {
406
+ "type": {
407
+ "const": "session.state"
408
+ },
409
+ "state": {
410
+ "$ref": "#/$defs/state"
411
+ }
412
+ },
413
+ "required": [
414
+ "type",
415
+ "state"
416
+ ],
417
+ "additionalProperties": false
418
+ },
419
+ "event.transcript": {
420
+ "type": "object",
421
+ "properties": {
422
+ "type": {
423
+ "const": "transcript"
424
+ },
425
+ "utterance_id": {
426
+ "type": "integer",
427
+ "minimum": 0,
428
+ "maximum": 4294967295
429
+ },
430
+ "revision": {
431
+ "type": "integer",
432
+ "minimum": 0,
433
+ "maximum": 4294967295
434
+ },
435
+ "text": {
436
+ "type": "string",
437
+ "maxLength": 4000
438
+ },
439
+ "final": {
440
+ "type": "boolean"
441
+ }
442
+ },
443
+ "required": [
444
+ "type",
445
+ "utterance_id",
446
+ "revision",
447
+ "text",
448
+ "final"
449
+ ],
450
+ "additionalProperties": false
451
+ },
452
+ "event.utterance.admitted": {
453
+ "type": "object",
454
+ "properties": {
455
+ "type": {
456
+ "const": "utterance.admitted"
457
+ },
458
+ "utterance_id": {
459
+ "type": "integer",
460
+ "minimum": 0,
461
+ "maximum": 4294967295
462
+ },
463
+ "turn_id": {
464
+ "type": "string",
465
+ "format": "uuid"
466
+ },
467
+ "idempotency_key": {
468
+ "type": "string",
469
+ "maxLength": 200
470
+ },
471
+ "status": {
472
+ "enum": [
473
+ "queued",
474
+ "running"
475
+ ]
476
+ }
477
+ },
478
+ "required": [
479
+ "type",
480
+ "utterance_id",
481
+ "turn_id",
482
+ "idempotency_key",
483
+ "status"
484
+ ],
485
+ "additionalProperties": false
486
+ },
487
+ "event.utterance.rejected": {
488
+ "type": "object",
489
+ "properties": {
490
+ "type": {
491
+ "const": "utterance.rejected"
492
+ },
493
+ "utterance_id": {
494
+ "type": "integer",
495
+ "minimum": 0
496
+ },
497
+ "reason": {
498
+ "enum": [
499
+ "input_overflow",
500
+ "no_speech"
501
+ ]
502
+ }
503
+ },
504
+ "required": [
505
+ "type",
506
+ "utterance_id",
507
+ "reason"
508
+ ],
509
+ "additionalProperties": false
510
+ },
511
+ "event.speech.committed": {
512
+ "type": "object",
513
+ "properties": {
514
+ "type": {
515
+ "const": "speech.committed"
516
+ },
517
+ "output_epoch": {
518
+ "type": "integer",
519
+ "minimum": 0,
520
+ "maximum": 4294967295
521
+ },
522
+ "segment_id": {
523
+ "type": "integer",
524
+ "minimum": 0,
525
+ "maximum": 4294967295
526
+ },
527
+ "turn_id": {
528
+ "type": "string",
529
+ "format": "uuid"
530
+ },
531
+ "text": {
532
+ "type": "string",
533
+ "maxLength": 4000
534
+ },
535
+ "source": {
536
+ "type": "string",
537
+ "maxLength": 200
538
+ }
539
+ },
540
+ "required": [
541
+ "type",
542
+ "output_epoch",
543
+ "segment_id",
544
+ "turn_id",
545
+ "text",
546
+ "source"
547
+ ],
548
+ "additionalProperties": false
549
+ },
550
+ "event.output.interrupted": {
551
+ "type": "object",
552
+ "properties": {
553
+ "type": {
554
+ "const": "output.interrupted"
555
+ },
556
+ "output_epoch": {
557
+ "type": "integer",
558
+ "minimum": 0,
559
+ "maximum": 4294967295
560
+ },
561
+ "abort": {
562
+ "enum": [
563
+ "requested",
564
+ "acknowledged"
565
+ ]
566
+ }
567
+ },
568
+ "required": [
569
+ "type",
570
+ "output_epoch",
571
+ "abort"
572
+ ],
573
+ "additionalProperties": false
574
+ },
575
+ "event.output.finished": {
576
+ "type": "object",
577
+ "properties": {
578
+ "type": {
579
+ "const": "output.finished"
580
+ },
581
+ "output_epoch": {
582
+ "type": "integer",
583
+ "minimum": 0,
584
+ "maximum": 4294967295
585
+ },
586
+ "segment_id": {
587
+ "type": "integer",
588
+ "minimum": 0,
589
+ "maximum": 4294967295
590
+ },
591
+ "sample_count": {
592
+ "type": "integer",
593
+ "minimum": 0,
594
+ "maximum": 4294967295
595
+ }
596
+ },
597
+ "required": [
598
+ "type",
599
+ "output_epoch",
600
+ "segment_id",
601
+ "sample_count"
602
+ ],
603
+ "additionalProperties": false
604
+ },
605
+ "event.session.closed": {
606
+ "type": "object",
607
+ "properties": {
608
+ "type": {
609
+ "const": "session.closed"
610
+ },
611
+ "reason": {
612
+ "type": "string",
613
+ "maxLength": 160
614
+ }
615
+ },
616
+ "required": [
617
+ "type",
618
+ "reason"
619
+ ],
620
+ "additionalProperties": false
621
+ },
622
+ "event.error": {
623
+ "type": "object",
624
+ "properties": {
625
+ "type": {
626
+ "const": "error"
627
+ },
628
+ "code": {
629
+ "type": "string",
630
+ "maxLength": 80
631
+ },
632
+ "message": {
633
+ "type": "string",
634
+ "maxLength": 300
635
+ },
636
+ "fatal": {
637
+ "type": "boolean"
638
+ }
639
+ },
640
+ "required": [
641
+ "type",
642
+ "code",
643
+ "message",
644
+ "fatal"
645
+ ],
646
+ "additionalProperties": false
647
+ },
648
+ "server_event": {
649
+ "oneOf": [
650
+ {
651
+ "$ref": "#/$defs/event.session.ready"
652
+ },
653
+ {
654
+ "$ref": "#/$defs/event.session.state"
655
+ },
656
+ {
657
+ "$ref": "#/$defs/event.transcript"
658
+ },
659
+ {
660
+ "$ref": "#/$defs/event.utterance.admitted"
661
+ },
662
+ {
663
+ "$ref": "#/$defs/event.utterance.rejected"
664
+ },
665
+ {
666
+ "$ref": "#/$defs/event.speech.committed"
667
+ },
668
+ {
669
+ "$ref": "#/$defs/event.output.interrupted"
670
+ },
671
+ {
672
+ "$ref": "#/$defs/event.output.finished"
673
+ },
674
+ {
675
+ "$ref": "#/$defs/event.session.closed"
676
+ },
677
+ {
678
+ "$ref": "#/$defs/event.error"
679
+ },
680
+ {
681
+ "$ref": "#/$defs/event.task.cancellation"
682
+ }
683
+ ]
684
+ },
685
+ "speech_text": {
686
+ "type": "string",
687
+ "minLength": 1,
688
+ "maxLength": 400,
689
+ "allOf": [
690
+ {
691
+ "pattern": "\\S"
692
+ },
693
+ {
694
+ "not": {
695
+ "pattern": "[`<>\\[\\]{}|*#]"
696
+ }
697
+ },
698
+ {
699
+ "not": {
700
+ "pattern": "[hH][tT][tT][pP][sS]?://|[wW][wW][wW]\\."
701
+ }
702
+ },
703
+ {
704
+ "not": {
705
+ "pattern": "[\\u0000-\\u0008\\u000b\\u000c\\u000e-\\u001f]"
706
+ }
707
+ }
708
+ ]
709
+ },
710
+ "event.task.cancellation": {
711
+ "type": "object",
712
+ "properties": {
713
+ "type": {
714
+ "const": "task.cancellation"
715
+ },
716
+ "status": {
717
+ "const": "requested"
718
+ },
719
+ "message": {
720
+ "type": "string",
721
+ "maxLength": 300
722
+ },
723
+ "turn_id": {
724
+ "type": "string",
725
+ "format": "uuid"
726
+ }
727
+ },
728
+ "required": [
729
+ "type",
730
+ "status",
731
+ "message"
732
+ ],
733
+ "additionalProperties": false
734
+ }
735
+ },
736
+ "$ref": "#/$defs/client_control"
737
+ }