telnyx 6.70.0 → 6.72.0

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.
Files changed (170) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/client.d.mts +13 -6
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +13 -6
  5. package/client.d.ts.map +1 -1
  6. package/client.js +6 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +6 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/ai/ai.d.mts +1 -1
  12. package/resources/ai/ai.d.mts.map +1 -1
  13. package/resources/ai/ai.d.ts +1 -1
  14. package/resources/ai/ai.d.ts.map +1 -1
  15. package/resources/ai/ai.js +2 -2
  16. package/resources/ai/ai.js.map +1 -1
  17. package/resources/ai/ai.mjs +2 -2
  18. package/resources/ai/ai.mjs.map +1 -1
  19. package/resources/calls/actions.d.mts +260 -247
  20. package/resources/calls/actions.d.mts.map +1 -1
  21. package/resources/calls/actions.d.ts +260 -247
  22. package/resources/calls/actions.d.ts.map +1 -1
  23. package/resources/calls/actions.js.map +1 -1
  24. package/resources/calls/actions.mjs.map +1 -1
  25. package/resources/calls/calls.d.mts +210 -3
  26. package/resources/calls/calls.d.mts.map +1 -1
  27. package/resources/calls/calls.d.ts +210 -3
  28. package/resources/calls/calls.d.ts.map +1 -1
  29. package/resources/calls/calls.js.map +1 -1
  30. package/resources/calls/calls.mjs.map +1 -1
  31. package/resources/calls/index.d.mts +2 -2
  32. package/resources/calls/index.d.mts.map +1 -1
  33. package/resources/calls/index.d.ts +2 -2
  34. package/resources/calls/index.d.ts.map +1 -1
  35. package/resources/calls/index.js.map +1 -1
  36. package/resources/calls/index.mjs.map +1 -1
  37. package/resources/conferences/actions.d.mts +1 -9
  38. package/resources/conferences/actions.d.mts.map +1 -1
  39. package/resources/conferences/actions.d.ts +1 -9
  40. package/resources/conferences/actions.d.ts.map +1 -1
  41. package/resources/index.d.mts +4 -3
  42. package/resources/index.d.mts.map +1 -1
  43. package/resources/index.d.ts +4 -3
  44. package/resources/index.d.ts.map +1 -1
  45. package/resources/index.js +4 -2
  46. package/resources/index.js.map +1 -1
  47. package/resources/index.mjs +1 -0
  48. package/resources/index.mjs.map +1 -1
  49. package/resources/shared.d.mts +6 -0
  50. package/resources/shared.d.mts.map +1 -1
  51. package/resources/shared.d.ts +6 -0
  52. package/resources/shared.d.ts.map +1 -1
  53. package/resources/speech-to-text/index.d.mts +3 -3
  54. package/resources/speech-to-text/index.d.mts.map +1 -1
  55. package/resources/speech-to-text/index.d.ts +3 -3
  56. package/resources/speech-to-text/index.d.ts.map +1 -1
  57. package/resources/speech-to-text/index.js +1 -5
  58. package/resources/speech-to-text/index.js.map +1 -1
  59. package/resources/speech-to-text/index.mjs +0 -2
  60. package/resources/speech-to-text/index.mjs.map +1 -1
  61. package/resources/speech-to-text/internal-base.d.mts +42 -11
  62. package/resources/speech-to-text/internal-base.d.mts.map +1 -1
  63. package/resources/speech-to-text/internal-base.d.ts +42 -11
  64. package/resources/speech-to-text/internal-base.d.ts.map +1 -1
  65. package/resources/speech-to-text/internal-base.js +5 -9
  66. package/resources/speech-to-text/internal-base.js.map +1 -1
  67. package/resources/speech-to-text/internal-base.mjs +5 -9
  68. package/resources/speech-to-text/internal-base.mjs.map +1 -1
  69. package/resources/speech-to-text/speech-to-text.d.mts +79 -100
  70. package/resources/speech-to-text/speech-to-text.d.mts.map +1 -1
  71. package/resources/speech-to-text/speech-to-text.d.ts +79 -100
  72. package/resources/speech-to-text/speech-to-text.d.ts.map +1 -1
  73. package/resources/speech-to-text/speech-to-text.js +16 -19
  74. package/resources/speech-to-text/speech-to-text.js.map +1 -1
  75. package/resources/speech-to-text/speech-to-text.mjs +16 -19
  76. package/resources/speech-to-text/speech-to-text.mjs.map +1 -1
  77. package/resources/speech-to-text/ws-base.d.mts +106 -0
  78. package/resources/speech-to-text/ws-base.d.mts.map +1 -0
  79. package/resources/speech-to-text/ws-base.d.ts +106 -0
  80. package/resources/speech-to-text/ws-base.d.ts.map +1 -0
  81. package/resources/speech-to-text/ws-base.js +476 -0
  82. package/resources/speech-to-text/ws-base.js.map +1 -0
  83. package/resources/speech-to-text/ws-base.mjs +472 -0
  84. package/resources/speech-to-text/ws-base.mjs.map +1 -0
  85. package/resources/speech-to-text/ws.d.mts +9 -28
  86. package/resources/speech-to-text/ws.d.mts.map +1 -1
  87. package/resources/speech-to-text/ws.d.ts +9 -28
  88. package/resources/speech-to-text/ws.d.ts.map +1 -1
  89. package/resources/speech-to-text/ws.js +17 -97
  90. package/resources/speech-to-text/ws.js.map +1 -1
  91. package/resources/speech-to-text/ws.mjs +17 -97
  92. package/resources/speech-to-text/ws.mjs.map +1 -1
  93. package/resources/speech-to-text.d.mts +2 -0
  94. package/resources/speech-to-text.d.mts.map +1 -0
  95. package/resources/speech-to-text.d.ts +2 -0
  96. package/resources/speech-to-text.d.ts.map +1 -0
  97. package/resources/speech-to-text.js +6 -0
  98. package/resources/speech-to-text.js.map +1 -0
  99. package/resources/speech-to-text.mjs +3 -0
  100. package/resources/speech-to-text.mjs.map +1 -0
  101. package/resources/texml/accounts/calls/calls.d.mts +31 -465
  102. package/resources/texml/accounts/calls/calls.d.mts.map +1 -1
  103. package/resources/texml/accounts/calls/calls.d.ts +31 -465
  104. package/resources/texml/accounts/calls/calls.d.ts.map +1 -1
  105. package/resources/texml/accounts/calls/calls.js +7 -1
  106. package/resources/texml/accounts/calls/calls.js.map +1 -1
  107. package/resources/texml/accounts/calls/calls.mjs +7 -1
  108. package/resources/texml/accounts/calls/calls.mjs.map +1 -1
  109. package/resources/text-to-speech/index.d.mts +1 -1
  110. package/resources/text-to-speech/index.d.mts.map +1 -1
  111. package/resources/text-to-speech/index.d.ts +1 -1
  112. package/resources/text-to-speech/index.d.ts.map +1 -1
  113. package/resources/text-to-speech/index.js.map +1 -1
  114. package/resources/text-to-speech/index.mjs.map +1 -1
  115. package/resources/text-to-speech/text-to-speech.d.mts +79 -13
  116. package/resources/text-to-speech/text-to-speech.d.mts.map +1 -1
  117. package/resources/text-to-speech/text-to-speech.d.ts +79 -13
  118. package/resources/text-to-speech/text-to-speech.d.ts.map +1 -1
  119. package/resources/text-to-speech/text-to-speech.js +33 -1
  120. package/resources/text-to-speech/text-to-speech.js.map +1 -1
  121. package/resources/text-to-speech/text-to-speech.mjs +33 -1
  122. package/resources/text-to-speech/text-to-speech.mjs.map +1 -1
  123. package/resources/voice-sdk-call-reports.d.mts +30 -105
  124. package/resources/voice-sdk-call-reports.d.mts.map +1 -1
  125. package/resources/voice-sdk-call-reports.d.ts +30 -105
  126. package/resources/voice-sdk-call-reports.d.ts.map +1 -1
  127. package/resources/voice-sdk-call-reports.js.map +1 -1
  128. package/resources/voice-sdk-call-reports.mjs.map +1 -1
  129. package/resources/whatsapp/index.d.mts +1 -1
  130. package/resources/whatsapp/index.d.mts.map +1 -1
  131. package/resources/whatsapp/index.d.ts +1 -1
  132. package/resources/whatsapp/index.d.ts.map +1 -1
  133. package/resources/whatsapp/index.js.map +1 -1
  134. package/resources/whatsapp/index.mjs.map +1 -1
  135. package/resources/whatsapp/user-data.d.mts +16 -33
  136. package/resources/whatsapp/user-data.d.mts.map +1 -1
  137. package/resources/whatsapp/user-data.d.ts +16 -33
  138. package/resources/whatsapp/user-data.d.ts.map +1 -1
  139. package/resources/whatsapp/whatsapp.d.mts +2 -2
  140. package/resources/whatsapp/whatsapp.d.mts.map +1 -1
  141. package/resources/whatsapp/whatsapp.d.ts +2 -2
  142. package/resources/whatsapp/whatsapp.d.ts.map +1 -1
  143. package/resources/whatsapp/whatsapp.js.map +1 -1
  144. package/resources/whatsapp/whatsapp.mjs.map +1 -1
  145. package/src/client.ts +33 -4
  146. package/src/resources/ai/ai.ts +3 -3
  147. package/src/resources/calls/actions.ts +331 -320
  148. package/src/resources/calls/calls.ts +272 -0
  149. package/src/resources/calls/index.ts +4 -0
  150. package/src/resources/conferences/actions.ts +1 -10
  151. package/src/resources/index.ts +13 -2
  152. package/src/resources/shared.ts +7 -0
  153. package/src/resources/speech-to-text/index.ts +6 -9
  154. package/src/resources/speech-to-text/internal-base.ts +49 -22
  155. package/src/resources/speech-to-text/speech-to-text.ts +102 -128
  156. package/src/resources/speech-to-text/ws-base.ts +619 -0
  157. package/src/resources/speech-to-text/ws.ts +26 -111
  158. package/src/resources/speech-to-text.ts +3 -0
  159. package/src/resources/texml/accounts/calls/calls.ts +36 -564
  160. package/src/resources/text-to-speech/index.ts +3 -2
  161. package/src/resources/text-to-speech/text-to-speech.ts +100 -16
  162. package/src/resources/voice-sdk-call-reports.ts +33 -116
  163. package/src/resources/whatsapp/index.ts +1 -0
  164. package/src/resources/whatsapp/user-data.ts +17 -38
  165. package/src/resources/whatsapp/whatsapp.ts +2 -0
  166. package/src/version.ts +1 -1
  167. package/version.d.mts +1 -1
  168. package/version.d.ts +1 -1
  169. package/version.js +1 -1
  170. package/version.mjs +1 -1
@@ -1,6 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../../core/resource';
4
+ import * as ActionsAPI from './actions';
4
5
  import * as Shared from '../shared';
5
6
  import * as CallsAPI from './calls';
6
7
  import * as AssistantsAPI from '../ai/assistants/assistants';
@@ -1736,6 +1737,82 @@ export namespace TranscriptionEngineGoogleConfig {
1736
1737
  }
1737
1738
  }
1738
1739
 
1740
+ export interface TranscriptionEngineSonioxConfig {
1741
+ /**
1742
+ * Engine identifier for Soniox transcription service
1743
+ */
1744
+ transcription_engine: 'Soniox';
1745
+
1746
+ /**
1747
+ * When true, Soniox emits end-of-utterance events at the cadence configured by
1748
+ * `max_endpoint_delay_ms`.
1749
+ */
1750
+ enable_endpoint_detection?: boolean;
1751
+
1752
+ /**
1753
+ * Whether to send also interim results. If set to false, only final results will
1754
+ * be sent.
1755
+ */
1756
+ interim_results?: boolean;
1757
+
1758
+ /**
1759
+ * ISO 639-1 language hint (e.g. `en`, `es`), or `auto` to omit the hint and let
1760
+ * Soniox auto-detect supported languages multilingually.
1761
+ */
1762
+ language?: string;
1763
+
1764
+ /**
1765
+ * Maximum silence (in milliseconds) before Soniox emits an end-of-utterance event.
1766
+ * Only honored when `enable_endpoint_detection` is true. Range: 500-3000 ms.
1767
+ */
1768
+ max_endpoint_delay_ms?: number;
1769
+
1770
+ /**
1771
+ * The model to use for transcription.
1772
+ */
1773
+ transcription_model?: 'soniox/stt-rt-v4';
1774
+ }
1775
+
1776
+ export interface TranscriptionEngineSpeechmaticsConfig {
1777
+ /**
1778
+ * Whether to send also interim results. If set to false, only final results will
1779
+ * be sent.
1780
+ */
1781
+ interim_results?: boolean;
1782
+
1783
+ /**
1784
+ * Language to use for speech recognition
1785
+ */
1786
+ language?:
1787
+ | 'en'
1788
+ | 'ba'
1789
+ | 'eu'
1790
+ | 'gl'
1791
+ | 'ga'
1792
+ | 'mt'
1793
+ | 'mn'
1794
+ | 'sw'
1795
+ | 'ug'
1796
+ | 'cy'
1797
+ | 'ar_en'
1798
+ | 'cmn_en'
1799
+ | 'en_ms'
1800
+ | 'en_ta'
1801
+ | 'tl'
1802
+ | 'es-bilingual-en'
1803
+ | 'cmn_en_ms_ta';
1804
+
1805
+ /**
1806
+ * Engine identifier for Speechmatics transcription service
1807
+ */
1808
+ transcription_engine?: 'Speechmatics';
1809
+
1810
+ /**
1811
+ * The model to use for transcription.
1812
+ */
1813
+ transcription_model?: 'speechmatics/standard';
1814
+ }
1815
+
1739
1816
  export interface TranscriptionEngineTelnyxConfig {
1740
1817
  /**
1741
1818
  * Language to use for speech recognition
@@ -1836,8 +1913,8 @@ export interface TranscriptionStartRequest {
1836
1913
  | TranscriptionEngineAzureConfig
1837
1914
  | TranscriptionEngineXaiConfig
1838
1915
  | TranscriptionEngineAssemblyaiConfig
1839
- | TranscriptionStartRequest.TranscriptionEngineSpeechmaticsConfig
1840
- | TranscriptionStartRequest.TranscriptionEngineSonioxConfig
1916
+ | TranscriptionEngineSpeechmaticsConfig
1917
+ | TranscriptionEngineSonioxConfig
1841
1918
  | TranscriptionEngineAConfig
1842
1919
  | TranscriptionEngineBConfig
1843
1920
  | DeepgramNova2Config
@@ -1851,84 +1928,6 @@ export interface TranscriptionStartRequest {
1851
1928
  transcription_tracks?: string;
1852
1929
  }
1853
1930
 
1854
- export namespace TranscriptionStartRequest {
1855
- export interface TranscriptionEngineSpeechmaticsConfig {
1856
- /**
1857
- * Whether to send also interim results. If set to false, only final results will
1858
- * be sent.
1859
- */
1860
- interim_results?: boolean;
1861
-
1862
- /**
1863
- * Language to use for speech recognition
1864
- */
1865
- language?:
1866
- | 'en'
1867
- | 'ba'
1868
- | 'eu'
1869
- | 'gl'
1870
- | 'ga'
1871
- | 'mt'
1872
- | 'mn'
1873
- | 'sw'
1874
- | 'ug'
1875
- | 'cy'
1876
- | 'ar_en'
1877
- | 'cmn_en'
1878
- | 'en_ms'
1879
- | 'en_ta'
1880
- | 'tl'
1881
- | 'es-bilingual-en'
1882
- | 'cmn_en_ms_ta';
1883
-
1884
- /**
1885
- * Engine identifier for Speechmatics transcription service
1886
- */
1887
- transcription_engine?: 'Speechmatics';
1888
-
1889
- /**
1890
- * The model to use for transcription.
1891
- */
1892
- transcription_model?: 'speechmatics/standard';
1893
- }
1894
-
1895
- export interface TranscriptionEngineSonioxConfig {
1896
- /**
1897
- * Engine identifier for Soniox transcription service
1898
- */
1899
- transcription_engine: 'Soniox';
1900
-
1901
- /**
1902
- * When true, Soniox emits end-of-utterance events at the cadence configured by
1903
- * `max_endpoint_delay_ms`.
1904
- */
1905
- enable_endpoint_detection?: boolean;
1906
-
1907
- /**
1908
- * Whether to send also interim results. If set to false, only final results will
1909
- * be sent.
1910
- */
1911
- interim_results?: boolean;
1912
-
1913
- /**
1914
- * ISO 639-1 language hint (e.g. `en`, `es`), or `auto` to omit the hint and let
1915
- * Soniox auto-detect supported languages multilingually.
1916
- */
1917
- language?: string;
1918
-
1919
- /**
1920
- * Maximum silence (in milliseconds) before Soniox emits an end-of-utterance event.
1921
- * Only honored when `enable_endpoint_detection` is true. Range: 500-3000 ms.
1922
- */
1923
- max_endpoint_delay_ms?: number;
1924
-
1925
- /**
1926
- * The model to use for transcription.
1927
- */
1928
- transcription_model?: 'soniox/stt-rt-v4';
1929
- }
1930
- }
1931
-
1932
1931
  export interface ActionAddAIAssistantMessagesResponse {
1933
1932
  data?: CallControlCommandResult;
1934
1933
  }
@@ -2308,6 +2307,16 @@ export interface ActionAnswerParams {
2308
2307
  */
2309
2308
  command_id?: string;
2310
2309
 
2310
+ /**
2311
+ * Starts a Conversation Relay session automatically when the answered/dialed call
2312
+ * is answered. This embedded shape is supported on `answer` and `dial`. It uses
2313
+ * public field names (`url`, `dtmf_detection`, `greeting`, `voice`, `language`,
2314
+ * etc.) and maps them to the underlying Conversation Relay action. `client_state`,
2315
+ * `tts_language`, and `transcription_language` inside this object are ignored; use
2316
+ * the parent command's `client_state` and `command_id` fields instead.
2317
+ */
2318
+ conversation_relay_config?: ActionAnswerParams.ConversationRelayConfig;
2319
+
2311
2320
  /**
2312
2321
  * Custom headers to be added to the SIP INVITE response.
2313
2322
  */
@@ -2465,6 +2474,155 @@ export interface ActionAnswerParams {
2465
2474
  }
2466
2475
 
2467
2476
  export namespace ActionAnswerParams {
2477
+ /**
2478
+ * Starts a Conversation Relay session automatically when the answered/dialed call
2479
+ * is answered. This embedded shape is supported on `answer` and `dial`. It uses
2480
+ * public field names (`url`, `dtmf_detection`, `greeting`, `voice`, `language`,
2481
+ * etc.) and maps them to the underlying Conversation Relay action. `client_state`,
2482
+ * `tts_language`, and `transcription_language` inside this object are ignored; use
2483
+ * the parent command's `client_state` and `command_id` fields instead.
2484
+ */
2485
+ export interface ConversationRelayConfig {
2486
+ /**
2487
+ * WebSocket URL for your Conversation Relay server. Must start with `ws://` or
2488
+ * `wss://`.
2489
+ */
2490
+ url: string;
2491
+
2492
+ /**
2493
+ * Custom key-value parameters forwarded to the relay session as assistant dynamic
2494
+ * variables.
2495
+ */
2496
+ custom_parameters?: { [key: string]: unknown };
2497
+
2498
+ /**
2499
+ * Enable DTMF detection for the relay session.
2500
+ */
2501
+ dtmf_detection?: boolean;
2502
+
2503
+ /**
2504
+ * Text played when the relay session starts.
2505
+ */
2506
+ greeting?: string;
2507
+
2508
+ /**
2509
+ * Controls when caller input can interrupt assistant speech. `any` allows speech
2510
+ * or DTMF interruptions; `none` disables interruptions; `speech` allows speech
2511
+ * only; `dtmf` allows DTMF only.
2512
+ */
2513
+ interruptible?: 'none' | 'any' | 'speech' | 'dtmf';
2514
+
2515
+ /**
2516
+ * Controls when caller input can interrupt assistant speech. `any` allows speech
2517
+ * or DTMF interruptions; `none` disables interruptions; `speech` allows speech
2518
+ * only; `dtmf` allows DTMF only.
2519
+ */
2520
+ interruptible_greeting?: 'none' | 'any' | 'speech' | 'dtmf';
2521
+
2522
+ /**
2523
+ * Settings for handling caller interruptions during Conversation Relay speech.
2524
+ */
2525
+ interruption_settings?: CallsAPI.ConversationRelayInterruptionSettings;
2526
+
2527
+ /**
2528
+ * Default language for both text-to-speech and speech recognition.
2529
+ */
2530
+ language?: string;
2531
+
2532
+ /**
2533
+ * Per-language TTS and transcription settings.
2534
+ */
2535
+ languages?: Array<CallsAPI.ConversationRelayLanguage>;
2536
+
2537
+ /**
2538
+ * Structured voice provider. Must be supplied together with `structured_provider`.
2539
+ */
2540
+ provider?: string;
2541
+
2542
+ /**
2543
+ * Provider-specific structured voice settings. Must be supplied together with
2544
+ * `provider`; Telnyx sends the value as the nested provider configuration for
2545
+ * Conversation Relay.
2546
+ */
2547
+ structured_provider?: { [key: string]: unknown };
2548
+
2549
+ /**
2550
+ * Engine to use for speech recognition. Legacy values `A` - `Google`, `B` -
2551
+ * `Telnyx` are supported for backward compatibility. For Conversation Relay, use
2552
+ * this field with `transcription_engine_config`; the `transcription` object is not
2553
+ * supported.
2554
+ */
2555
+ transcription_engine?:
2556
+ | 'Google'
2557
+ | 'Telnyx'
2558
+ | 'Deepgram'
2559
+ | 'Azure'
2560
+ | 'xAI'
2561
+ | 'AssemblyAI'
2562
+ | 'Speechmatics'
2563
+ | 'Soniox'
2564
+ | 'A'
2565
+ | 'B';
2566
+
2567
+ /**
2568
+ * Engine-specific transcription settings for Conversation Relay. This accepts the
2569
+ * same provider-specific options used by the Call Transcription Start command,
2570
+ * such as `transcription_model`, without requiring the engine discriminator to be
2571
+ * repeated inside this object.
2572
+ */
2573
+ transcription_engine_config?: { [key: string]: unknown };
2574
+
2575
+ /**
2576
+ * Text-to-speech provider. If omitted, Telnyx derives it from `voice` or
2577
+ * `provider`.
2578
+ */
2579
+ tts_provider?: string;
2580
+
2581
+ /**
2582
+ * The voice to be used by the voice assistant. Currently we support ElevenLabs,
2583
+ * Telnyx and AWS voices.
2584
+ *
2585
+ * **Supported Providers:**
2586
+ *
2587
+ * - **AWS:** Use `AWS.Polly.<VoiceId>` (e.g., `AWS.Polly.Joanna`). For neural
2588
+ * voices, which provide more realistic, human-like speech, append `-Neural` to
2589
+ * the `VoiceId` (e.g., `AWS.Polly.Joanna-Neural`). Check the
2590
+ * [available voices](https://docs.aws.amazon.com/polly/latest/dg/available-voices.html)
2591
+ * for compatibility.
2592
+ * - **Azure:** Use `Azure.<VoiceId>. (e.g. Azure.en-CA-ClaraNeural,
2593
+ * Azure.en-CA-LiamNeural, Azure.en-US-BrianMultilingualNeural,
2594
+ * Azure.en-US-Ava:DragonHDLatestNeural. For a complete list of voices, go to
2595
+ * [Azure Voice Gallery](https://speech.microsoft.com/portal/voicegallery).)
2596
+ * - **ElevenLabs:** Use `ElevenLabs.<ModelId>.<VoiceId>` (e.g.,
2597
+ * `ElevenLabs.BaseModel.John`). The `ModelId` part is optional. To use
2598
+ * ElevenLabs, you must provide your ElevenLabs API key as an integration secret
2599
+ * under `"voice_settings": {"api_key_ref": "<secret_id>"}`. See
2600
+ * [integration secrets documentation](https://developers.telnyx.com/api/secrets-manager/integration-secrets/create-integration-secret)
2601
+ * for details. Check
2602
+ * [available voices](https://elevenlabs.io/docs/api-reference/get-voices).
2603
+ * - **Telnyx:** Use `Telnyx.<model_id>.<voice_id>`
2604
+ * - **Inworld:** Use `Inworld.<ModelId>.<VoiceId>` (e.g., `Inworld.Mini.Loretta`,
2605
+ * `Inworld.Max.Oliver`). Supported models: `Mini`, `Max`.
2606
+ * - **xAI:** Use `xAI.<VoiceId>` (e.g., `xAI.eve`). Available voices: `eve`,
2607
+ * `ara`, `rex`, `sal`, `leo`.
2608
+ */
2609
+ voice?: string;
2610
+
2611
+ /**
2612
+ * The settings associated with the voice selected
2613
+ */
2614
+ voice_settings?:
2615
+ | ActionsAPI.ElevenLabsVoiceSettings
2616
+ | ActionsAPI.TelnyxVoiceSettings
2617
+ | ActionsAPI.AwsVoiceSettings
2618
+ | Shared.MinimaxVoiceSettings
2619
+ | Shared.AzureVoiceSettings
2620
+ | Shared.RimeVoiceSettings
2621
+ | Shared.ResembleVoiceSettings
2622
+ | Shared.InworldVoiceSettings
2623
+ | Shared.XaiVoiceSettings;
2624
+ }
2625
+
2468
2626
  /**
2469
2627
  * Enables deepfake detection on the call. When enabled, audio from the remote
2470
2628
  * party is streamed to a detection service that analyzes whether the voice is
@@ -3159,19 +3317,10 @@ export interface ActionGatherUsingSpeakParams {
3159
3317
  | Shared.AzureVoiceSettings
3160
3318
  | Shared.RimeVoiceSettings
3161
3319
  | Shared.ResembleVoiceSettings
3162
- | ActionGatherUsingSpeakParams.InworldVoiceSettings
3320
+ | Shared.InworldVoiceSettings
3163
3321
  | Shared.XaiVoiceSettings;
3164
3322
  }
3165
3323
 
3166
- export namespace ActionGatherUsingSpeakParams {
3167
- export interface InworldVoiceSettings {
3168
- /**
3169
- * Voice settings provider type
3170
- */
3171
- type: 'inworld';
3172
- }
3173
- }
3174
-
3175
3324
  export interface ActionHangupParams {
3176
3325
  /**
3177
3326
  * Use this field to add state to every subsequent webhook. It must be a valid
@@ -3542,19 +3691,10 @@ export interface ActionSpeakParams {
3542
3691
  | Shared.AzureVoiceSettings
3543
3692
  | Shared.RimeVoiceSettings
3544
3693
  | Shared.ResembleVoiceSettings
3545
- | ActionSpeakParams.InworldVoiceSettings
3694
+ | Shared.InworldVoiceSettings
3546
3695
  | Shared.XaiVoiceSettings;
3547
3696
  }
3548
3697
 
3549
- export namespace ActionSpeakParams {
3550
- export interface InworldVoiceSettings {
3551
- /**
3552
- * Voice settings provider type
3553
- */
3554
- type: 'inworld';
3555
- }
3556
- }
3557
-
3558
3698
  export interface ActionStartAIAssistantParams {
3559
3699
  /**
3560
3700
  * AI Assistant configuration. All fields except `id` are optional — the
@@ -3853,12 +3993,9 @@ export interface ActionStartConversationRelayParams {
3853
3993
  conversation_relay_dtmf_detection?: boolean;
3854
3994
 
3855
3995
  /**
3856
- * Conversation Relay connection settings. This object is used by TeXML Call
3857
- * Scripting's `<ConversationRelay>` verb. The `interruptible` and
3858
- * `interruptible_greeting` fields are shorthand for
3859
- * `interruption_settings.interruptible` and
3860
- * `interruption_settings.interruptible_greeting`; use top-level
3861
- * `interruption_settings` for the full interruption settings shape.
3996
+ * Conversation Relay connection settings. This object can provide `url`,
3997
+ * `dtmf_detection`, `interruptible`, `interruptible_greeting`, and `languages`.
3998
+ * Top-level aliases override nested values when both are present.
3862
3999
  */
3863
4000
  conversation_relay_settings?: ActionStartConversationRelayParams.ConversationRelaySettings;
3864
4001
 
@@ -3868,44 +4005,109 @@ export interface ActionStartConversationRelayParams {
3868
4005
  */
3869
4006
  conversation_relay_url?: string;
3870
4007
 
4008
+ /**
4009
+ * Custom key-value parameters forwarded to the relay session as
4010
+ * `assistant.dynamic_variables`. If `assistant.dynamic_variables` is also present,
4011
+ * these values are merged in.
4012
+ */
4013
+ custom_parameters?: { [key: string]: unknown };
4014
+
4015
+ /**
4016
+ * Public alias for `conversation_relay_dtmf_detection`. If both are present, this
4017
+ * value wins.
4018
+ */
4019
+ dtmf_detection?: boolean;
4020
+
3871
4021
  /**
3872
4022
  * Text played when the relay session starts.
3873
4023
  */
3874
4024
  greeting?: string;
3875
4025
 
4026
+ /**
4027
+ * Controls when caller input can interrupt assistant speech. `any` allows speech
4028
+ * or DTMF interruptions; `none` disables interruptions; `speech` allows speech
4029
+ * only; `dtmf` allows DTMF only.
4030
+ */
4031
+ interruptible?: 'none' | 'any' | 'speech' | 'dtmf';
4032
+
4033
+ /**
4034
+ * Controls when caller input can interrupt assistant speech. `any` allows speech
4035
+ * or DTMF interruptions; `none` disables interruptions; `speech` allows speech
4036
+ * only; `dtmf` allows DTMF only.
4037
+ */
4038
+ interruptible_greeting?: 'none' | 'any' | 'speech' | 'dtmf';
4039
+
3876
4040
  /**
3877
4041
  * Settings for handling caller interruptions during Conversation Relay speech.
3878
4042
  */
3879
- interruption_settings?: ActionStartConversationRelayParams.InterruptionSettings;
4043
+ interruption_settings?: CallsAPI.ConversationRelayInterruptionSettings;
3880
4044
 
3881
4045
  /**
3882
4046
  * Default language for the relay session. This value is used for both
3883
- * text-to-speech and speech recognition unless `tts_language` or
3884
- * `transcription_language` are provided.
4047
+ * text-to-speech and speech recognition.
3885
4048
  */
3886
4049
  language?: string;
3887
4050
 
3888
4051
  /**
3889
- * Language-specific TTS and transcription settings. Use this when the relay
3890
- * session needs per-language provider, voice, or speech model configuration.
4052
+ * Per-language TTS and transcription settings.
4053
+ */
4054
+ languages?: Array<CallsAPI.ConversationRelayLanguage>;
4055
+
4056
+ /**
4057
+ * Structured voice provider. Must be supplied together with `structured_provider`.
4058
+ */
4059
+ provider?: string;
4060
+
4061
+ /**
4062
+ * Provider-specific structured voice settings. Must be supplied together with
4063
+ * `provider`; Telnyx sends the value as the nested provider configuration for
4064
+ * Conversation Relay.
4065
+ */
4066
+ structured_provider?: { [key: string]: unknown };
4067
+
4068
+ /**
4069
+ * @deprecated Not supported for Conversation Relay start requests. Use
4070
+ * `transcription_engine` and `transcription_engine_config` instead.
4071
+ */
4072
+ transcription?: { [key: string]: unknown };
4073
+
4074
+ /**
4075
+ * Engine to use for speech recognition. Legacy values `A` - `Google`, `B` -
4076
+ * `Telnyx` are supported for backward compatibility. For Conversation Relay, use
4077
+ * this field with `transcription_engine_config`; the `transcription` object is not
4078
+ * supported.
3891
4079
  */
3892
- languages?: Array<ActionStartConversationRelayParams.Language>;
4080
+ transcription_engine?:
4081
+ | 'Google'
4082
+ | 'Telnyx'
4083
+ | 'Deepgram'
4084
+ | 'Azure'
4085
+ | 'xAI'
4086
+ | 'AssemblyAI'
4087
+ | 'Speechmatics'
4088
+ | 'Soniox'
4089
+ | 'A'
4090
+ | 'B';
3893
4091
 
3894
4092
  /**
3895
- * Speech-to-text settings for Conversation Relay.
4093
+ * Engine-specific transcription settings for Conversation Relay. This accepts the
4094
+ * same provider-specific options used by the Call Transcription Start command,
4095
+ * such as `transcription_model`, without requiring the engine discriminator to be
4096
+ * repeated inside this object.
3896
4097
  */
3897
- transcription?: ActionStartConversationRelayParams.Transcription;
4098
+ transcription_engine_config?: { [key: string]: unknown };
3898
4099
 
3899
4100
  /**
3900
- * Language to use for speech recognition. Overrides `language` for transcription
3901
- * when provided.
4101
+ * Text-to-speech provider. If omitted, Telnyx derives it from `voice` or
4102
+ * `provider`.
3902
4103
  */
3903
- transcription_language?: string;
4104
+ tts_provider?: string;
3904
4105
 
3905
4106
  /**
3906
- * Language to use for text-to-speech. Overrides `language` for TTS when provided.
4107
+ * Public alias for `conversation_relay_url`. Must start with `ws://` or `wss://`.
4108
+ * If both are present, this value wins.
3907
4109
  */
3908
- tts_language?: string;
4110
+ url?: string;
3909
4111
 
3910
4112
  /**
3911
4113
  * The voice to be used by the voice assistant. Currently we support ElevenLabs,
@@ -3944,9 +4146,11 @@ export interface ActionStartConversationRelayParams {
3944
4146
  | ElevenLabsVoiceSettings
3945
4147
  | TelnyxVoiceSettings
3946
4148
  | AwsVoiceSettings
4149
+ | Shared.MinimaxVoiceSettings
3947
4150
  | Shared.AzureVoiceSettings
3948
4151
  | Shared.RimeVoiceSettings
3949
4152
  | Shared.ResembleVoiceSettings
4153
+ | Shared.InworldVoiceSettings
3950
4154
  | Shared.XaiVoiceSettings;
3951
4155
  }
3952
4156
 
@@ -3965,12 +4169,9 @@ export namespace ActionStartConversationRelayParams {
3965
4169
  }
3966
4170
 
3967
4171
  /**
3968
- * Conversation Relay connection settings. This object is used by TeXML Call
3969
- * Scripting's `<ConversationRelay>` verb. The `interruptible` and
3970
- * `interruptible_greeting` fields are shorthand for
3971
- * `interruption_settings.interruptible` and
3972
- * `interruption_settings.interruptible_greeting`; use top-level
3973
- * `interruption_settings` for the full interruption settings shape.
4172
+ * Conversation Relay connection settings. This object can provide `url`,
4173
+ * `dtmf_detection`, `interruptible`, `interruptible_greeting`, and `languages`.
4174
+ * Top-level aliases override nested values when both are present.
3974
4175
  */
3975
4176
  export interface ConversationRelaySettings {
3976
4177
  /**
@@ -4001,121 +4202,7 @@ export namespace ActionStartConversationRelayParams {
4001
4202
  /**
4002
4203
  * Language-specific TTS and transcription settings.
4003
4204
  */
4004
- languages?: Array<ConversationRelaySettings.Language>;
4005
- }
4006
-
4007
- export namespace ConversationRelaySettings {
4008
- /**
4009
- * Language-specific speech and transcription settings for Conversation Relay.
4010
- */
4011
- export interface Language {
4012
- /**
4013
- * BCP 47 language code.
4014
- */
4015
- code?: string;
4016
-
4017
- /**
4018
- * Speech recognition model for this language.
4019
- */
4020
- speech_model?: string;
4021
-
4022
- /**
4023
- * Speech-to-text provider for this language.
4024
- */
4025
- transcription_provider?: string;
4026
-
4027
- /**
4028
- * Text-to-speech provider for this language.
4029
- */
4030
- tts_provider?: string;
4031
-
4032
- /**
4033
- * Voice identifier for this language.
4034
- */
4035
- voice?: string;
4036
- }
4037
- }
4038
-
4039
- /**
4040
- * Settings for handling caller interruptions during Conversation Relay speech.
4041
- */
4042
- export interface InterruptionSettings {
4043
- /**
4044
- * Legacy boolean form. `true` is equivalent to `interruptible=any`; `false` is
4045
- * equivalent to `interruptible=none`.
4046
- */
4047
- enable?: boolean;
4048
-
4049
- /**
4050
- * Controls when caller input can interrupt assistant speech. `any` allows speech
4051
- * or DTMF interruptions; `none` disables interruptions; `speech` allows speech
4052
- * only; `dtmf` allows DTMF only.
4053
- */
4054
- interruptible?: 'none' | 'any' | 'speech' | 'dtmf';
4055
-
4056
- /**
4057
- * Controls when caller input can interrupt assistant speech. `any` allows speech
4058
- * or DTMF interruptions; `none` disables interruptions; `speech` allows speech
4059
- * only; `dtmf` allows DTMF only.
4060
- */
4061
- interruptible_greeting?: 'none' | 'any' | 'speech' | 'dtmf';
4062
-
4063
- /**
4064
- * Controls when caller input can interrupt assistant speech. `any` allows speech
4065
- * or DTMF interruptions; `none` disables interruptions; `speech` allows speech
4066
- * only; `dtmf` allows DTMF only.
4067
- */
4068
- welcome_greeting_interruptible?: 'none' | 'any' | 'speech' | 'dtmf';
4069
- }
4070
-
4071
- /**
4072
- * Language-specific speech and transcription settings for Conversation Relay.
4073
- */
4074
- export interface Language {
4075
- /**
4076
- * BCP 47 language code.
4077
- */
4078
- code?: string;
4079
-
4080
- /**
4081
- * Speech recognition model for this language.
4082
- */
4083
- speech_model?: string;
4084
-
4085
- /**
4086
- * Speech-to-text provider for this language.
4087
- */
4088
- transcription_provider?: string;
4089
-
4090
- /**
4091
- * Text-to-speech provider for this language.
4092
- */
4093
- tts_provider?: string;
4094
-
4095
- /**
4096
- * Voice identifier for this language.
4097
- */
4098
- voice?: string;
4099
- }
4100
-
4101
- /**
4102
- * Speech-to-text settings for Conversation Relay.
4103
- */
4104
- export interface Transcription {
4105
- /**
4106
- * Transcription language.
4107
- */
4108
- language?: string;
4109
-
4110
- /**
4111
- * Transcription model to use.
4112
- */
4113
- model?: string;
4114
-
4115
- /**
4116
- * Transcription provider to use.
4117
- */
4118
- provider?: string;
4205
+ languages?: Array<CallsAPI.ConversationRelayLanguage>;
4119
4206
  }
4120
4207
  }
4121
4208
 
@@ -4825,8 +4912,8 @@ export interface ActionStartTranscriptionParams {
4825
4912
  | TranscriptionEngineAzureConfig
4826
4913
  | TranscriptionEngineXaiConfig
4827
4914
  | TranscriptionEngineAssemblyaiConfig
4828
- | ActionStartTranscriptionParams.TranscriptionEngineSpeechmaticsConfig
4829
- | ActionStartTranscriptionParams.TranscriptionEngineSonioxConfig
4915
+ | TranscriptionEngineSpeechmaticsConfig
4916
+ | TranscriptionEngineSonioxConfig
4830
4917
  | TranscriptionEngineAConfig
4831
4918
  | TranscriptionEngineBConfig
4832
4919
  | DeepgramNova2Config
@@ -4840,84 +4927,6 @@ export interface ActionStartTranscriptionParams {
4840
4927
  transcription_tracks?: string;
4841
4928
  }
4842
4929
 
4843
- export namespace ActionStartTranscriptionParams {
4844
- export interface TranscriptionEngineSpeechmaticsConfig {
4845
- /**
4846
- * Whether to send also interim results. If set to false, only final results will
4847
- * be sent.
4848
- */
4849
- interim_results?: boolean;
4850
-
4851
- /**
4852
- * Language to use for speech recognition
4853
- */
4854
- language?:
4855
- | 'en'
4856
- | 'ba'
4857
- | 'eu'
4858
- | 'gl'
4859
- | 'ga'
4860
- | 'mt'
4861
- | 'mn'
4862
- | 'sw'
4863
- | 'ug'
4864
- | 'cy'
4865
- | 'ar_en'
4866
- | 'cmn_en'
4867
- | 'en_ms'
4868
- | 'en_ta'
4869
- | 'tl'
4870
- | 'es-bilingual-en'
4871
- | 'cmn_en_ms_ta';
4872
-
4873
- /**
4874
- * Engine identifier for Speechmatics transcription service
4875
- */
4876
- transcription_engine?: 'Speechmatics';
4877
-
4878
- /**
4879
- * The model to use for transcription.
4880
- */
4881
- transcription_model?: 'speechmatics/standard';
4882
- }
4883
-
4884
- export interface TranscriptionEngineSonioxConfig {
4885
- /**
4886
- * Engine identifier for Soniox transcription service
4887
- */
4888
- transcription_engine: 'Soniox';
4889
-
4890
- /**
4891
- * When true, Soniox emits end-of-utterance events at the cadence configured by
4892
- * `max_endpoint_delay_ms`.
4893
- */
4894
- enable_endpoint_detection?: boolean;
4895
-
4896
- /**
4897
- * Whether to send also interim results. If set to false, only final results will
4898
- * be sent.
4899
- */
4900
- interim_results?: boolean;
4901
-
4902
- /**
4903
- * ISO 639-1 language hint (e.g. `en`, `es`), or `auto` to omit the hint and let
4904
- * Soniox auto-detect supported languages multilingually.
4905
- */
4906
- language?: string;
4907
-
4908
- /**
4909
- * Maximum silence (in milliseconds) before Soniox emits an end-of-utterance event.
4910
- * Only honored when `enable_endpoint_detection` is true. Range: 500-3000 ms.
4911
- */
4912
- max_endpoint_delay_ms?: number;
4913
-
4914
- /**
4915
- * The model to use for transcription.
4916
- */
4917
- transcription_model?: 'soniox/stt-rt-v4';
4918
- }
4919
- }
4920
-
4921
4930
  export interface ActionStopAIAssistantParams {
4922
4931
  /**
4923
4932
  * Use this field to add state to every subsequent webhook. It must be a valid
@@ -5472,6 +5481,8 @@ export declare namespace Actions {
5472
5481
  type TranscriptionEngineBConfig as TranscriptionEngineBConfig,
5473
5482
  type TranscriptionEngineDeepgramConfig as TranscriptionEngineDeepgramConfig,
5474
5483
  type TranscriptionEngineGoogleConfig as TranscriptionEngineGoogleConfig,
5484
+ type TranscriptionEngineSonioxConfig as TranscriptionEngineSonioxConfig,
5485
+ type TranscriptionEngineSpeechmaticsConfig as TranscriptionEngineSpeechmaticsConfig,
5475
5486
  type TranscriptionEngineTelnyxConfig as TranscriptionEngineTelnyxConfig,
5476
5487
  type TranscriptionEngineXaiConfig as TranscriptionEngineXaiConfig,
5477
5488
  type TranscriptionStartRequest as TranscriptionStartRequest,