telnyx 6.64.0 → 6.66.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 (65) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/package.json +1 -1
  3. package/resources/ai/assistants/assistants.d.mts +27 -2
  4. package/resources/ai/assistants/assistants.d.mts.map +1 -1
  5. package/resources/ai/assistants/assistants.d.ts +27 -2
  6. package/resources/ai/assistants/assistants.d.ts.map +1 -1
  7. package/resources/ai/assistants/assistants.js.map +1 -1
  8. package/resources/ai/assistants/assistants.mjs.map +1 -1
  9. package/resources/calls/actions.d.mts +421 -7
  10. package/resources/calls/actions.d.mts.map +1 -1
  11. package/resources/calls/actions.d.ts +421 -7
  12. package/resources/calls/actions.d.ts.map +1 -1
  13. package/resources/calls/actions.js +44 -0
  14. package/resources/calls/actions.js.map +1 -1
  15. package/resources/calls/actions.mjs +44 -0
  16. package/resources/calls/actions.mjs.map +1 -1
  17. package/resources/calls/calls.d.mts +2 -2
  18. package/resources/calls/calls.d.mts.map +1 -1
  19. package/resources/calls/calls.d.ts +2 -2
  20. package/resources/calls/calls.d.ts.map +1 -1
  21. package/resources/calls/calls.js.map +1 -1
  22. package/resources/calls/calls.mjs.map +1 -1
  23. package/resources/calls/index.d.mts +1 -1
  24. package/resources/calls/index.d.mts.map +1 -1
  25. package/resources/calls/index.d.ts +1 -1
  26. package/resources/calls/index.d.ts.map +1 -1
  27. package/resources/calls/index.js.map +1 -1
  28. package/resources/calls/index.mjs.map +1 -1
  29. package/resources/faxes/faxes.d.mts +24 -8
  30. package/resources/faxes/faxes.d.mts.map +1 -1
  31. package/resources/faxes/faxes.d.ts +24 -8
  32. package/resources/faxes/faxes.d.ts.map +1 -1
  33. package/resources/faxes/faxes.js +12 -0
  34. package/resources/faxes/faxes.js.map +1 -1
  35. package/resources/faxes/faxes.mjs +12 -0
  36. package/resources/faxes/faxes.mjs.map +1 -1
  37. package/resources/texml/accounts/calls/calls.d.mts +27 -6
  38. package/resources/texml/accounts/calls/calls.d.mts.map +1 -1
  39. package/resources/texml/accounts/calls/calls.d.ts +27 -6
  40. package/resources/texml/accounts/calls/calls.d.ts.map +1 -1
  41. package/resources/texml/accounts/calls/calls.js.map +1 -1
  42. package/resources/texml/accounts/calls/calls.mjs.map +1 -1
  43. package/resources/texml/texml.d.mts +9 -2
  44. package/resources/texml/texml.d.mts.map +1 -1
  45. package/resources/texml/texml.d.ts +9 -2
  46. package/resources/texml/texml.d.ts.map +1 -1
  47. package/resources/texml/texml.js.map +1 -1
  48. package/resources/texml/texml.mjs.map +1 -1
  49. package/resources/webhooks.d.mts +20 -10
  50. package/resources/webhooks.d.mts.map +1 -1
  51. package/resources/webhooks.d.ts +20 -10
  52. package/resources/webhooks.d.ts.map +1 -1
  53. package/src/resources/ai/assistants/assistants.ts +31 -1
  54. package/src/resources/calls/actions.ts +570 -3
  55. package/src/resources/calls/calls.ts +8 -0
  56. package/src/resources/calls/index.ts +4 -0
  57. package/src/resources/faxes/faxes.ts +24 -8
  58. package/src/resources/texml/accounts/calls/calls.ts +30 -6
  59. package/src/resources/texml/texml.ts +10 -2
  60. package/src/resources/webhooks.ts +21 -10
  61. package/src/version.ts +1 -1
  62. package/version.d.mts +1 -1
  63. package/version.d.ts +1 -1
  64. package/version.js +1 -1
  65. package/version.mjs +1 -1
@@ -356,6 +356,28 @@ export declare class Actions extends APIResource {
356
356
  * ```
357
357
  */
358
358
  startAIAssistant(callControlID: string, body: ActionStartAIAssistantParams, options?: RequestOptions): APIPromise<ActionStartAIAssistantResponse>;
359
+ /**
360
+ * Start a Conversation Relay session on an active call. Conversation Relay
361
+ * connects the call audio to your WebSocket so your application can exchange
362
+ * realtime messages with the caller while Telnyx handles speech recognition and
363
+ * text-to-speech. Only one AI Assistant or Conversation Relay session can be
364
+ * active on a call at a time.
365
+ *
366
+ * **Expected Webhooks:**
367
+ *
368
+ * - `call.conversation.ended` - Sent when the Conversation Relay session ends. If
369
+ * the customer WebSocket disconnects, the webhook payload `reason` is
370
+ * `customer_disconnect`.
371
+ *
372
+ * @example
373
+ * ```ts
374
+ * const response =
375
+ * await client.calls.actions.startConversationRelay(
376
+ * 'call_control_id',
377
+ * );
378
+ * ```
379
+ */
380
+ startConversationRelay(callControlID: string, body: ActionStartConversationRelayParams, options?: RequestOptions): APIPromise<ActionStartConversationRelayResponse>;
359
381
  /**
360
382
  * Call forking allows you to stream the media from a call to a specific target in
361
383
  * realtime. This stream can be used to enable realtime audio analysis to support a
@@ -491,6 +513,18 @@ export declare class Actions extends APIResource {
491
513
  * ```
492
514
  */
493
515
  stopAIAssistant(callControlID: string, body: ActionStopAIAssistantParams, options?: RequestOptions): APIPromise<ActionStopAIAssistantResponse>;
516
+ /**
517
+ * Stop the active Conversation Relay session on a call.
518
+ *
519
+ * @example
520
+ * ```ts
521
+ * const response =
522
+ * await client.calls.actions.stopConversationRelay(
523
+ * 'call_control_id',
524
+ * );
525
+ * ```
526
+ */
527
+ stopConversationRelay(callControlID: string, body: ActionStopConversationRelayParams, options?: RequestOptions): APIPromise<ActionStopConversationRelayResponse>;
494
528
  /**
495
529
  * Stop forking a call.
496
530
  *
@@ -804,7 +838,9 @@ export interface TranscriptionConfig {
804
838
  * meaningful values depend on the selected transcription `model`. For
805
839
  * `deepgram/flux`, supported values are: `auto` (Telnyx language detection
806
840
  * controls the language hint), `multi` (no language hint), and language-specific
807
- * hints `en`, `es`, `fr`, `de`, `hi`, `ru`, `pt`, `ja`, `it`, and `nl`.
841
+ * hints `en`, `es`, `fr`, `de`, `hi`, `ru`, `pt`, `ja`, `it`, and `nl`. For
842
+ * `soniox/stt-rt-v4`, `auto` omits the language hint and lets Soniox auto-detect;
843
+ * ISO 639-1 codes (e.g. `en`, `es`) bias detection toward that language.
808
844
  */
809
845
  language?: string;
810
846
  /**
@@ -817,6 +853,8 @@ export interface TranscriptionConfig {
817
853
  * transcription.
818
854
  * - `assemblyai/universal-streaming` for live streaming transcription.
819
855
  * - `xai/grok-stt` for live streaming transcription.
856
+ * - `soniox/stt-rt-v4` for live streaming multilingual transcription with
857
+ * automatic language detection.
820
858
  * - `azure/fast` and `azure/realtime`; Azure models require `region`, and
821
859
  * unsupported regions require `api_key_ref`.
822
860
  * - `google/latest_long` for non-streaming multilingual transcription.
@@ -825,7 +863,7 @@ export interface TranscriptionConfig {
825
863
  * - `openai/whisper-large-v3-turbo` for multilingual non-streaming transcription
826
864
  * with automatic language detection.
827
865
  */
828
- model?: 'deepgram/flux' | 'flux' | 'deepgram/nova-3' | 'deepgram/nova-2' | 'speechmatics/standard' | 'speechmatics/enhanced' | 'assemblyai/universal-streaming' | 'xai/grok-stt' | 'azure/fast' | 'azure/realtime' | 'google/latest_long' | 'distil-whisper/distil-large-v2' | 'openai/whisper-large-v3-turbo';
866
+ model?: 'deepgram/flux' | 'flux' | 'deepgram/nova-3' | 'deepgram/nova-2' | 'speechmatics/standard' | 'speechmatics/enhanced' | 'assemblyai/universal-streaming' | 'xai/grok-stt' | 'soniox/stt-rt-v4' | 'azure/fast' | 'azure/realtime' | 'google/latest_long' | 'distil-whisper/distil-large-v2' | 'openai/whisper-large-v3-turbo';
829
867
  }
830
868
  export interface TranscriptionEngineAConfig {
831
869
  /**
@@ -1038,8 +1076,8 @@ export interface TranscriptionStartRequest {
1038
1076
  * Engine to use for speech recognition. Legacy values `A` - `Google`, `B` -
1039
1077
  * `Telnyx` are supported for backward compatibility.
1040
1078
  */
1041
- transcription_engine?: 'Google' | 'Telnyx' | 'Deepgram' | 'Azure' | 'xAI' | 'AssemblyAI' | 'A' | 'B';
1042
- transcription_engine_config?: TranscriptionEngineGoogleConfig | TranscriptionEngineTelnyxConfig | TranscriptionEngineAzureConfig | TranscriptionEngineXaiConfig | TranscriptionEngineAssemblyaiConfig | TranscriptionEngineAConfig | TranscriptionEngineBConfig | DeepgramNova2Config | DeepgramNova3Config;
1079
+ transcription_engine?: 'Google' | 'Telnyx' | 'Deepgram' | 'Azure' | 'xAI' | 'AssemblyAI' | 'Speechmatics' | 'Soniox' | 'A' | 'B';
1080
+ transcription_engine_config?: TranscriptionEngineGoogleConfig | TranscriptionEngineTelnyxConfig | TranscriptionEngineAzureConfig | TranscriptionEngineXaiConfig | TranscriptionEngineAssemblyaiConfig | TranscriptionStartRequest.TranscriptionEngineSpeechmaticsConfig | TranscriptionStartRequest.TranscriptionEngineSonioxConfig | TranscriptionEngineAConfig | TranscriptionEngineBConfig | DeepgramNova2Config | DeepgramNova3Config;
1043
1081
  /**
1044
1082
  * Indicates which leg of the call will be transcribed. Use `inbound` for the leg
1045
1083
  * that requested the transcription, `outbound` for the other leg, and `both` for
@@ -1047,6 +1085,57 @@ export interface TranscriptionStartRequest {
1047
1085
  */
1048
1086
  transcription_tracks?: string;
1049
1087
  }
1088
+ export declare namespace TranscriptionStartRequest {
1089
+ interface TranscriptionEngineSpeechmaticsConfig {
1090
+ /**
1091
+ * Whether to send also interim results. If set to false, only final results will
1092
+ * be sent.
1093
+ */
1094
+ interim_results?: boolean;
1095
+ /**
1096
+ * Language to use for speech recognition
1097
+ */
1098
+ language?: 'en' | 'ba' | 'eu' | 'gl' | 'ga' | 'mt' | 'mn' | 'sw' | 'ug' | 'cy' | 'ar_en' | 'cmn_en' | 'en_ms' | 'en_ta' | 'tl' | 'es-bilingual-en' | 'cmn_en_ms_ta';
1099
+ /**
1100
+ * Engine identifier for Speechmatics transcription service
1101
+ */
1102
+ transcription_engine?: 'Speechmatics';
1103
+ /**
1104
+ * The model to use for transcription.
1105
+ */
1106
+ transcription_model?: 'speechmatics/standard';
1107
+ }
1108
+ interface TranscriptionEngineSonioxConfig {
1109
+ /**
1110
+ * Engine identifier for Soniox transcription service
1111
+ */
1112
+ transcription_engine: 'Soniox';
1113
+ /**
1114
+ * When true, Soniox emits end-of-utterance events at the cadence configured by
1115
+ * `max_endpoint_delay_ms`.
1116
+ */
1117
+ enable_endpoint_detection?: boolean;
1118
+ /**
1119
+ * Whether to send also interim results. If set to false, only final results will
1120
+ * be sent.
1121
+ */
1122
+ interim_results?: boolean;
1123
+ /**
1124
+ * ISO 639-1 language hint (e.g. `en`, `es`), or `auto` to omit the hint and let
1125
+ * Soniox auto-detect supported languages multilingually.
1126
+ */
1127
+ language?: string;
1128
+ /**
1129
+ * Maximum silence (in milliseconds) before Soniox emits an end-of-utterance event.
1130
+ * Only honored when `enable_endpoint_detection` is true. Range: 500-3000 ms.
1131
+ */
1132
+ max_endpoint_delay_ms?: number;
1133
+ /**
1134
+ * The model to use for transcription.
1135
+ */
1136
+ transcription_model?: 'soniox/stt-rt-v4';
1137
+ }
1138
+ }
1050
1139
  export interface ActionAddAIAssistantMessagesResponse {
1051
1140
  data?: CallControlCommandResult;
1052
1141
  }
@@ -1114,6 +1203,18 @@ export interface ActionSpeakResponse {
1114
1203
  export interface ActionStartAIAssistantResponse {
1115
1204
  data?: CallControlCommandResultWithConversationID;
1116
1205
  }
1206
+ export interface ActionStartConversationRelayResponse {
1207
+ data?: ActionStartConversationRelayResponse.Data;
1208
+ }
1209
+ export declare namespace ActionStartConversationRelayResponse {
1210
+ interface Data {
1211
+ /**
1212
+ * The ID of the Conversation Relay session created by the command.
1213
+ */
1214
+ conversation_relay_id?: string;
1215
+ result?: string;
1216
+ }
1217
+ }
1117
1218
  export interface ActionStartForkingResponse {
1118
1219
  data?: CallControlCommandResult;
1119
1220
  }
@@ -1138,6 +1239,9 @@ export interface ActionStartTranscriptionResponse {
1138
1239
  export interface ActionStopAIAssistantResponse {
1139
1240
  data?: CallControlCommandResult;
1140
1241
  }
1242
+ export interface ActionStopConversationRelayResponse {
1243
+ data?: CallControlCommandResult;
1244
+ }
1141
1245
  export interface ActionStopForkingResponse {
1142
1246
  data?: CallControlCommandResult;
1143
1247
  }
@@ -2544,6 +2648,253 @@ export declare namespace ActionStartAIAssistantParams {
2544
2648
  on_hangup?: 'continue_conversation' | 'end_conversation';
2545
2649
  }
2546
2650
  }
2651
+ export interface ActionStartConversationRelayParams {
2652
+ /**
2653
+ * Custom parameters for the Conversation Relay session. Pass key-value data as
2654
+ * `assistant.dynamic_variables` to make it available to the relay session.
2655
+ */
2656
+ assistant?: ActionStartConversationRelayParams.Assistant;
2657
+ /**
2658
+ * Use this field to add state to subsequent webhooks. It must be a valid Base-64
2659
+ * encoded string.
2660
+ */
2661
+ client_state?: string;
2662
+ /**
2663
+ * Use this field to avoid duplicate commands. Telnyx will ignore any command with
2664
+ * the same `command_id` for the same `call_control_id`.
2665
+ */
2666
+ command_id?: string;
2667
+ /**
2668
+ * Enable DTMF detection for the relay session.
2669
+ */
2670
+ conversation_relay_dtmf_detection?: boolean;
2671
+ /**
2672
+ * Conversation Relay connection settings. This object is used by TeXML Call
2673
+ * Scripting's `<ConversationRelay>` verb. The `interruptible` and
2674
+ * `interruptible_greeting` fields are shorthand for
2675
+ * `interruption_settings.interruptible` and
2676
+ * `interruption_settings.interruptible_greeting`; use top-level
2677
+ * `interruption_settings` for the full interruption settings shape.
2678
+ */
2679
+ conversation_relay_settings?: ActionStartConversationRelayParams.ConversationRelaySettings;
2680
+ /**
2681
+ * WebSocket URL for your Conversation Relay server. Must start with `ws://` or
2682
+ * `wss://`.
2683
+ */
2684
+ conversation_relay_url?: string;
2685
+ /**
2686
+ * Text played when the relay session starts.
2687
+ */
2688
+ greeting?: string;
2689
+ /**
2690
+ * Settings for handling caller interruptions during Conversation Relay speech.
2691
+ */
2692
+ interruption_settings?: ActionStartConversationRelayParams.InterruptionSettings;
2693
+ /**
2694
+ * Default language for the relay session. This value is used for both
2695
+ * text-to-speech and speech recognition unless `tts_language` or
2696
+ * `transcription_language` are provided.
2697
+ */
2698
+ language?: string;
2699
+ /**
2700
+ * Language-specific TTS and transcription settings. Use this when the relay
2701
+ * session needs per-language provider, voice, or speech model configuration.
2702
+ */
2703
+ languages?: Array<ActionStartConversationRelayParams.Language>;
2704
+ /**
2705
+ * Speech-to-text settings for Conversation Relay.
2706
+ */
2707
+ transcription?: ActionStartConversationRelayParams.Transcription;
2708
+ /**
2709
+ * Language to use for speech recognition. Overrides `language` for transcription
2710
+ * when provided.
2711
+ */
2712
+ transcription_language?: string;
2713
+ /**
2714
+ * Language to use for text-to-speech. Overrides `language` for TTS when provided.
2715
+ */
2716
+ tts_language?: string;
2717
+ /**
2718
+ * The voice to be used by the voice assistant. Currently we support ElevenLabs,
2719
+ * Telnyx and AWS voices.
2720
+ *
2721
+ * **Supported Providers:**
2722
+ *
2723
+ * - **AWS:** Use `AWS.Polly.<VoiceId>` (e.g., `AWS.Polly.Joanna`). For neural
2724
+ * voices, which provide more realistic, human-like speech, append `-Neural` to
2725
+ * the `VoiceId` (e.g., `AWS.Polly.Joanna-Neural`). Check the
2726
+ * [available voices](https://docs.aws.amazon.com/polly/latest/dg/available-voices.html)
2727
+ * for compatibility.
2728
+ * - **Azure:** Use `Azure.<VoiceId>. (e.g. Azure.en-CA-ClaraNeural,
2729
+ * Azure.en-CA-LiamNeural, Azure.en-US-BrianMultilingualNeural,
2730
+ * Azure.en-US-Ava:DragonHDLatestNeural. For a complete list of voices, go to
2731
+ * [Azure Voice Gallery](https://speech.microsoft.com/portal/voicegallery).)
2732
+ * - **ElevenLabs:** Use `ElevenLabs.<ModelId>.<VoiceId>` (e.g.,
2733
+ * `ElevenLabs.BaseModel.John`). The `ModelId` part is optional. To use
2734
+ * ElevenLabs, you must provide your ElevenLabs API key as an integration secret
2735
+ * under `"voice_settings": {"api_key_ref": "<secret_id>"}`. See
2736
+ * [integration secrets documentation](https://developers.telnyx.com/api/secrets-manager/integration-secrets/create-integration-secret)
2737
+ * for details. Check
2738
+ * [available voices](https://elevenlabs.io/docs/api-reference/get-voices).
2739
+ * - **Telnyx:** Use `Telnyx.<model_id>.<voice_id>`
2740
+ * - **Inworld:** Use `Inworld.<ModelId>.<VoiceId>` (e.g., `Inworld.Mini.Loretta`,
2741
+ * `Inworld.Max.Oliver`). Supported models: `Mini`, `Max`.
2742
+ * - **xAI:** Use `xAI.<VoiceId>` (e.g., `xAI.eve`). Available voices: `eve`,
2743
+ * `ara`, `rex`, `sal`, `leo`.
2744
+ */
2745
+ voice?: string;
2746
+ /**
2747
+ * The settings associated with the voice selected
2748
+ */
2749
+ voice_settings?: ElevenLabsVoiceSettings | TelnyxVoiceSettings | AwsVoiceSettings | Shared.AzureVoiceSettings | Shared.RimeVoiceSettings | Shared.ResembleVoiceSettings | Shared.XaiVoiceSettings;
2750
+ }
2751
+ export declare namespace ActionStartConversationRelayParams {
2752
+ /**
2753
+ * Custom parameters for the Conversation Relay session. Pass key-value data as
2754
+ * `assistant.dynamic_variables` to make it available to the relay session.
2755
+ */
2756
+ interface Assistant {
2757
+ /**
2758
+ * Custom key-value parameters forwarded to the Conversation Relay session.
2759
+ */
2760
+ dynamic_variables?: {
2761
+ [key: string]: string;
2762
+ };
2763
+ [k: string]: unknown;
2764
+ }
2765
+ /**
2766
+ * Conversation Relay connection settings. This object is used by TeXML Call
2767
+ * Scripting's `<ConversationRelay>` verb. The `interruptible` and
2768
+ * `interruptible_greeting` fields are shorthand for
2769
+ * `interruption_settings.interruptible` and
2770
+ * `interruption_settings.interruptible_greeting`; use top-level
2771
+ * `interruption_settings` for the full interruption settings shape.
2772
+ */
2773
+ interface ConversationRelaySettings {
2774
+ /**
2775
+ * WebSocket URL for your Conversation Relay server. Must start with `ws://` or
2776
+ * `wss://`.
2777
+ */
2778
+ url: string;
2779
+ /**
2780
+ * Whether to enable DTMF detection during the relay session.
2781
+ */
2782
+ dtmf_detection?: boolean;
2783
+ /**
2784
+ * Controls when caller input can interrupt assistant speech. `any` allows speech
2785
+ * or DTMF interruptions; `none` disables interruptions; `speech` allows speech
2786
+ * only; `dtmf` allows DTMF only.
2787
+ */
2788
+ interruptible?: 'none' | 'any' | 'speech' | 'dtmf';
2789
+ /**
2790
+ * Controls when caller input can interrupt assistant speech. `any` allows speech
2791
+ * or DTMF interruptions; `none` disables interruptions; `speech` allows speech
2792
+ * only; `dtmf` allows DTMF only.
2793
+ */
2794
+ interruptible_greeting?: 'none' | 'any' | 'speech' | 'dtmf';
2795
+ /**
2796
+ * Language-specific TTS and transcription settings.
2797
+ */
2798
+ languages?: Array<ConversationRelaySettings.Language>;
2799
+ }
2800
+ namespace ConversationRelaySettings {
2801
+ /**
2802
+ * Language-specific speech and transcription settings for Conversation Relay.
2803
+ */
2804
+ interface Language {
2805
+ /**
2806
+ * BCP 47 language code.
2807
+ */
2808
+ code?: string;
2809
+ /**
2810
+ * Speech recognition model for this language.
2811
+ */
2812
+ speech_model?: string;
2813
+ /**
2814
+ * Speech-to-text provider for this language.
2815
+ */
2816
+ transcription_provider?: string;
2817
+ /**
2818
+ * Text-to-speech provider for this language.
2819
+ */
2820
+ tts_provider?: string;
2821
+ /**
2822
+ * Voice identifier for this language.
2823
+ */
2824
+ voice?: string;
2825
+ }
2826
+ }
2827
+ /**
2828
+ * Settings for handling caller interruptions during Conversation Relay speech.
2829
+ */
2830
+ interface InterruptionSettings {
2831
+ /**
2832
+ * Legacy boolean form. `true` is equivalent to `interruptible=any`; `false` is
2833
+ * equivalent to `interruptible=none`.
2834
+ */
2835
+ enable?: boolean;
2836
+ /**
2837
+ * Controls when caller input can interrupt assistant speech. `any` allows speech
2838
+ * or DTMF interruptions; `none` disables interruptions; `speech` allows speech
2839
+ * only; `dtmf` allows DTMF only.
2840
+ */
2841
+ interruptible?: 'none' | 'any' | 'speech' | 'dtmf';
2842
+ /**
2843
+ * Controls when caller input can interrupt assistant speech. `any` allows speech
2844
+ * or DTMF interruptions; `none` disables interruptions; `speech` allows speech
2845
+ * only; `dtmf` allows DTMF only.
2846
+ */
2847
+ interruptible_greeting?: 'none' | 'any' | 'speech' | 'dtmf';
2848
+ /**
2849
+ * Controls when caller input can interrupt assistant speech. `any` allows speech
2850
+ * or DTMF interruptions; `none` disables interruptions; `speech` allows speech
2851
+ * only; `dtmf` allows DTMF only.
2852
+ */
2853
+ welcome_greeting_interruptible?: 'none' | 'any' | 'speech' | 'dtmf';
2854
+ }
2855
+ /**
2856
+ * Language-specific speech and transcription settings for Conversation Relay.
2857
+ */
2858
+ interface Language {
2859
+ /**
2860
+ * BCP 47 language code.
2861
+ */
2862
+ code?: string;
2863
+ /**
2864
+ * Speech recognition model for this language.
2865
+ */
2866
+ speech_model?: string;
2867
+ /**
2868
+ * Speech-to-text provider for this language.
2869
+ */
2870
+ transcription_provider?: string;
2871
+ /**
2872
+ * Text-to-speech provider for this language.
2873
+ */
2874
+ tts_provider?: string;
2875
+ /**
2876
+ * Voice identifier for this language.
2877
+ */
2878
+ voice?: string;
2879
+ }
2880
+ /**
2881
+ * Speech-to-text settings for Conversation Relay.
2882
+ */
2883
+ interface Transcription {
2884
+ /**
2885
+ * Transcription language.
2886
+ */
2887
+ language?: string;
2888
+ /**
2889
+ * Transcription model to use.
2890
+ */
2891
+ model?: string;
2892
+ /**
2893
+ * Transcription provider to use.
2894
+ */
2895
+ provider?: string;
2896
+ }
2897
+ }
2547
2898
  export interface ActionStartForkingParams {
2548
2899
  /**
2549
2900
  * Use this field to add state to every subsequent webhook. It must be a valid
@@ -2913,8 +3264,8 @@ export interface ActionStartTranscriptionParams {
2913
3264
  * Engine to use for speech recognition. Legacy values `A` - `Google`, `B` -
2914
3265
  * `Telnyx` are supported for backward compatibility.
2915
3266
  */
2916
- transcription_engine?: 'Google' | 'Telnyx' | 'Deepgram' | 'Azure' | 'xAI' | 'AssemblyAI' | 'A' | 'B';
2917
- transcription_engine_config?: TranscriptionEngineGoogleConfig | TranscriptionEngineTelnyxConfig | TranscriptionEngineAzureConfig | TranscriptionEngineXaiConfig | TranscriptionEngineAssemblyaiConfig | TranscriptionEngineAConfig | TranscriptionEngineBConfig | DeepgramNova2Config | DeepgramNova3Config;
3267
+ transcription_engine?: 'Google' | 'Telnyx' | 'Deepgram' | 'Azure' | 'xAI' | 'AssemblyAI' | 'Speechmatics' | 'Soniox' | 'A' | 'B';
3268
+ transcription_engine_config?: TranscriptionEngineGoogleConfig | TranscriptionEngineTelnyxConfig | TranscriptionEngineAzureConfig | TranscriptionEngineXaiConfig | TranscriptionEngineAssemblyaiConfig | ActionStartTranscriptionParams.TranscriptionEngineSpeechmaticsConfig | ActionStartTranscriptionParams.TranscriptionEngineSonioxConfig | TranscriptionEngineAConfig | TranscriptionEngineBConfig | DeepgramNova2Config | DeepgramNova3Config;
2918
3269
  /**
2919
3270
  * Indicates which leg of the call will be transcribed. Use `inbound` for the leg
2920
3271
  * that requested the transcription, `outbound` for the other leg, and `both` for
@@ -2922,6 +3273,57 @@ export interface ActionStartTranscriptionParams {
2922
3273
  */
2923
3274
  transcription_tracks?: string;
2924
3275
  }
3276
+ export declare namespace ActionStartTranscriptionParams {
3277
+ interface TranscriptionEngineSpeechmaticsConfig {
3278
+ /**
3279
+ * Whether to send also interim results. If set to false, only final results will
3280
+ * be sent.
3281
+ */
3282
+ interim_results?: boolean;
3283
+ /**
3284
+ * Language to use for speech recognition
3285
+ */
3286
+ language?: 'en' | 'ba' | 'eu' | 'gl' | 'ga' | 'mt' | 'mn' | 'sw' | 'ug' | 'cy' | 'ar_en' | 'cmn_en' | 'en_ms' | 'en_ta' | 'tl' | 'es-bilingual-en' | 'cmn_en_ms_ta';
3287
+ /**
3288
+ * Engine identifier for Speechmatics transcription service
3289
+ */
3290
+ transcription_engine?: 'Speechmatics';
3291
+ /**
3292
+ * The model to use for transcription.
3293
+ */
3294
+ transcription_model?: 'speechmatics/standard';
3295
+ }
3296
+ interface TranscriptionEngineSonioxConfig {
3297
+ /**
3298
+ * Engine identifier for Soniox transcription service
3299
+ */
3300
+ transcription_engine: 'Soniox';
3301
+ /**
3302
+ * When true, Soniox emits end-of-utterance events at the cadence configured by
3303
+ * `max_endpoint_delay_ms`.
3304
+ */
3305
+ enable_endpoint_detection?: boolean;
3306
+ /**
3307
+ * Whether to send also interim results. If set to false, only final results will
3308
+ * be sent.
3309
+ */
3310
+ interim_results?: boolean;
3311
+ /**
3312
+ * ISO 639-1 language hint (e.g. `en`, `es`), or `auto` to omit the hint and let
3313
+ * Soniox auto-detect supported languages multilingually.
3314
+ */
3315
+ language?: string;
3316
+ /**
3317
+ * Maximum silence (in milliseconds) before Soniox emits an end-of-utterance event.
3318
+ * Only honored when `enable_endpoint_detection` is true. Range: 500-3000 ms.
3319
+ */
3320
+ max_endpoint_delay_ms?: number;
3321
+ /**
3322
+ * The model to use for transcription.
3323
+ */
3324
+ transcription_model?: 'soniox/stt-rt-v4';
3325
+ }
3326
+ }
2925
3327
  export interface ActionStopAIAssistantParams {
2926
3328
  /**
2927
3329
  * Use this field to add state to every subsequent webhook. It must be a valid
@@ -2934,6 +3336,18 @@ export interface ActionStopAIAssistantParams {
2934
3336
  */
2935
3337
  command_id?: string;
2936
3338
  }
3339
+ export interface ActionStopConversationRelayParams {
3340
+ /**
3341
+ * Use this field to add state to subsequent webhooks. It must be a valid Base-64
3342
+ * encoded string.
3343
+ */
3344
+ client_state?: string;
3345
+ /**
3346
+ * Use this field to avoid duplicate commands. Telnyx will ignore any command with
3347
+ * the same `command_id` for the same `call_control_id`.
3348
+ */
3349
+ command_id?: string;
3350
+ }
2937
3351
  export interface ActionStopForkingParams {
2938
3352
  /**
2939
3353
  * Use this field to add state to every subsequent webhook. It must be a valid
@@ -3351,6 +3765,6 @@ export interface ActionUpdateClientStateParams {
3351
3765
  client_state: string;
3352
3766
  }
3353
3767
  export declare namespace Actions {
3354
- export { type AwsVoiceSettings as AwsVoiceSettings, type CallControlCommandResult as CallControlCommandResult, type CallControlCommandResultWithConversationID as CallControlCommandResultWithConversationID, type DeepgramNova2Config as DeepgramNova2Config, type DeepgramNova3Config as DeepgramNova3Config, type ElevenLabsVoiceSettings as ElevenLabsVoiceSettings, type GoogleTranscriptionLanguage as GoogleTranscriptionLanguage, type InterruptionSettings as InterruptionSettings, type Loopcount as Loopcount, type StopRecordingRequest as StopRecordingRequest, type TelnyxTranscriptionLanguage as TelnyxTranscriptionLanguage, type TelnyxVoiceSettings as TelnyxVoiceSettings, type TranscriptionConfig as TranscriptionConfig, type TranscriptionEngineAConfig as TranscriptionEngineAConfig, type TranscriptionEngineAssemblyaiConfig as TranscriptionEngineAssemblyaiConfig, type TranscriptionEngineAzureConfig as TranscriptionEngineAzureConfig, type TranscriptionEngineBConfig as TranscriptionEngineBConfig, type TranscriptionEngineDeepgramConfig as TranscriptionEngineDeepgramConfig, type TranscriptionEngineGoogleConfig as TranscriptionEngineGoogleConfig, type TranscriptionEngineTelnyxConfig as TranscriptionEngineTelnyxConfig, type TranscriptionEngineXaiConfig as TranscriptionEngineXaiConfig, type TranscriptionStartRequest as TranscriptionStartRequest, type ActionAddAIAssistantMessagesResponse as ActionAddAIAssistantMessagesResponse, type ActionAnswerResponse as ActionAnswerResponse, type ActionBridgeResponse as ActionBridgeResponse, type ActionEnqueueResponse as ActionEnqueueResponse, type ActionGatherResponse as ActionGatherResponse, type ActionGatherUsingAIResponse as ActionGatherUsingAIResponse, type ActionGatherUsingAudioResponse as ActionGatherUsingAudioResponse, type ActionGatherUsingSpeakResponse as ActionGatherUsingSpeakResponse, type ActionHangupResponse as ActionHangupResponse, type ActionJoinAIAssistantResponse as ActionJoinAIAssistantResponse, type ActionLeaveQueueResponse as ActionLeaveQueueResponse, type ActionPauseRecordingResponse as ActionPauseRecordingResponse, type ActionReferResponse as ActionReferResponse, type ActionRejectResponse as ActionRejectResponse, type ActionResumeRecordingResponse as ActionResumeRecordingResponse, type ActionSendDtmfResponse as ActionSendDtmfResponse, type ActionSendSipInfoResponse as ActionSendSipInfoResponse, type ActionSpeakResponse as ActionSpeakResponse, type ActionStartAIAssistantResponse as ActionStartAIAssistantResponse, type ActionStartForkingResponse as ActionStartForkingResponse, type ActionStartNoiseSuppressionResponse as ActionStartNoiseSuppressionResponse, type ActionStartPlaybackResponse as ActionStartPlaybackResponse, type ActionStartRecordingResponse as ActionStartRecordingResponse, type ActionStartSiprecResponse as ActionStartSiprecResponse, type ActionStartStreamingResponse as ActionStartStreamingResponse, type ActionStartTranscriptionResponse as ActionStartTranscriptionResponse, type ActionStopAIAssistantResponse as ActionStopAIAssistantResponse, type ActionStopForkingResponse as ActionStopForkingResponse, type ActionStopGatherResponse as ActionStopGatherResponse, type ActionStopNoiseSuppressionResponse as ActionStopNoiseSuppressionResponse, type ActionStopPlaybackResponse as ActionStopPlaybackResponse, type ActionStopRecordingResponse as ActionStopRecordingResponse, type ActionStopSiprecResponse as ActionStopSiprecResponse, type ActionStopStreamingResponse as ActionStopStreamingResponse, type ActionStopTranscriptionResponse as ActionStopTranscriptionResponse, type ActionSwitchSupervisorRoleResponse as ActionSwitchSupervisorRoleResponse, type ActionTransferResponse as ActionTransferResponse, type ActionUpdateClientStateResponse as ActionUpdateClientStateResponse, type ActionAddAIAssistantMessagesParams as ActionAddAIAssistantMessagesParams, type ActionAnswerParams as ActionAnswerParams, type ActionBridgeParams as ActionBridgeParams, type ActionEnqueueParams as ActionEnqueueParams, type ActionGatherParams as ActionGatherParams, type ActionGatherUsingAIParams as ActionGatherUsingAIParams, type ActionGatherUsingAudioParams as ActionGatherUsingAudioParams, type ActionGatherUsingSpeakParams as ActionGatherUsingSpeakParams, type ActionHangupParams as ActionHangupParams, type ActionJoinAIAssistantParams as ActionJoinAIAssistantParams, type ActionLeaveQueueParams as ActionLeaveQueueParams, type ActionPauseRecordingParams as ActionPauseRecordingParams, type ActionReferParams as ActionReferParams, type ActionRejectParams as ActionRejectParams, type ActionResumeRecordingParams as ActionResumeRecordingParams, type ActionSendDtmfParams as ActionSendDtmfParams, type ActionSendSipInfoParams as ActionSendSipInfoParams, type ActionSpeakParams as ActionSpeakParams, type ActionStartAIAssistantParams as ActionStartAIAssistantParams, type ActionStartForkingParams as ActionStartForkingParams, type ActionStartNoiseSuppressionParams as ActionStartNoiseSuppressionParams, type ActionStartPlaybackParams as ActionStartPlaybackParams, type ActionStartRecordingParams as ActionStartRecordingParams, type ActionStartSiprecParams as ActionStartSiprecParams, type ActionStartStreamingParams as ActionStartStreamingParams, type ActionStartTranscriptionParams as ActionStartTranscriptionParams, type ActionStopAIAssistantParams as ActionStopAIAssistantParams, type ActionStopForkingParams as ActionStopForkingParams, type ActionStopGatherParams as ActionStopGatherParams, type ActionStopNoiseSuppressionParams as ActionStopNoiseSuppressionParams, type ActionStopPlaybackParams as ActionStopPlaybackParams, type ActionStopRecordingParams as ActionStopRecordingParams, type ActionStopSiprecParams as ActionStopSiprecParams, type ActionStopStreamingParams as ActionStopStreamingParams, type ActionStopTranscriptionParams as ActionStopTranscriptionParams, type ActionSwitchSupervisorRoleParams as ActionSwitchSupervisorRoleParams, type ActionTransferParams as ActionTransferParams, type ActionUpdateClientStateParams as ActionUpdateClientStateParams, };
3768
+ export { type AwsVoiceSettings as AwsVoiceSettings, type CallControlCommandResult as CallControlCommandResult, type CallControlCommandResultWithConversationID as CallControlCommandResultWithConversationID, type DeepgramNova2Config as DeepgramNova2Config, type DeepgramNova3Config as DeepgramNova3Config, type ElevenLabsVoiceSettings as ElevenLabsVoiceSettings, type GoogleTranscriptionLanguage as GoogleTranscriptionLanguage, type InterruptionSettings as InterruptionSettings, type Loopcount as Loopcount, type StopRecordingRequest as StopRecordingRequest, type TelnyxTranscriptionLanguage as TelnyxTranscriptionLanguage, type TelnyxVoiceSettings as TelnyxVoiceSettings, type TranscriptionConfig as TranscriptionConfig, type TranscriptionEngineAConfig as TranscriptionEngineAConfig, type TranscriptionEngineAssemblyaiConfig as TranscriptionEngineAssemblyaiConfig, type TranscriptionEngineAzureConfig as TranscriptionEngineAzureConfig, type TranscriptionEngineBConfig as TranscriptionEngineBConfig, type TranscriptionEngineDeepgramConfig as TranscriptionEngineDeepgramConfig, type TranscriptionEngineGoogleConfig as TranscriptionEngineGoogleConfig, type TranscriptionEngineTelnyxConfig as TranscriptionEngineTelnyxConfig, type TranscriptionEngineXaiConfig as TranscriptionEngineXaiConfig, type TranscriptionStartRequest as TranscriptionStartRequest, type ActionAddAIAssistantMessagesResponse as ActionAddAIAssistantMessagesResponse, type ActionAnswerResponse as ActionAnswerResponse, type ActionBridgeResponse as ActionBridgeResponse, type ActionEnqueueResponse as ActionEnqueueResponse, type ActionGatherResponse as ActionGatherResponse, type ActionGatherUsingAIResponse as ActionGatherUsingAIResponse, type ActionGatherUsingAudioResponse as ActionGatherUsingAudioResponse, type ActionGatherUsingSpeakResponse as ActionGatherUsingSpeakResponse, type ActionHangupResponse as ActionHangupResponse, type ActionJoinAIAssistantResponse as ActionJoinAIAssistantResponse, type ActionLeaveQueueResponse as ActionLeaveQueueResponse, type ActionPauseRecordingResponse as ActionPauseRecordingResponse, type ActionReferResponse as ActionReferResponse, type ActionRejectResponse as ActionRejectResponse, type ActionResumeRecordingResponse as ActionResumeRecordingResponse, type ActionSendDtmfResponse as ActionSendDtmfResponse, type ActionSendSipInfoResponse as ActionSendSipInfoResponse, type ActionSpeakResponse as ActionSpeakResponse, type ActionStartAIAssistantResponse as ActionStartAIAssistantResponse, type ActionStartConversationRelayResponse as ActionStartConversationRelayResponse, type ActionStartForkingResponse as ActionStartForkingResponse, type ActionStartNoiseSuppressionResponse as ActionStartNoiseSuppressionResponse, type ActionStartPlaybackResponse as ActionStartPlaybackResponse, type ActionStartRecordingResponse as ActionStartRecordingResponse, type ActionStartSiprecResponse as ActionStartSiprecResponse, type ActionStartStreamingResponse as ActionStartStreamingResponse, type ActionStartTranscriptionResponse as ActionStartTranscriptionResponse, type ActionStopAIAssistantResponse as ActionStopAIAssistantResponse, type ActionStopConversationRelayResponse as ActionStopConversationRelayResponse, type ActionStopForkingResponse as ActionStopForkingResponse, type ActionStopGatherResponse as ActionStopGatherResponse, type ActionStopNoiseSuppressionResponse as ActionStopNoiseSuppressionResponse, type ActionStopPlaybackResponse as ActionStopPlaybackResponse, type ActionStopRecordingResponse as ActionStopRecordingResponse, type ActionStopSiprecResponse as ActionStopSiprecResponse, type ActionStopStreamingResponse as ActionStopStreamingResponse, type ActionStopTranscriptionResponse as ActionStopTranscriptionResponse, type ActionSwitchSupervisorRoleResponse as ActionSwitchSupervisorRoleResponse, type ActionTransferResponse as ActionTransferResponse, type ActionUpdateClientStateResponse as ActionUpdateClientStateResponse, type ActionAddAIAssistantMessagesParams as ActionAddAIAssistantMessagesParams, type ActionAnswerParams as ActionAnswerParams, type ActionBridgeParams as ActionBridgeParams, type ActionEnqueueParams as ActionEnqueueParams, type ActionGatherParams as ActionGatherParams, type ActionGatherUsingAIParams as ActionGatherUsingAIParams, type ActionGatherUsingAudioParams as ActionGatherUsingAudioParams, type ActionGatherUsingSpeakParams as ActionGatherUsingSpeakParams, type ActionHangupParams as ActionHangupParams, type ActionJoinAIAssistantParams as ActionJoinAIAssistantParams, type ActionLeaveQueueParams as ActionLeaveQueueParams, type ActionPauseRecordingParams as ActionPauseRecordingParams, type ActionReferParams as ActionReferParams, type ActionRejectParams as ActionRejectParams, type ActionResumeRecordingParams as ActionResumeRecordingParams, type ActionSendDtmfParams as ActionSendDtmfParams, type ActionSendSipInfoParams as ActionSendSipInfoParams, type ActionSpeakParams as ActionSpeakParams, type ActionStartAIAssistantParams as ActionStartAIAssistantParams, type ActionStartConversationRelayParams as ActionStartConversationRelayParams, type ActionStartForkingParams as ActionStartForkingParams, type ActionStartNoiseSuppressionParams as ActionStartNoiseSuppressionParams, type ActionStartPlaybackParams as ActionStartPlaybackParams, type ActionStartRecordingParams as ActionStartRecordingParams, type ActionStartSiprecParams as ActionStartSiprecParams, type ActionStartStreamingParams as ActionStartStreamingParams, type ActionStartTranscriptionParams as ActionStartTranscriptionParams, type ActionStopAIAssistantParams as ActionStopAIAssistantParams, type ActionStopConversationRelayParams as ActionStopConversationRelayParams, type ActionStopForkingParams as ActionStopForkingParams, type ActionStopGatherParams as ActionStopGatherParams, type ActionStopNoiseSuppressionParams as ActionStopNoiseSuppressionParams, type ActionStopPlaybackParams as ActionStopPlaybackParams, type ActionStopRecordingParams as ActionStopRecordingParams, type ActionStopSiprecParams as ActionStopSiprecParams, type ActionStopStreamingParams as ActionStopStreamingParams, type ActionStopTranscriptionParams as ActionStopTranscriptionParams, type ActionSwitchSupervisorRoleParams as ActionSwitchSupervisorRoleParams, type ActionTransferParams as ActionTransferParams, type ActionUpdateClientStateParams as ActionUpdateClientStateParams, };
3355
3769
  }
3356
3770
  //# sourceMappingURL=actions.d.ts.map