@jambonz/schema 0.4.24 → 0.4.26

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,86 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://jambonz.org/schema/components/recognizer-mistralOptions",
4
+ "title": "Mistral Recognizer Options",
5
+ "description": "Mistral Voxtral realtime STT options. Only applies when recognizer vendor is 'mistral'. Voxtral streams text as it is recognized (sent as interim results when interim is enabled); with turn detection on (the default) a final transcript is produced when Voxtral detects the end of the speaker's turn, and in the agent verb each final ends the user's turn. Transcripts are reported with confidence 1.0. The language is sent as a two-letter code (en-US becomes en); leave it unset or 'any' for automatic detection.",
6
+ "type": "object",
7
+ "properties": {
8
+ "apiKey": {
9
+ "type": "string",
10
+ "description": "Mistral API key. Overrides the key configured in jambonz."
11
+ },
12
+ "model": {
13
+ "type": "string",
14
+ "description": "Realtime transcription model. Defaults to voxtral-mini-transcribe-realtime-3.",
15
+ "examples": ["voxtral-mini-transcribe-realtime-3"]
16
+ },
17
+ "streamingDelayMs": {
18
+ "type": "integer",
19
+ "description": "Target streaming delay in ms: how far the model looks ahead before emitting text. Lower is faster, higher is more accurate. Any value from 80 to 1200, or 2400. Voxtral's default is 480.",
20
+ "anyOf": [
21
+ { "minimum": 80, "maximum": 1200 },
22
+ { "const": 2400 }
23
+ ]
24
+ },
25
+ "verbatim": {
26
+ "type": "boolean",
27
+ "description": "Ask Voxtral for a verbatim transcript (sent as verbatim). Not in Mistral's docs yet; the realtime API accepts it."
28
+ },
29
+ "contextBias": {
30
+ "type": "array",
31
+ "items": { "type": "string" },
32
+ "maxItems": 100,
33
+ "description": "Words or phrases to favor (names, brands, jargon). When omitted, recognizer.hints are used."
34
+ },
35
+ "diarize": {
36
+ "type": "boolean",
37
+ "description": "Label each transcript with a speaker. Voxtral cannot diarize and detect turns at once, so this turns off turn detection: a final transcript closes at each sentence end or change of speaker. recognizer.diarization has the same effect. Ignored in the agent verb, which needs turn detection."
38
+ },
39
+ "speakerReferences": {
40
+ "type": "array",
41
+ "maxItems": 8,
42
+ "description": "Reference clips (3 to 15 seconds each) that let diarization name known speakers. Passed to Mistral as speaker_references. Requires diarize.",
43
+ "items": { "type": "object" }
44
+ },
45
+ "turnDetection": {
46
+ "type": "object",
47
+ "description": "Tunes when Voxtral ends a turn. Ignored when diarize is on. Thresholds must satisfy startThreshold >= eagerEndThreshold > endThreshold.",
48
+ "properties": {
49
+ "startThreshold": {
50
+ "type": "number",
51
+ "minimum": 0,
52
+ "maximum": 1,
53
+ "description": "Speech probability that starts a turn. Default 0.5."
54
+ },
55
+ "eagerEndThreshold": {
56
+ "type": "number",
57
+ "minimum": 0,
58
+ "maximum": 1,
59
+ "description": "Probability at which Voxtral signals a likely end of turn early; the agent verb uses it for early generation. Default 0.5."
60
+ },
61
+ "endThreshold": {
62
+ "type": "number",
63
+ "minimum": 0,
64
+ "maximum": 1,
65
+ "description": "Probability below which silence counts toward ending the turn. Default 0.33."
66
+ },
67
+ "minSilenceMs": {
68
+ "type": "integer",
69
+ "minimum": 0,
70
+ "description": "Silence in ms before a turn can end. Default 500; raised to streamingDelayMs when that is longer, since Voxtral's text lags the audio by about that much."
71
+ },
72
+ "endTimeoutMs": {
73
+ "type": "integer",
74
+ "minimum": 0,
75
+ "description": "Silence in ms after which the turn ends regardless of the model. Default 3000; must be at least minSilenceMs."
76
+ }
77
+ },
78
+ "additionalProperties": false
79
+ },
80
+ "mistralSttUri": {
81
+ "type": "string",
82
+ "description": "Custom host to connect to instead of api.mistral.ai, e.g. a proxy. A ws:// or http:// prefix disables TLS."
83
+ }
84
+ },
85
+ "additionalProperties": false
86
+ }
@@ -8,7 +8,7 @@
8
8
  "vendor": {
9
9
  "type": "string",
10
10
  "description": "The STT vendor to use. Must match a vendor configured in the jambonz platform.",
11
- "examples": ["google", "aws", "microsoft", "deepgram", "ibm", "nvidia", "soniox", "xai", "modulate", "zoom", "gradium", "assemblyai", "speechmatics", "openai", "houndify", "gladia", "elevenlabs", "custom"]
11
+ "examples": ["google", "aws", "microsoft", "deepgram", "ibm", "nvidia", "soniox", "xai", "modulate", "zoom", "gradium", "mistral", "assemblyai", "speechmatics", "openai", "houndify", "gladia", "elevenlabs", "custom"]
12
12
  },
13
13
  "label": {
14
14
  "type": "string",
@@ -202,6 +202,7 @@
202
202
  "modulateOptions": { "$ref": "recognizer-modulateOptions" },
203
203
  "zoomOptions": { "$ref": "recognizer-zoomOptions" },
204
204
  "gradiumOptions": { "$ref": "recognizer-gradiumOptions" },
205
+ "mistralOptions": { "$ref": "recognizer-mistralOptions" },
205
206
  "assemblyAiOptions": { "$ref": "recognizer-assemblyAiOptions" },
206
207
  "speechmaticsOptions": { "$ref": "recognizer-speechmaticsOptions" },
207
208
  "openaiOptions": { "$ref": "recognizer-openaiOptions" },
@@ -8,7 +8,7 @@
8
8
  "vendor": {
9
9
  "type": "string",
10
10
  "description": "The TTS vendor to use. Must match a vendor configured in the jambonz platform.",
11
- "examples": ["google", "aws", "microsoft", "elevenlabs", "cartesia", "fishaudio", "gradium", "kugelaudio", "nineninesix", "speechify", "deepgram", "deepgramflux", "ibm", "nvidia", "wellsaid", "whisper", "custom"]
11
+ "examples": ["google", "aws", "microsoft", "elevenlabs", "cartesia", "fishaudio", "gradium", "kugelaudio", "mistral", "nineninesix", "speechify", "deepgram", "deepgramflux", "ibm", "nvidia", "wellsaid", "whisper", "custom"]
12
12
  },
13
13
  "label": {
14
14
  "type": "string",
@@ -331,6 +331,35 @@ For Anthropic models, use `"vendor": "anthropic"` and structure messages accordi
331
331
 
332
332
  By default (`greeting: true`), the agent prompts the LLM to generate an initial greeting before the user speaks. Set `greeting: false` if you want the agent to wait silently for the user to speak first.
333
333
 
334
+ ## Controlling what is spoken
335
+
336
+ Everything the LLM writes is normally sent to TTS. Two options change that. Neither changes what the LLM sees: conversation history, `llm_response` events and the `turn_end` transcript always hold the model's raw text.
337
+
338
+ **`speechCleanup`** (default `true`) drops text that models write but don't mean to be heard:
339
+
340
+ - a paragraph that is only a stage direction in `()`, `[]` or `**`, such as `(silence)`, `(empty response)` or `[No response needed - the call has ended]`. Models write these when they are told to stay silent. A bracketed aside inside a sentence, such as "PPO (including Anthem)", is still spoken, and so is a span with no letters in it, such as a phone number's area code.
341
+ - `<think>`, `<thinking>` and `<reasoning>` blocks, wherever they appear.
342
+
343
+ The cleanup runs on the streaming tokens and holds back only text that could still turn out to be one of these, so ordinary speech is not delayed. If nothing is left to say, the reply ends without speaking, the same way as a reply that only called tools. Set `speechCleanup: false` to send the text to TTS exactly as written.
344
+
345
+ **`speak: false`** keeps all of the agent's text out of TTS. Use it for an agent that must never talk, such as one that navigates a DTMF-only phone menu by calling tools. The LLM's replies are still kept, so the agent can take notes for itself. With `speak: false`, `toolFiller` and `earlyGeneration` are turned off.
346
+
347
+ ```json
348
+ {
349
+ "verb": "agent",
350
+ "speak": false,
351
+ "llm": {
352
+ "vendor": "anthropic",
353
+ "model": "claude-haiku-4-5",
354
+ "llmOptions": {
355
+ "messages": [
356
+ { "role": "system", "content": "You navigate phone menus by pressing keys with the send_dtmf tool." }
357
+ ]
358
+ }
359
+ }
360
+ }
361
+ ```
362
+
334
363
  ## Complete example (TypeScript)
335
364
 
336
365
  A voice agent using Deepgram STT, OpenAI LLM, and Cartesia TTS with Krisp turn detection. Exposes multiple endpoints with different STT/TTS combinations:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jambonz/schema",
3
- "version": "0.4.24",
3
+ "version": "0.4.26",
4
4
  "description": "JSON Schema definitions and validation for jambonz verb applications",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -26,12 +26,12 @@
26
26
  { "type": "boolean" },
27
27
  { "type": "string", "enum": ["always"] }
28
28
  ],
29
- "description": "When using Deepgram Flux Multilingual, automatically adjust STT language hints and switch TTS voice based on detected language. Values: false (disabled), true (lock on first utterance), 'always' (continuously adapt on every turn). Default: false.",
29
+ "description": "Switch the TTS to the language the caller speaks, using the matching languageConfig entry. Works with any STT that reports the detected language: Deepgram (language 'multi', or Flux Multilingual), AssemblyAI (languageDetection), Google and Azure (altLanguages), Soniox (enableLanguageIdentification), Gladia and Modulate. Values: false (disabled), true (lock on the first utterance whose language is detected), 'always' (re-evaluate every turn). With Deepgram Flux, true also locks the STT language hints to the detected language. Default: false.",
30
30
  "default": false
31
31
  },
32
32
  "languageConfig": {
33
33
  "type": "object",
34
- "description": "Per-language overrides for TTS. Keys are BCP-47 language codes. When autoLockLanguage detects a language switch, the agent uses the corresponding config.",
34
+ "description": "Per-language TTS overrides, used when autoLockLanguage detects a language. Keys are language codes such as 'es' or 'es-MX'. A detected language matches an exact key first (case-insensitive), then a key with the same primary language, so 'es' matches a detected 'es-US'. A detected language with no entry keeps the current TTS. The entry's tts is merged over the agent's tts; set its language to the code the TTS vendor expects.",
35
35
  "additionalProperties": {
36
36
  "type": "object",
37
37
  "properties": {
@@ -231,6 +231,16 @@
231
231
  "description": "Enable speculative LLM prompting before end-of-turn is confirmed. When using Krisp turn detection, set this to true to speculatively prompt the LLM before Krisp confirms the turn has ended. If the transcript matches when turn ends, buffered tokens are released immediately — reducing response latency. Note: Deepgram Flux performs early generation automatically via its native EagerEndOfTurn signal regardless of this setting. Default: false.",
232
232
  "default": false
233
233
  },
234
+ "speak": {
235
+ "type": "boolean",
236
+ "description": "Whether the agent's text is spoken. With false the agent never talks (for example while it drives a DTMF-only phone menu with its tools): the LLM's text is still kept in conversation history, llm_response events and the transcript, but is never sent to TTS, and toolFiller and earlyGeneration are turned off. Each reply ends when the LLM finishes, as for a reply that only called tools. Default: true.",
237
+ "default": true
238
+ },
239
+ "speechCleanup": {
240
+ "type": "boolean",
241
+ "description": "Keep text the model was not meant to say out of TTS: a paragraph that is only a stage direction in (), [] or ** (such as '(silence)' or '[No response needed]'), and <think>, <thinking> or <reasoning> blocks. Asides inside a sentence are still spoken. Applied as the reply streams; ordinary speech is not delayed. A reply with nothing left to say ends without speaking. History, llm_response events and the transcript keep the model's raw text. Default: true.",
242
+ "default": true
243
+ },
234
244
  "noiseIsolation": {
235
245
  "oneOf": [
236
246
  {