@jambonz/sdk 0.1.20 → 0.1.22

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.20",
3
+ "version": "0.1.22",
4
4
  "description": "jambonz SDK for building voice applications — optimized for AI agents",
5
5
  "author": "Dave Horton",
6
6
  "license": "MIT",
@@ -11,82 +11,45 @@
11
11
  },
12
12
  "transcript": {
13
13
  "type": "string",
14
- "description": "The user's final speech-to-text transcript for this turn. May be '(none)' if no transcript was captured (e.g. an interrupted turn before STT completed)."
14
+ "description": "The user's final speech-to-text transcript for this turn."
15
15
  },
16
16
  "response": {
17
17
  "type": "string",
18
- "description": "The assistant's full text response for this turn. May be empty or partial if the turn was interrupted."
18
+ "description": "The assistant's text response for this turn. May be partial if the turn was interrupted."
19
19
  },
20
20
  "interrupted": {
21
21
  "type": "boolean",
22
- "description": "True if this turn was interrupted by the user barging in before the assistant finished speaking.",
22
+ "description": "True if the user interrupted the assistant before it finished speaking.",
23
23
  "default": false
24
24
  },
25
25
  "latency": {
26
26
  "type": "object",
27
- "description": "Per-component latency metrics for this turn. All values are in milliseconds relative to the start of the turn (when the user began speaking). Fields are absent when not applicable.",
27
+ "description": "Latency metrics for this turn, all in milliseconds. Fields are absent when not applicable.",
28
28
  "properties": {
29
- "total_ms": {
29
+ "turn_ms": {
30
30
  "type": "integer",
31
- "description": "Total turn duration from start of user speech to LLM response completion."
31
+ "description": "Total turn duration from start of user speech through assistant response completion."
32
32
  },
33
- "stt": {
34
- "type": "object",
35
- "description": "Speech-to-text latency metrics.",
36
- "properties": {
37
- "final_transcript_ms": {
38
- "type": "integer",
39
- "description": "Time from turn start until the final transcript was received from the STT engine."
40
- }
41
- },
42
- "additionalProperties": false
33
+ "response_ms": {
34
+ "type": "integer",
35
+ "description": "User-perceived response latency: time from end of user speech to first audio played back. This is the headline number most developers care about."
43
36
  },
44
- "llm": {
45
- "type": "object",
46
- "description": "LLM latency metrics.",
47
- "properties": {
48
- "prompted_ms": {
49
- "type": "integer",
50
- "description": "Time from turn start until the LLM was prompted."
51
- },
52
- "ttft_ms": {
53
- "type": "integer",
54
- "description": "Time-to-first-token: time from LLM prompt to first token received."
55
- }
56
- },
57
- "additionalProperties": false
37
+ "stt_ms": {
38
+ "type": "integer",
39
+ "description": "Time from start of user speech until the final transcript was received from the STT engine."
58
40
  },
59
- "tts": {
60
- "type": "object",
61
- "description": "Text-to-speech latency metrics.",
62
- "properties": {
63
- "first_buffered_ms": {
64
- "type": "integer",
65
- "description": "Time from turn start until the first LLM token was buffered for TTS."
66
- },
67
- "first_send_ms": {
68
- "type": "integer",
69
- "description": "Time from turn start until audio was first sent to the TTS engine."
70
- },
71
- "buffer_delay_ms": {
72
- "type": "integer",
73
- "description": "Delay between first token buffered and first send to TTS engine."
74
- }
75
- },
76
- "additionalProperties": false
41
+ "llm_ttft_ms": {
42
+ "type": "integer",
43
+ "description": "LLM time-to-first-token: time from when the LLM was prompted until the first response token arrived."
77
44
  },
78
45
  "preflight": {
79
46
  "type": "object",
80
47
  "description": "Early generation (preflight) metrics. Only present when earlyGeneration is enabled.",
81
48
  "properties": {
82
- "ms": {
83
- "type": "integer",
84
- "description": "Time from turn start until the preflight prompt was sent."
85
- },
86
49
  "result": {
87
50
  "type": "string",
88
51
  "enum": ["hit", "miss", "pending"],
89
- "description": "Whether the preflight transcript matched the final transcript ('hit'), did not match ('miss'), or was still in progress ('pending')."
52
+ "description": "Whether the speculative preflight transcript matched the final transcript ('hit'), did not match ('miss'), or was still in progress ('pending')."
90
53
  },
91
54
  "tokens": {
92
55
  "type": "integer",