diff --git a/fern/apis/relay-server/relay-server.yaml b/fern/apis/relay-server/relay-server.yaml
index b78b473bf6..ede0ff32d0 100644
--- a/fern/apis/relay-server/relay-server.yaml
+++ b/fern/apis/relay-server/relay-server.yaml
@@ -17044,7 +17044,8 @@ components:
hears before the AI reads it, or both.
One hint list covers every language the agent uses; there are no per-language hints. When speech recognition
runs in code-switching mode, because `multilingual` is set or a `languages` entry's `code` is `multi` on
- Deepgram speech recognition, recognition hints are not used. That covers string entries and `hint` values, and no error is returned.
+ Deepgram, recognition hints are not used. That covers string entries and `hint` values, and no error is returned.
+ Outside code-switching mode, every engine receives hints.
Rewrite rules still apply to the transcript in every mode.
examples:
- - pizza
@@ -17131,7 +17132,9 @@ components:
- type: integer
enum:
- 0
- description: "Amount of time, in ms, to wait before prompting the user to respond. Allowed values: `0` (to disable) or `1,000` - `600,000`. **Default:** `5000` ms."
+ description: |-
+ Amount of time, in ms, to wait before prompting the user to respond. Allowed values: `0` (to disable) or `1,000` - `600,000`.
+ A nonzero value lower than `end_of_speech_timeout` is raised to `end_of_speech_timeout` plus 1,000 ms. **Default:** `5000` ms.
examples:
- 30000
attention_timeout_prompt:
@@ -17206,11 +17209,20 @@ components:
Before each reply, a smaller planning model reviews the conversation and the available functions,
then gives the agent a short directive on how to respond. This can improve function use and
coherence. The reply waits for the plan, which adds latency to every turn. The planning model is
- `utility_model` if set, otherwise `ai_model`. Billed separately from the agent's per-minute rate.
- To cover the wait, set `double_turn_fillers` on each entry in `languages`.
+ `double_turn_model` if set, otherwise `utility_model` if set, otherwise `ai_model`. Billed separately
+ from the agent's per-minute rate. To cover the wait, set `double_turn_fillers` on each entry in `languages`.
default: false
examples:
- true
+ double_turn_model:
+ type: string
+ description: |-
+ The model that plans each reply when `double_turns` is enabled. It takes priority over `utility_model`
+ for planning, so you can plan with one model and run background tasks with another. If the model isn't
+ recognized, the planning step is skipped and the agent replies without a plan. Has no effect unless
+ `double_turns` is `true`.
+ examples:
+ - gpt-4.1-mini
enable_inner_dialog:
type: boolean
description: |-
@@ -17267,13 +17279,21 @@ components:
description: |-
Takes a string, including a regular expression, defining barge behavior.
For example, this param can direct the AI to stop when the word 'hippopotamus' is input.
+ Setting this param turns off `transparent_barge`, even when `transparent_barge` is set to `true`.
+ When `barge_min_words` is also set, either condition is enough: the caller interrupts the agent by
+ saying at least that many words or by saying something that matches this string.
examples:
- Cancel order
barge_min_words:
type: integer
- description: Defines the number of words that must be input before triggering barge behavior, in a range of `1-99`.
- minimum: 1
+ description: |-
+ Defines the number of words that must be input before triggering barge behavior.
+ Allowed values: `0` to turn the word count off, or `1-99`. Any other value is ignored.
+ When `barge_match_string` is also set, either condition is enough to interrupt the agent.
+ **Default:** `0`.
+ minimum: 0
maximum: 99
+ default: 0
examples:
- 3
barge_functions:
@@ -17543,7 +17563,11 @@ components:
- 2000
interrupt_on_noise:
type: boolean
- description: When enabled, barges agent upon any sound interruption longer than 1 second. The 1-second threshold can't be changed. **Default:** `false`.
+ description: |-
+ When enabled, barges agent upon any sound interruption longer than 1 second. The 1-second threshold can't be changed.
+ The sound doesn't need to be recognized as words, so sustained sound, such as background conversation or music, can interrupt the agent.
+ This interruption ignores `enable_barge`, `barge_min_words`, and `barge_match_string`, and it interrupts a static
+ greeting even when `static_greeting_no_barge` is `true`. **Default:** `false`.
examples:
- true
interrupt_prompt:
@@ -17692,7 +17716,12 @@ components:
- Hello! Welcome to our customer service. How can I help you today?
static_greeting_no_barge:
type: boolean
- description: If `true`, the static greeting will not be interrupted by the user if they speak over the greeting. If `false`, the static greeting can be interrupted by the user if they speak over the greeting.
+ description: |-
+ If `true`, the static greeting will not be interrupted by the user if they speak over the greeting. If `false`, the static greeting can be interrupted by the user if they speak over the greeting.
+ With `true`, what the caller says during the greeting is kept and answered after the greeting finishes.
+ A DTMF key press still interrupts the greeting, and so does `interrupt_on_noise`.
+ With `false`, the greeting stops once the caller finishes speaking over it. This interruption ignores
+ `barge_min_words`, `barge_match_string`, and `enable_barge`, which apply only after the greeting.
default: false
examples:
- true
@@ -17781,6 +17810,7 @@ components:
When enabled, the AI will not respond to the user's input when the user is speaking over the agent.
The agent will wait for the user to finish speaking before responding.
Additionally, any attempt the LLM makes to barge will be ignored and scraped from the conversation logs.
+ Setting `barge_match_string` turns this param off, even when it is set to `true`.
**Default:** `true`.
default: true
examples:
@@ -17887,15 +17917,18 @@ components:
- e164
- international
- national
+ - generic
description: |-
- The format for the AI agent to reference phone numbers.
- Allowed values are `e164`, `international`, and `national`.
+ How the agent formats phone numbers when it speaks them.
+ Allowed values are `e164`, `international`, `national`, and `generic`.
+ An unrecognized value is ignored and `e164` is used.
**Default:** `e164`.
**Example:**
- `e164`: `+12345678901`
- `international`: `+1 234-567-8901`
- `national`: `(234) 567-8901`
+ - `generic`: `234 567 8901`
default: e164
examples:
- national
@@ -21554,7 +21587,8 @@ components:
hears before the AI reads it, or both.
One hint list covers every language the agent uses; there are no per-language hints. When speech recognition
runs in code-switching mode, because `multilingual` is set or a `languages` entry's `code` is `multi` on
- Deepgram speech recognition, recognition hints are not used. That covers string entries and `hint` values, and no error is returned.
+ Deepgram, recognition hints are not used. That covers string entries and `hint` values, and no error is returned.
+ Outside code-switching mode, every engine receives hints.
Rewrite rules still apply to the transcript in every mode.
examples:
- - pizza
@@ -21641,7 +21675,9 @@ components:
- type: integer
enum:
- 0
- description: "Amount of time, in ms, to wait before prompting the user to respond. Allowed values: `0` (to disable) or `1,000` - `600,000`. **Default:** `5000` ms."
+ description: |-
+ Amount of time, in ms, to wait before prompting the user to respond. Allowed values: `0` (to disable) or `1,000` - `600,000`.
+ A nonzero value lower than `end_of_speech_timeout` is raised to `end_of_speech_timeout` plus 1,000 ms. **Default:** `5000` ms.
examples:
- 30000
attention_timeout_prompt:
@@ -21716,11 +21752,20 @@ components:
Before each reply, a smaller planning model reviews the conversation and the available functions,
then gives the agent a short directive on how to respond. This can improve function use and
coherence. The reply waits for the plan, which adds latency to every turn. The planning model is
- `utility_model` if set, otherwise `ai_model`. Billed separately from the agent's per-minute rate.
- To cover the wait, set `double_turn_fillers` on each entry in `languages`.
+ `double_turn_model` if set, otherwise `utility_model` if set, otherwise `ai_model`. Billed separately
+ from the agent's per-minute rate. To cover the wait, set `double_turn_fillers` on each entry in `languages`.
default: false
examples:
- true
+ double_turn_model:
+ type: string
+ description: |-
+ The model that plans each reply when `double_turns` is enabled. It takes priority over `utility_model`
+ for planning, so you can plan with one model and run background tasks with another. If the model isn't
+ recognized, the planning step is skipped and the agent replies without a plan. Has no effect unless
+ `double_turns` is `true`.
+ examples:
+ - gpt-4.1-mini
enable_inner_dialog:
type: boolean
description: |-
@@ -21777,13 +21822,21 @@ components:
description: |-
Takes a string, including a regular expression, defining barge behavior.
For example, this param can direct the AI to stop when the word 'hippopotamus' is input.
+ Setting this param turns off `transparent_barge`, even when `transparent_barge` is set to `true`.
+ When `barge_min_words` is also set, either condition is enough: the caller interrupts the agent by
+ saying at least that many words or by saying something that matches this string.
examples:
- Cancel order
barge_min_words:
type: integer
- description: Defines the number of words that must be input before triggering barge behavior, in a range of `1-99`.
- minimum: 1
+ description: |-
+ Defines the number of words that must be input before triggering barge behavior.
+ Allowed values: `0` to turn the word count off, or `1-99`. Any other value is ignored.
+ When `barge_match_string` is also set, either condition is enough to interrupt the agent.
+ **Default:** `0`.
+ minimum: 0
maximum: 99
+ default: 0
examples:
- 3
barge_functions:
@@ -22053,7 +22106,11 @@ components:
- 2000
interrupt_on_noise:
type: boolean
- description: When enabled, barges agent upon any sound interruption longer than 1 second. The 1-second threshold can't be changed. **Default:** `false`.
+ description: |-
+ When enabled, barges agent upon any sound interruption longer than 1 second. The 1-second threshold can't be changed.
+ The sound doesn't need to be recognized as words, so sustained sound, such as background conversation or music, can interrupt the agent.
+ This interruption ignores `enable_barge`, `barge_min_words`, and `barge_match_string`, and it interrupts a static
+ greeting even when `static_greeting_no_barge` is `true`. **Default:** `false`.
examples:
- true
interrupt_prompt:
@@ -22202,7 +22259,12 @@ components:
- Hello! Welcome to our customer service. How can I help you today?
static_greeting_no_barge:
type: boolean
- description: If `true`, the static greeting will not be interrupted by the user if they speak over the greeting. If `false`, the static greeting can be interrupted by the user if they speak over the greeting.
+ description: |-
+ If `true`, the static greeting will not be interrupted by the user if they speak over the greeting. If `false`, the static greeting can be interrupted by the user if they speak over the greeting.
+ With `true`, what the caller says during the greeting is kept and answered after the greeting finishes.
+ A DTMF key press still interrupts the greeting, and so does `interrupt_on_noise`.
+ With `false`, the greeting stops once the caller finishes speaking over it. This interruption ignores
+ `barge_min_words`, `barge_match_string`, and `enable_barge`, which apply only after the greeting.
default: false
examples:
- true
@@ -22291,6 +22353,7 @@ components:
When enabled, the AI will not respond to the user's input when the user is speaking over the agent.
The agent will wait for the user to finish speaking before responding.
Additionally, any attempt the LLM makes to barge will be ignored and scraped from the conversation logs.
+ Setting `barge_match_string` turns this param off, even when it is set to `true`.
**Default:** `true`.
default: true
examples:
@@ -22397,15 +22460,18 @@ components:
- e164
- international
- national
+ - generic
description: |-
- The format for the AI agent to reference phone numbers.
- Allowed values are `e164`, `international`, and `national`.
+ How the agent formats phone numbers when it speaks them.
+ Allowed values are `e164`, `international`, `national`, and `generic`.
+ An unrecognized value is ignored and `e164` is used.
**Default:** `e164`.
**Example:**
- `e164`: `+12345678901`
- `international`: `+1 234-567-8901`
- `national`: `(234) 567-8901`
+ - `generic`: `234 567 8901`
default: e164
examples:
- national
diff --git a/fern/apis/signalwire-rest/openapi.yaml b/fern/apis/signalwire-rest/openapi.yaml
index 3779812695..a89e9ef226 100644
--- a/fern/apis/signalwire-rest/openapi.yaml
+++ b/fern/apis/signalwire-rest/openapi.yaml
@@ -39465,7 +39465,8 @@ components:
hears before the AI reads it, or both.
One hint list covers every language the agent uses; there are no per-language hints. When speech recognition
runs in code-switching mode, because `multilingual` is set or a `languages` entry's `code` is `multi` on
- Deepgram speech recognition, recognition hints are not used. That covers string entries and `hint` values, and no error is returned.
+ Deepgram, recognition hints are not used. That covers string entries and `hint` values, and no error is returned.
+ Outside code-switching mode, every engine receives hints.
Rewrite rules still apply to the transcript in every mode.
examples:
- - pizza
@@ -39597,7 +39598,9 @@ components:
- type: number
enum:
- 0
- description: 'Amount of time, in ms, to wait before prompting the user to respond. Allowed values: `0` (to disable) or `1,000` - `600,000`. **Default:** `5000` ms.'
+ description: |-
+ Amount of time, in ms, to wait before prompting the user to respond. Allowed values: `0` (to disable) or `1,000` - `600,000`.
+ A nonzero value lower than `end_of_speech_timeout` is raised to `end_of_speech_timeout` plus 1,000 ms. **Default:** `5000` ms.
examples:
- 30000
attention_timeout_prompt:
@@ -39672,11 +39675,20 @@ components:
Before each reply, a smaller planning model reviews the conversation and the available functions,
then gives the agent a short directive on how to respond. This can improve function use and
coherence. The reply waits for the plan, which adds latency to every turn. The planning model is
- `utility_model` if set, otherwise `ai_model`. Billed separately from the agent's per-minute rate.
- To cover the wait, set `double_turn_fillers` on each entry in `languages`.
+ `double_turn_model` if set, otherwise `utility_model` if set, otherwise `ai_model`. Billed separately
+ from the agent's per-minute rate. To cover the wait, set `double_turn_fillers` on each entry in `languages`.
examples:
- true
default: false
+ double_turn_model:
+ type: string
+ description: |-
+ The model that plans each reply when `double_turns` is enabled. It takes priority over `utility_model`
+ for planning, so you can plan with one model and run background tasks with another. If the model isn't
+ recognized, the planning step is skipped and the agent replies without a plan. Has no effect unless
+ `double_turns` is `true`.
+ examples:
+ - gpt-4.1-mini
enable_inner_dialog:
type: boolean
description: |-
@@ -39727,15 +39739,23 @@ components:
description: |-
Takes a string, including a regular expression, defining barge behavior.
For example, this param can direct the AI to stop when the word 'hippopotamus' is input.
+ Setting this param turns off `transparent_barge`, even when `transparent_barge` is set to `true`.
+ When `barge_min_words` is also set, either condition is enough: the caller interrupts the agent by
+ saying at least that many words or by saying something that matches this string.
examples:
- Cancel order
barge_min_words:
type: integer
- minimum: 1
+ minimum: 0
maximum: 99
- description: Defines the number of words that must be input before triggering barge behavior, in a range of `1-99`.
+ description: |-
+ Defines the number of words that must be input before triggering barge behavior.
+ Allowed values: `0` to turn the word count off, or `1-99`. Any other value is ignored.
+ When `barge_match_string` is also set, either condition is enough to interrupt the agent.
+ **Default:** `0`.
examples:
- 3
+ default: 0
barge_functions:
type: boolean
description: If `true`, allows functions to be executed while the AI is being interrupted. **Default:** `false`.
@@ -39995,7 +40015,11 @@ components:
default: 2000
interrupt_on_noise:
type: boolean
- description: When enabled, barges agent upon any sound interruption longer than 1 second. The 1-second threshold can't be changed. **Default:** `false`.
+ description: |-
+ When enabled, barges agent upon any sound interruption longer than 1 second. The 1-second threshold can't be changed.
+ The sound doesn't need to be recognized as words, so sustained sound, such as background conversation or music, can interrupt the agent.
+ This interruption ignores `enable_barge`, `barge_min_words`, and `barge_match_string`, and it interrupts a static
+ greeting even when `static_greeting_no_barge` is `true`. **Default:** `false`.
examples:
- true
interrupt_prompt:
@@ -40144,7 +40168,12 @@ components:
- Hello! Welcome to our customer service. How can I help you today?
static_greeting_no_barge:
type: boolean
- description: If `true`, the static greeting will not be interrupted by the user if they speak over the greeting. If `false`, the static greeting can be interrupted by the user if they speak over the greeting.
+ description: |-
+ If `true`, the static greeting will not be interrupted by the user if they speak over the greeting. If `false`, the static greeting can be interrupted by the user if they speak over the greeting.
+ With `true`, what the caller says during the greeting is kept and answered after the greeting finishes.
+ A DTMF key press still interrupts the greeting, and so does `interrupt_on_noise`.
+ With `false`, the greeting stops once the caller finishes speaking over it. This interruption ignores
+ `barge_min_words`, `barge_match_string`, and `enable_barge`, which apply only after the greeting.
examples:
- true
default: false
@@ -40225,6 +40254,7 @@ components:
When enabled, the AI will not respond to the user's input when the user is speaking over the agent.
The agent will wait for the user to finish speaking before responding.
Additionally, any attempt the LLM makes to barge will be ignored and scraped from the conversation logs.
+ Setting `barge_match_string` turns this param off, even when it is set to `true`.
**Default:** `true`.
examples:
- true
@@ -40331,15 +40361,18 @@ components:
- 'e164'
- international
- national
+ - generic
description: |-
- The format for the AI agent to reference phone numbers.
- Allowed values are `e164`, `international`, and `national`.
+ How the agent formats phone numbers when it speaks them.
+ Allowed values are `e164`, `international`, `national`, and `generic`.
+ An unrecognized value is ignored and `e164` is used.
**Default:** `e164`.
**Example:**
- `e164`: `+12345678901`
- `international`: `+1 234-567-8901`
- `national`: `(234) 567-8901`
+ - `generic`: `234 567 8901`
examples:
- national
default: 'e164'
diff --git a/fern/products/swml/pages/reference/methods/calling/ai/ai_params/index.mdx b/fern/products/swml/pages/reference/methods/calling/ai/ai_params/index.mdx
index 1a9d19e759..0025571811 100644
--- a/fern/products/swml/pages/reference/methods/calling/ai/ai_params/index.mdx
+++ b/fern/products/swml/pages/reference/methods/calling/ai/ai_params/index.mdx
@@ -90,7 +90,12 @@ These parameters control the fundamental behavior and capabilities of the AI age
- Before each reply, a smaller planning model reviews the conversation and the available functions, then gives the agent a short directive on how to respond. This can improve function use and coherence. The reply waits for the plan, which adds latency to every turn. The planning model is [`utility_model`](#paramsutility_model) if set, otherwise `ai_model`. Billed separately from the agent's per-minute rate. To cover the wait, set [`double_turn_fillers`](/docs/swml/reference/calling/ai/languages#languagesdouble_turn_fillers) on each entry in `languages`.
+ Before each reply, a smaller planning model reviews the conversation and the available functions, then gives the agent a short directive on how to respond. This can improve function use and coherence. The reply waits for the plan, which adds latency to every turn. The planning model is [`double_turn_model`](#paramsdouble_turn_model) if set, otherwise [`utility_model`](#paramsutility_model) if set, otherwise `ai_model`. Billed separately from the agent's per-minute rate. To cover the wait, set [`double_turn_fillers`](/docs/swml/reference/calling/ai/languages#languagesdouble_turn_fillers) on each entry in `languages`.
+
+
+
+
+ The model that plans each reply when [`double_turns`](#paramsdouble_turns) is enabled. It takes priority over [`utility_model`](#paramsutility_model) for planning, so you can plan with one model and run background tasks with another. If the model isn't recognized, the planning step is skipped and the agent replies without a plan. Has no effect unless `double_turns` is `true`.
@@ -270,7 +275,7 @@ Customize the AI agent's voice output, including volume control, voice character
- The format of the number the AI will reference the phone number. Valid values: `e164` (e.g. +12345678901), `international` (e.g. +1 234-567-8901), or `national` (e.g. (234) 567-8901).
+ How the agent formats phone numbers when it speaks them. Valid values: `e164` (e.g. +12345678901), `international` (e.g. +1 234-567-8901), `national` (e.g. (234) 567-8901), or `generic` (e.g. 234 567 8901). An unrecognized value is ignored and `e164` is used.
@@ -321,11 +326,13 @@ Manage how the AI agent handles interruptions when users speak over it, includin
Takes a string, including a regular expression, defining barge behavior. For example, this param can direct the AI to stop when the word "hippopotamus" is input.
+
+ Setting this param turns off [`transparent_barge`](#paramstransparent_barge), even when `transparent_barge` is set to `true`. When [`barge_min_words`](#paramsbarge_min_words) is also set, either condition is enough: the caller interrupts the agent by saying at least that many words or by saying something that matches this string.
-
- Defines the number of words that must be input before triggering barge behavior. Allowed values from `1`-`99`.
+
+ Defines the number of words that must be input before triggering barge behavior. Allowed values: `0` to turn the word count off, or `1`-`99`. Any other value is ignored. When [`barge_match_string`](#paramsbarge_match_string) is also set, either condition is enough to interrupt the agent.
@@ -336,6 +343,8 @@ Manage how the AI agent handles interruptions when users speak over it, includin
When enabled, barges agent upon any sound interruption longer than 1 second. The 1-second threshold can't be changed.
+
+ The sound doesn't need to be recognized as words, so sustained sound, such as background conversation or music, can interrupt the agent. This interruption ignores [`enable_barge`](#paramsenable_barge), [`barge_min_words`](#paramsbarge_min_words), and [`barge_match_string`](#paramsbarge_match_string), and it interrupts a static greeting even when [`static_greeting_no_barge`](#paramsstatic_greeting_no_barge) is `true`.
@@ -348,6 +357,8 @@ Manage how the AI agent handles interruptions when users speak over it, includin
When enabled, the AI will not respond to the user's input when the user is speaking over the agent. The agent will wait for the user to finish speaking before responding. Additionally, any attempt the LLM makes to barge will be ignored and scraped from the conversation logs.
+
+ Setting [`barge_match_string`](#paramsbarge_match_string) turns this param off, even when it is set to `true`.
@@ -361,7 +372,7 @@ Manage how the AI agent handles interruptions when users speak over it, includin
Set various timing parameters that control wait times, response delays, and session limits to optimize the conversation flow and prevent dead air.
- Amount of time, in ms, to wait before prompting the user to respond. Allowed values: `0` (to disable) or `1,000`-`600,000`.
+ Amount of time, in ms, to wait before prompting the user to respond. Allowed values: `0` (to disable) or `1,000`-`600,000`. A nonzero value lower than [`end_of_speech_timeout`](#paramsend_of_speech_timeout) is raised to `end_of_speech_timeout` plus 1,000 ms.
@@ -451,6 +462,10 @@ Control background audio, hold music, and greeting messages to enhance the calle
If `true`, the static greeting will not be interrupted by the user if they speak over the greeting. If `false`, the static greeting can be interrupted by the user if they speak over the greeting.
+
+ With `true`, what the caller says during the greeting is kept and answered after the greeting finishes. A DTMF key press still interrupts the greeting, and so does [`interrupt_on_noise`](#paramsinterrupt_on_noise).
+
+ With `false`, the greeting stops once the caller finishes speaking over it. This interruption ignores [`barge_min_words`](#paramsbarge_min_words), [`barge_match_string`](#paramsbarge_match_string), and [`enable_barge`](#paramsenable_barge), which apply only after the greeting.
diff --git a/fern/products/swml/pages/reference/methods/calling/ai/index.mdx b/fern/products/swml/pages/reference/methods/calling/ai/index.mdx
index 25be041f7a..9bfc5013d8 100644
--- a/fern/products/swml/pages/reference/methods/calling/ai/index.mdx
+++ b/fern/products/swml/pages/reference/methods/calling/ai/index.mdx
@@ -75,8 +75,9 @@ it is recommended to read the [prompt engineering][prompt-engineering] guide.
One hint list covers every language the agent uses; there are no per-language hints. When speech recognition
runs in code-switching mode, because [`ai.multilingual`][multilingual] is set or a [`languages`][languages] entry's
- `code` is `multi` on Deepgram speech recognition, recognition hints are not used. That covers string entries and `hint` values, and no error
- is returned. Rewrite rules still apply to the transcript in every mode.
+ `code` is `multi` on Deepgram, recognition hints are not used. That covers string entries and `hint` values, and no
+ error is returned. Outside code-switching mode, every engine receives hints. Rewrite rules still apply to the
+ transcript in every mode.
diff --git a/specs/swml/calling/Methods/ai/ai_params.tsp b/specs/swml/calling/Methods/ai/ai_params.tsp
index 42a985ec04..a0509d8ba0 100644
--- a/specs/swml/calling/Methods/ai/ai_params.tsp
+++ b/specs/swml/calling/Methods/ai/ai_params.tsp
@@ -90,7 +90,10 @@ model AIParams {
@example(true)
asr_smart_format?: boolean;
- @doc("Amount of time, in ms, to wait before prompting the user to respond. Allowed values: `0` (to disable) or `1,000` - `600,000`. **Default:** `5000` ms.")
+ @doc("""
+ Amount of time, in ms, to wait before prompting the user to respond. Allowed values: `0` (to disable) or `1,000` - `600,000`.
+ A nonzero value lower than `end_of_speech_timeout` is raised to `end_of_speech_timeout` plus 1,000 ms. **Default:** `5000` ms.
+ """)
@example(30000)
attention_timeout?: AttentionTimeout | 0;
@@ -148,12 +151,21 @@ model AIParams {
Before each reply, a smaller planning model reviews the conversation and the available functions,
then gives the agent a short directive on how to respond. This can improve function use and
coherence. The reply waits for the plan, which adds latency to every turn. The planning model is
- `utility_model` if set, otherwise `ai_model`. Billed separately from the agent's per-minute rate.
- To cover the wait, set `double_turn_fillers` on each entry in `languages`.
+ `double_turn_model` if set, otherwise `utility_model` if set, otherwise `ai_model`. Billed separately
+ from the agent's per-minute rate. To cover the wait, set `double_turn_fillers` on each entry in `languages`.
""")
@example(true)
double_turns?: boolean = false;
+ @doc("""
+ The model that plans each reply when `double_turns` is enabled. It takes priority over `utility_model`
+ for planning, so you can plan with one model and run background tasks with another. If the model isn't
+ recognized, the planning step is skipped and the agent replies without a plan. Has no effect unless
+ `double_turns` is `true`.
+ """)
+ @example("gpt-4.1-mini")
+ double_turn_model?: string;
+
@doc("""
Enables the inner dialog feature, which runs a separate AI process in the background
that analyzes the conversation and provides real-time insights to the main AI agent.
@@ -197,15 +209,23 @@ model AIParams {
@doc("""
Takes a string, including a regular expression, defining barge behavior.
For example, this param can direct the AI to stop when the word 'hippopotamus' is input.
+ Setting this param turns off `transparent_barge`, even when `transparent_barge` is set to `true`.
+ When `barge_min_words` is also set, either condition is enough: the caller interrupts the agent by
+ saying at least that many words or by saying something that matches this string.
""")
@example("Cancel order")
barge_match_string?: string;
- @doc("Defines the number of words that must be input before triggering barge behavior, in a range of `1-99`.")
- @minValue(1)
+ @doc("""
+ Defines the number of words that must be input before triggering barge behavior.
+ Allowed values: `0` to turn the word count off, or `1-99`. Any other value is ignored.
+ When `barge_match_string` is also set, either condition is enough to interrupt the agent.
+ **Default:** `0`.
+ """)
+ @minValue(0)
@maxValue(99)
@example(3)
- barge_min_words?: integer;
+ barge_min_words?: integer = 0;
@doc("If `true`, allows functions to be executed while the AI is being interrupted. **Default:** `false`.")
@example(true)
@@ -408,7 +428,12 @@ model AIParams {
@example(2000)
input_poll_freq?: integer = 2000;
- @doc("When enabled, barges agent upon any sound interruption longer than 1 second. The 1-second threshold can't be changed. **Default:** `false`.")
+ @doc("""
+ When enabled, barges agent upon any sound interruption longer than 1 second. The 1-second threshold can't be changed.
+ The sound doesn't need to be recognized as words, so sustained sound, such as background conversation or music, can interrupt the agent.
+ This interruption ignores `enable_barge`, `barge_min_words`, and `barge_match_string`, and it interrupts a static
+ greeting even when `static_greeting_no_barge` is `true`. **Default:** `false`.
+ """)
@example(true)
interrupt_on_noise?: boolean;
@@ -534,7 +559,13 @@ model AIParams {
@example("Hello! Welcome to our customer service. How can I help you today?")
static_greeting?: string;
- @doc("If `true`, the static greeting will not be interrupted by the user if they speak over the greeting. If `false`, the static greeting can be interrupted by the user if they speak over the greeting.")
+ @doc("""
+ If `true`, the static greeting will not be interrupted by the user if they speak over the greeting. If `false`, the static greeting can be interrupted by the user if they speak over the greeting.
+ With `true`, what the caller says during the greeting is kept and answered after the greeting finishes.
+ A DTMF key press still interrupts the greeting, and so does `interrupt_on_noise`.
+ With `false`, the greeting stops once the caller finishes speaking over it. This interruption ignores
+ `barge_min_words`, `barge_match_string`, and `enable_barge`, which apply only after the greeting.
+ """)
@example(true)
static_greeting_no_barge?: boolean = false;
@@ -585,6 +616,7 @@ model AIParams {
When enabled, the AI will not respond to the user's input when the user is speaking over the agent.
The agent will wait for the user to finish speaking before responding.
Additionally, any attempt the LLM makes to barge will be ignored and scraped from the conversation logs.
+ Setting `barge_match_string` turns this param off, even when it is set to `true`.
**Default:** `true`.
""")
@example(true)
@@ -679,17 +711,19 @@ model AIParams {
turn_filler_min_ms?: integer = 0;
@doc("""
- The format for the AI agent to reference phone numbers.
- Allowed values are `e164`, `international`, and `national`.
+ How the agent formats phone numbers when it speaks them.
+ Allowed values are `e164`, `international`, `national`, and `generic`.
+ An unrecognized value is ignored and `e164` is used.
**Default:** `e164`.
-
+
**Example:**
- `e164`: `+12345678901`
- `international`: `+1 234-567-8901`
- `national`: `(234) 567-8901`
+ - `generic`: `234 567 8901`
""")
@example("national")
- tts_number_format?: "e164" | "international" | "national" = "e164";
+ tts_number_format?: "e164" | "international" | "national" | "generic" = "e164";
@doc("Has no effect and can be omitted.")
verbose_logs?: boolean;
diff --git a/specs/swml/calling/Methods/ai/main.tsp b/specs/swml/calling/Methods/ai/main.tsp
index 39639175ff..0f93145abc 100644
--- a/specs/swml/calling/Methods/ai/main.tsp
+++ b/specs/swml/calling/Methods/ai/main.tsp
@@ -93,7 +93,8 @@ model AIObject {
hears before the AI reads it, or both.
One hint list covers every language the agent uses; there are no per-language hints. When speech recognition
runs in code-switching mode, because `multilingual` is set or a `languages` entry's `code` is `multi` on
- Deepgram speech recognition, recognition hints are not used. That covers string entries and `hint` values, and no error is returned.
+ Deepgram, recognition hints are not used. That covers string entries and `hint` values, and no error is returned.
+ Outside code-switching mode, every engine receives hints.
Rewrite rules still apply to the transcript in every mode.
""")
@example(#["pizza", "pepperoni"])
diff --git a/specs/swml/calling/tsp-output/@typespec/json-schema/SWMLObject.json b/specs/swml/calling/tsp-output/@typespec/json-schema/SWMLObject.json
index 8139a548ba..15dbb12721 100644
--- a/specs/swml/calling/tsp-output/@typespec/json-schema/SWMLObject.json
+++ b/specs/swml/calling/tsp-output/@typespec/json-schema/SWMLObject.json
@@ -2842,7 +2842,7 @@
"pepperoni"
]
],
- "description": "Words and phrases that help the agent understand what the caller says. Each string is passed to speech\nrecognition as a hint, making that word or phrase more likely to be recognized.\nHints don't change how the agent speaks; use `pronounce` for that.\nAn object can set a `hint`, a `pattern` and `replace` pair that rewrites matching text in what the agent\nhears before the AI reads it, or both.\nOne hint list covers every language the agent uses; there are no per-language hints. When speech recognition\nruns in code-switching mode, because `multilingual` is set or a `languages` entry's `code` is `multi` on\nDeepgram speech recognition, recognition hints are not used. That covers string entries and `hint` values, and no error is returned.\nRewrite rules still apply to the transcript in every mode."
+ "description": "Words and phrases that help the agent understand what the caller says. Each string is passed to speech\nrecognition as a hint, making that word or phrase more likely to be recognized.\nHints don't change how the agent speaks; use `pronounce` for that.\nAn object can set a `hint`, a `pattern` and `replace` pair that rewrites matching text in what the agent\nhears before the AI reads it, or both.\nOne hint list covers every language the agent uses; there are no per-language hints. When speech recognition\nruns in code-switching mode, because `multilingual` is set or a `languages` entry's `code` is `multi` on\nDeepgram, recognition hints are not used. That covers string entries and `hint` values, and no error is returned.\nOutside code-switching mode, every engine receives hints.\nRewrite rules still apply to the transcript in every mode."
},
"languages": {
"type": "array",
@@ -6060,7 +6060,7 @@
"examples": [
30000
],
- "description": "Amount of time, in ms, to wait before prompting the user to respond. Allowed values: `0` (to disable) or `1,000` - `600,000`. **Default:** `5000` ms."
+ "description": "Amount of time, in ms, to wait before prompting the user to respond. Allowed values: `0` (to disable) or `1,000` - `600,000`.\nA nonzero value lower than `end_of_speech_timeout` is raised to `end_of_speech_timeout` plus 1,000 ms. **Default:** `5000` ms."
},
"attention_timeout_prompt": {
"type": "string",
@@ -6153,7 +6153,14 @@
"examples": [
true
],
- "description": "Before each reply, a smaller planning model reviews the conversation and the available functions,\nthen gives the agent a short directive on how to respond. This can improve function use and\ncoherence. The reply waits for the plan, which adds latency to every turn. The planning model is\n`utility_model` if set, otherwise `ai_model`. Billed separately from the agent's per-minute rate.\nTo cover the wait, set `double_turn_fillers` on each entry in `languages`."
+ "description": "Before each reply, a smaller planning model reviews the conversation and the available functions,\nthen gives the agent a short directive on how to respond. This can improve function use and\ncoherence. The reply waits for the plan, which adds latency to every turn. The planning model is\n`double_turn_model` if set, otherwise `utility_model` if set, otherwise `ai_model`. Billed separately\nfrom the agent's per-minute rate. To cover the wait, set `double_turn_fillers` on each entry in `languages`."
+ },
+ "double_turn_model": {
+ "type": "string",
+ "examples": [
+ "gpt-4.1-mini"
+ ],
+ "description": "The model that plans each reply when `double_turns` is enabled. It takes priority over `utility_model`\nfor planning, so you can plan with one model and run background tasks with another. If the model isn't\nrecognized, the planning step is skipped and the agent replies without a plan. Has no effect unless\n`double_turns` is `true`."
},
"enable_inner_dialog": {
"type": "boolean",
@@ -6204,16 +6211,17 @@
"examples": [
"Cancel order"
],
- "description": "Takes a string, including a regular expression, defining barge behavior.\nFor example, this param can direct the AI to stop when the word 'hippopotamus' is input."
+ "description": "Takes a string, including a regular expression, defining barge behavior.\nFor example, this param can direct the AI to stop when the word 'hippopotamus' is input.\nSetting this param turns off `transparent_barge`, even when `transparent_barge` is set to `true`.\nWhen `barge_min_words` is also set, either condition is enough: the caller interrupts the agent by\nsaying at least that many words or by saying something that matches this string."
},
"barge_min_words": {
"type": "integer",
+ "default": 0,
"examples": [
3
],
- "minimum": 1,
+ "minimum": 0,
"maximum": 99,
- "description": "Defines the number of words that must be input before triggering barge behavior, in a range of `1-99`."
+ "description": "Defines the number of words that must be input before triggering barge behavior.\nAllowed values: `0` to turn the word count off, or `1-99`. Any other value is ignored.\nWhen `barge_match_string` is also set, either condition is enough to interrupt the agent.\n**Default:** `0`."
},
"barge_functions": {
"type": "boolean",
@@ -6551,7 +6559,7 @@
"examples": [
true
],
- "description": "When enabled, barges agent upon any sound interruption longer than 1 second. The 1-second threshold can't be changed. **Default:** `false`."
+ "description": "When enabled, barges agent upon any sound interruption longer than 1 second. The 1-second threshold can't be changed.\nThe sound doesn't need to be recognized as words, so sustained sound, such as background conversation or music, can interrupt the agent.\nThis interruption ignores `enable_barge`, `barge_min_words`, and `barge_match_string`, and it interrupts a static\ngreeting even when `static_greeting_no_barge` is `true`. **Default:** `false`."
},
"interrupt_prompt": {
"type": "string",
@@ -6714,7 +6722,7 @@
"examples": [
true
],
- "description": "If `true`, the static greeting will not be interrupted by the user if they speak over the greeting. If `false`, the static greeting can be interrupted by the user if they speak over the greeting."
+ "description": "If `true`, the static greeting will not be interrupted by the user if they speak over the greeting. If `false`, the static greeting can be interrupted by the user if they speak over the greeting.\nWith `true`, what the caller says during the greeting is kept and answered after the greeting finishes.\nA DTMF key press still interrupts the greeting, and so does `interrupt_on_noise`.\nWith `false`, the greeting stops once the caller finishes speaking over it. This interruption ignores\n`barge_min_words`, `barge_match_string`, and `enable_barge`, which apply only after the greeting."
},
"summary_mode": {
"anyOf": [
@@ -6836,7 +6844,7 @@
"examples": [
true
],
- "description": "When enabled, the AI will not respond to the user's input when the user is speaking over the agent.\nThe agent will wait for the user to finish speaking before responding.\nAdditionally, any attempt the LLM makes to barge will be ignored and scraped from the conversation logs.\n**Default:** `true`."
+ "description": "When enabled, the AI will not respond to the user's input when the user is speaking over the agent.\nThe agent will wait for the user to finish speaking before responding.\nAdditionally, any attempt the LLM makes to barge will be ignored and scraped from the conversation logs.\nSetting `barge_match_string` turns this param off, even when it is set to `true`.\n**Default:** `true`."
},
"transparent_barge_max_time": {
"type": "integer",
@@ -6921,13 +6929,17 @@
{
"type": "string",
"const": "national"
+ },
+ {
+ "type": "string",
+ "const": "generic"
}
],
"default": "e164",
"examples": [
"national"
],
- "description": "The format for the AI agent to reference phone numbers.\nAllowed values are `e164`, `international`, and `national`.\n**Default:** `e164`.\n\n**Example:**\n- `e164`: `+12345678901`\n- `international`: `+1 234-567-8901`\n- `national`: `(234) 567-8901`"
+ "description": "How the agent formats phone numbers when it speaks them.\nAllowed values are `e164`, `international`, `national`, and `generic`.\nAn unrecognized value is ignored and `e164` is used.\n**Default:** `e164`.\n\n**Example:**\n- `e164`: `+12345678901`\n- `international`: `+1 234-567-8901`\n- `national`: `(234) 567-8901`\n- `generic`: `234 567 8901`"
},
"verbose_logs": {
"type": "boolean",