@jambonz/sdk 0.1.23 → 0.1.24

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jambonz/sdk",
3
- "version": "0.1.23",
3
+ "version": "0.1.24",
4
4
  "description": "jambonz SDK for building voice applications — optimized for AI agents",
5
5
  "author": "Dave Horton",
6
6
  "license": "MIT",
@@ -0,0 +1,77 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://jambonz.org/schema/callbacks/tts-streaming-event",
4
+ "title": "TTS Streaming Event",
5
+ "description": "Events sent to the '/streaming-event' WebSocket endpoint during TTS streaming. These are sent as 'tts:streaming-event' messages. The tts_spoken event is only sent when trackTtsPlayout is enabled via the config verb.",
6
+ "type": "object",
7
+ "oneOf": [
8
+ {
9
+ "properties": {
10
+ "event_type": {
11
+ "const": "stream_open",
12
+ "description": "The TTS streaming connection has been established."
13
+ }
14
+ },
15
+ "required": ["event_type"],
16
+ "additionalProperties": false
17
+ },
18
+ {
19
+ "properties": {
20
+ "event_type": {
21
+ "const": "stream_closed",
22
+ "description": "The TTS streaming connection has been closed."
23
+ }
24
+ },
25
+ "required": ["event_type"],
26
+ "additionalProperties": false
27
+ },
28
+ {
29
+ "properties": {
30
+ "event_type": {
31
+ "const": "stream_paused",
32
+ "description": "TTS streaming has been paused."
33
+ }
34
+ },
35
+ "required": ["event_type"],
36
+ "additionalProperties": false
37
+ },
38
+ {
39
+ "properties": {
40
+ "event_type": {
41
+ "const": "stream_resumed",
42
+ "description": "TTS streaming has been resumed."
43
+ }
44
+ },
45
+ "required": ["event_type"],
46
+ "additionalProperties": false
47
+ },
48
+ {
49
+ "properties": {
50
+ "event_type": {
51
+ "const": "user_interruption",
52
+ "description": "The user interrupted (barged in) during TTS playout, causing the stream to be cleared."
53
+ }
54
+ },
55
+ "required": ["event_type"],
56
+ "additionalProperties": false
57
+ },
58
+ {
59
+ "properties": {
60
+ "event_type": {
61
+ "const": "tts_spoken",
62
+ "description": "Reports the actual text that was spoken via TTS. Sent on utterance completion or when the user barges in. Only sent when trackTtsPlayout is enabled via the config verb. Requires a TTS vendor that supports alignment data (e.g. ElevenLabs)."
63
+ },
64
+ "text": {
65
+ "type": "string",
66
+ "description": "The text that was actually spoken before completion or interruption."
67
+ },
68
+ "bargein": {
69
+ "type": "boolean",
70
+ "description": "True if the user barged in (interrupted) before the TTS finished speaking. False if the utterance completed normally."
71
+ }
72
+ },
73
+ "required": ["event_type", "text", "bargein"],
74
+ "additionalProperties": false
75
+ }
76
+ ]
77
+ }
@@ -156,7 +156,7 @@
156
156
  },
157
157
  "trackTtsPlayout": {
158
158
  "type": "boolean",
159
- "description": "If true, report the actual text spoken via TTS. On each utterance completion or interruption, a tts_spoken event is sent with the text and whether the user barged in."
159
+ "description": "If true, report the actual text spoken via TTS. Requires a TTS vendor that supports alignment data (e.g. ElevenLabs). On each utterance completion or interruption, a tts_spoken event is sent to the '/streaming-event' endpoint with fields: 'text' (string — the text actually spoken) and 'bargein' (boolean — true if the user interrupted before TTS finished). See the tts-streaming-event callback schema for full details."
160
160
  },
161
161
  "noiseIsolation": {
162
162
  "type": "object",