telnyx 5.120.0 → 5.121.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7a656a53fa4d6d7859952723e3f213ba6ba97617e54f963077e93c1aae0c30bb
4
- data.tar.gz: de70b45c695607e3081f869b92eb07a78e4ebefd8c51d54ac2fe9e8022342542
3
+ metadata.gz: d2c6aecc01814246ef9af70e1255e44ed476bd4754cd2ae9ce665e7e2ea811b0
4
+ data.tar.gz: 7c0a9a0c7c4feac1ac2240d645b1743ac3bf5f528ce8a2d521680a88c033edb4
5
5
  SHA512:
6
- metadata.gz: 53bd897ac7b5648db78ef3cdcec615d3e84604fd39abd0cf76814f6ca533ac3039eb1cb3af6070e78d114b4ae285675f7961daf7edf6e69adf81609cadaf5176
7
- data.tar.gz: e49688c8d1737b05c6782ab0082eb89e0aa2da83a4615e532e19db298a9c8361001b71179b431c5894f007f2135ac5c9dba4debaaeb1564678477b7e3ecce71d
6
+ metadata.gz: 80b8601c1ff1179c55101943ddcbc065d58d332c201d7d2efa14be8e1ca92057f2cad3c16b18b9c9c1c2356044075e2c08d7287ab30e79a8c60e8dfcb445ca0e
7
+ data.tar.gz: a9364137d59377c78e95310d3447952779b5b0cbc71652e7f73d9002f20113dc76a0bc829395982afc96cd6148c43a8ccbb203e45b41300839a50661fd1f84f8
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 5.121.0 (2026-05-27)
4
+
5
+ Full Changelog: [v5.120.0...v5.121.0](https://github.com/team-telnyx/telnyx-ruby/compare/v5.120.0...v5.121.0)
6
+
7
+ ### Features
8
+
9
+ * TELAPPS-5698 document conversation relay API shape ([5593ce0](https://github.com/team-telnyx/telnyx-ruby/commit/5593ce08483bd6b4e333cc52f1f90b6fc9db3402))
10
+
3
11
  ## 5.120.0 (2026-05-27)
4
12
 
5
13
  Full Changelog: [v5.119.0...v5.120.0](https://github.com/team-telnyx/telnyx-ruby/compare/v5.119.0...v5.120.0)
data/README.md CHANGED
@@ -24,7 +24,7 @@ To use this gem, install via Bundler by adding the following to your application
24
24
  <!-- x-release-please-start-version -->
25
25
 
26
26
  ```ruby
27
- gem "telnyx", "~> 5.120.0"
27
+ gem "telnyx", "~> 5.121.0"
28
28
  ```
29
29
 
30
30
  <!-- x-release-please-end -->
@@ -127,6 +127,17 @@ module Telnyx
127
127
  # @return [Telnyx::Models::CallDialParams::ConferenceConfig, nil]
128
128
  optional :conference_config, -> { Telnyx::CallDialParams::ConferenceConfig }
129
129
 
130
+ # @!attribute conversation_relay_config
131
+ # Starts a Conversation Relay session automatically when the answered/dialed call
132
+ # is answered. This embedded shape is supported on `answer` and `dial`. It uses
133
+ # public field names (`url`, `dtmf_detection`, `greeting`, `voice`, `language`,
134
+ # etc.) and maps them to the underlying Conversation Relay action. `client_state`,
135
+ # `tts_language`, and `transcription_language` inside this object are ignored; use
136
+ # the parent command's `client_state` and `command_id` fields instead.
137
+ #
138
+ # @return [Telnyx::Models::CallDialParams::ConversationRelayConfig, nil]
139
+ optional :conversation_relay_config, -> { Telnyx::CallDialParams::ConversationRelayConfig }
140
+
130
141
  # @!attribute custom_headers
131
142
  # Custom headers to be added to the SIP INVITE.
132
143
  #
@@ -475,7 +486,7 @@ module Telnyx
475
486
  # @return [Symbol, Telnyx::Models::CallDialParams::WebhookURLsMethod, nil]
476
487
  optional :webhook_urls_method, enum: -> { Telnyx::CallDialParams::WebhookURLsMethod }
477
488
 
478
- # @!method initialize(connection_id:, from:, to:, answering_machine_detection: nil, answering_machine_detection_config: nil, assistant: nil, audio_url: nil, billing_group_id: nil, bridge_intent: nil, bridge_on_answer: nil, client_state: nil, command_id: nil, conference_config: nil, custom_headers: nil, deepfake_detection: nil, dialogflow_config: nil, enable_dialogflow: nil, from_display_name: nil, link_to: nil, media_encryption: nil, media_name: nil, park_after_unbridge: nil, preferred_codecs: nil, prevent_double_bridge: nil, privacy: nil, record: nil, record_channels: nil, record_custom_file_name: nil, record_format: nil, record_max_length: nil, record_timeout_secs: nil, record_track: nil, record_trim: nil, send_digits_on_answer: nil, send_silence_when_idle: nil, sip_auth_password: nil, sip_auth_username: nil, sip_headers: nil, sip_region: nil, sip_transport_protocol: nil, sound_modifications: nil, stream_auth_token: nil, stream_bidirectional_codec: nil, stream_bidirectional_mode: nil, stream_bidirectional_sampling_rate: nil, stream_bidirectional_target_legs: nil, stream_codec: nil, stream_establish_before_call_originate: nil, stream_track: nil, stream_url: nil, supervise_call_control_id: nil, supervisor_role: nil, time_limit_secs: nil, timeout_secs: nil, transcription: nil, transcription_config: nil, webhook_retries_policies: nil, webhook_url: nil, webhook_url_method: nil, webhook_urls: nil, webhook_urls_method: nil, request_options: {})
489
+ # @!method initialize(connection_id:, from:, to:, answering_machine_detection: nil, answering_machine_detection_config: nil, assistant: nil, audio_url: nil, billing_group_id: nil, bridge_intent: nil, bridge_on_answer: nil, client_state: nil, command_id: nil, conference_config: nil, conversation_relay_config: nil, custom_headers: nil, deepfake_detection: nil, dialogflow_config: nil, enable_dialogflow: nil, from_display_name: nil, link_to: nil, media_encryption: nil, media_name: nil, park_after_unbridge: nil, preferred_codecs: nil, prevent_double_bridge: nil, privacy: nil, record: nil, record_channels: nil, record_custom_file_name: nil, record_format: nil, record_max_length: nil, record_timeout_secs: nil, record_track: nil, record_trim: nil, send_digits_on_answer: nil, send_silence_when_idle: nil, sip_auth_password: nil, sip_auth_username: nil, sip_headers: nil, sip_region: nil, sip_transport_protocol: nil, sound_modifications: nil, stream_auth_token: nil, stream_bidirectional_codec: nil, stream_bidirectional_mode: nil, stream_bidirectional_sampling_rate: nil, stream_bidirectional_target_legs: nil, stream_codec: nil, stream_establish_before_call_originate: nil, stream_track: nil, stream_url: nil, supervise_call_control_id: nil, supervisor_role: nil, time_limit_secs: nil, timeout_secs: nil, transcription: nil, transcription_config: nil, webhook_retries_policies: nil, webhook_url: nil, webhook_url_method: nil, webhook_urls: nil, webhook_urls_method: nil, request_options: {})
479
490
  # Some parameter documentations has been truncated, see
480
491
  # {Telnyx::Models::CallDialParams} for more details.
481
492
  #
@@ -505,6 +516,8 @@ module Telnyx
505
516
  #
506
517
  # @param conference_config [Telnyx::Models::CallDialParams::ConferenceConfig] Optional configuration parameters to dial new participant into a conference.
507
518
  #
519
+ # @param conversation_relay_config [Telnyx::Models::CallDialParams::ConversationRelayConfig] Starts a Conversation Relay session automatically when the answered/dialed call
520
+ #
508
521
  # @param custom_headers [Array<Telnyx::Models::CustomSipHeader>] Custom headers to be added to the SIP INVITE.
509
522
  #
510
523
  # @param deepfake_detection [Telnyx::Models::CallDialParams::DeepfakeDetection] Enables deepfake detection on the call. When enabled, audio from the remote part
@@ -937,6 +950,543 @@ module Telnyx
937
950
  end
938
951
  end
939
952
 
953
+ class ConversationRelayConfig < Telnyx::Internal::Type::BaseModel
954
+ # @!attribute url
955
+ # WebSocket URL for your Conversation Relay server. Must start with `ws://` or
956
+ # `wss://`.
957
+ #
958
+ # @return [String]
959
+ required :url, String
960
+
961
+ # @!attribute custom_parameters
962
+ # Custom key-value parameters forwarded to the relay session as assistant dynamic
963
+ # variables.
964
+ #
965
+ # @return [Hash{Symbol=>Object}, nil]
966
+ optional :custom_parameters, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]
967
+
968
+ # @!attribute dtmf_detection
969
+ # Enable DTMF detection for the relay session.
970
+ #
971
+ # @return [Boolean, nil]
972
+ optional :dtmf_detection, Telnyx::Internal::Type::Boolean
973
+
974
+ # @!attribute greeting
975
+ # Text played when the relay session starts.
976
+ #
977
+ # @return [String, nil]
978
+ optional :greeting, String
979
+
980
+ # @!attribute interruptible
981
+ # Controls when caller input can interrupt assistant speech. `any` allows speech
982
+ # or DTMF interruptions; `none` disables interruptions; `speech` allows speech
983
+ # only; `dtmf` allows DTMF only.
984
+ #
985
+ # @return [Symbol, Telnyx::Models::CallDialParams::ConversationRelayConfig::Interruptible, nil]
986
+ optional :interruptible, enum: -> { Telnyx::CallDialParams::ConversationRelayConfig::Interruptible }
987
+
988
+ # @!attribute interruptible_greeting
989
+ # Controls when caller input can interrupt assistant speech. `any` allows speech
990
+ # or DTMF interruptions; `none` disables interruptions; `speech` allows speech
991
+ # only; `dtmf` allows DTMF only.
992
+ #
993
+ # @return [Symbol, Telnyx::Models::CallDialParams::ConversationRelayConfig::InterruptibleGreeting, nil]
994
+ optional :interruptible_greeting,
995
+ enum: -> { Telnyx::CallDialParams::ConversationRelayConfig::InterruptibleGreeting }
996
+
997
+ # @!attribute interruption_settings
998
+ # Settings for handling caller interruptions during Conversation Relay speech.
999
+ #
1000
+ # @return [Telnyx::Models::CallDialParams::ConversationRelayConfig::InterruptionSettings, nil]
1001
+ optional :interruption_settings,
1002
+ -> { Telnyx::CallDialParams::ConversationRelayConfig::InterruptionSettings }
1003
+
1004
+ # @!attribute language
1005
+ # Default language for both text-to-speech and speech recognition.
1006
+ #
1007
+ # @return [String, nil]
1008
+ optional :language, String
1009
+
1010
+ # @!attribute languages
1011
+ # Per-language TTS and transcription settings.
1012
+ #
1013
+ # @return [Array<Telnyx::Models::CallDialParams::ConversationRelayConfig::Language>, nil]
1014
+ optional :languages,
1015
+ -> { Telnyx::Internal::Type::ArrayOf[Telnyx::CallDialParams::ConversationRelayConfig::Language] }
1016
+
1017
+ # @!attribute provider
1018
+ # Structured voice provider. Must be supplied together with `structured_provider`.
1019
+ #
1020
+ # @return [String, nil]
1021
+ optional :provider, String
1022
+
1023
+ # @!attribute structured_provider
1024
+ # Provider-specific structured voice settings. Must be supplied together with
1025
+ # `provider`; Telnyx sends the value as the nested provider configuration for
1026
+ # Conversation Relay.
1027
+ #
1028
+ # @return [Hash{Symbol=>Object}, nil]
1029
+ optional :structured_provider, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]
1030
+
1031
+ # @!attribute transcription_engine
1032
+ # Engine to use for speech recognition. Legacy values `A` - `Google`, `B` -
1033
+ # `Telnyx` are supported for backward compatibility. For Conversation Relay, use
1034
+ # this field with `transcription_engine_config`; the `transcription` object is not
1035
+ # supported.
1036
+ #
1037
+ # @return [Symbol, Telnyx::Models::CallDialParams::ConversationRelayConfig::TranscriptionEngine, nil]
1038
+ optional :transcription_engine,
1039
+ enum: -> { Telnyx::CallDialParams::ConversationRelayConfig::TranscriptionEngine }
1040
+
1041
+ # @!attribute transcription_engine_config
1042
+ # Engine-specific transcription settings for Conversation Relay. This accepts the
1043
+ # same provider-specific options used by the Call Transcription Start command,
1044
+ # such as `transcription_model`, without requiring the engine discriminator to be
1045
+ # repeated inside this object.
1046
+ #
1047
+ # @return [Hash{Symbol=>Object}, nil]
1048
+ optional :transcription_engine_config, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]
1049
+
1050
+ # @!attribute tts_provider
1051
+ # Text-to-speech provider. If omitted, Telnyx derives it from `voice` or
1052
+ # `provider`.
1053
+ #
1054
+ # @return [String, nil]
1055
+ optional :tts_provider, String
1056
+
1057
+ # @!attribute voice
1058
+ # The voice to be used by the voice assistant. Currently we support ElevenLabs,
1059
+ # Telnyx and AWS voices.
1060
+ #
1061
+ # **Supported Providers:**
1062
+ #
1063
+ # - **AWS:** Use `AWS.Polly.<VoiceId>` (e.g., `AWS.Polly.Joanna`). For neural
1064
+ # voices, which provide more realistic, human-like speech, append `-Neural` to
1065
+ # the `VoiceId` (e.g., `AWS.Polly.Joanna-Neural`). Check the
1066
+ # [available voices](https://docs.aws.amazon.com/polly/latest/dg/available-voices.html)
1067
+ # for compatibility.
1068
+ # - **Azure:** Use `Azure.<VoiceId>. (e.g. Azure.en-CA-ClaraNeural,
1069
+ # Azure.en-CA-LiamNeural, Azure.en-US-BrianMultilingualNeural,
1070
+ # Azure.en-US-Ava:DragonHDLatestNeural. For a complete list of voices, go to
1071
+ # [Azure Voice Gallery](https://speech.microsoft.com/portal/voicegallery).)
1072
+ # - **ElevenLabs:** Use `ElevenLabs.<ModelId>.<VoiceId>` (e.g.,
1073
+ # `ElevenLabs.BaseModel.John`). The `ModelId` part is optional. To use
1074
+ # ElevenLabs, you must provide your ElevenLabs API key as an integration secret
1075
+ # under `"voice_settings": {"api_key_ref": "<secret_id>"}`. See
1076
+ # [integration secrets documentation](https://developers.telnyx.com/api/secrets-manager/integration-secrets/create-integration-secret)
1077
+ # for details. Check
1078
+ # [available voices](https://elevenlabs.io/docs/api-reference/get-voices).
1079
+ # - **Telnyx:** Use `Telnyx.<model_id>.<voice_id>`
1080
+ # - **Inworld:** Use `Inworld.<ModelId>.<VoiceId>` (e.g., `Inworld.Mini.Loretta`,
1081
+ # `Inworld.Max.Oliver`). Supported models: `Mini`, `Max`.
1082
+ # - **xAI:** Use `xAI.<VoiceId>` (e.g., `xAI.eve`). Available voices: `eve`,
1083
+ # `ara`, `rex`, `sal`, `leo`.
1084
+ #
1085
+ # @return [String, nil]
1086
+ optional :voice, String
1087
+
1088
+ # @!attribute voice_settings
1089
+ # The settings associated with the voice selected
1090
+ #
1091
+ # @return [Telnyx::Models::Calls::ElevenLabsVoiceSettings, Telnyx::Models::Calls::TelnyxVoiceSettings, Telnyx::Models::Calls::AwsVoiceSettings, Telnyx::Models::MinimaxVoiceSettings, Telnyx::Models::AzureVoiceSettings, Telnyx::Models::RimeVoiceSettings, Telnyx::Models::ResembleVoiceSettings, Telnyx::Models::CallDialParams::ConversationRelayConfig::VoiceSettings::Inworld, Telnyx::Models::XaiVoiceSettings, nil]
1092
+ optional :voice_settings, union: -> { Telnyx::CallDialParams::ConversationRelayConfig::VoiceSettings }
1093
+
1094
+ # @!method initialize(url:, custom_parameters: nil, dtmf_detection: nil, greeting: nil, interruptible: nil, interruptible_greeting: nil, interruption_settings: nil, language: nil, languages: nil, provider: nil, structured_provider: nil, transcription_engine: nil, transcription_engine_config: nil, tts_provider: nil, voice: nil, voice_settings: nil)
1095
+ # Some parameter documentations has been truncated, see
1096
+ # {Telnyx::Models::CallDialParams::ConversationRelayConfig} for more details.
1097
+ #
1098
+ # Starts a Conversation Relay session automatically when the answered/dialed call
1099
+ # is answered. This embedded shape is supported on `answer` and `dial`. It uses
1100
+ # public field names (`url`, `dtmf_detection`, `greeting`, `voice`, `language`,
1101
+ # etc.) and maps them to the underlying Conversation Relay action. `client_state`,
1102
+ # `tts_language`, and `transcription_language` inside this object are ignored; use
1103
+ # the parent command's `client_state` and `command_id` fields instead.
1104
+ #
1105
+ # @param url [String] WebSocket URL for your Conversation Relay server. Must start with `ws://` or `ws
1106
+ #
1107
+ # @param custom_parameters [Hash{Symbol=>Object}] Custom key-value parameters forwarded to the relay session as assistant dynamic
1108
+ #
1109
+ # @param dtmf_detection [Boolean] Enable DTMF detection for the relay session.
1110
+ #
1111
+ # @param greeting [String] Text played when the relay session starts.
1112
+ #
1113
+ # @param interruptible [Symbol, Telnyx::Models::CallDialParams::ConversationRelayConfig::Interruptible] Controls when caller input can interrupt assistant speech. `any` allows speech o
1114
+ #
1115
+ # @param interruptible_greeting [Symbol, Telnyx::Models::CallDialParams::ConversationRelayConfig::InterruptibleGreeting] Controls when caller input can interrupt assistant speech. `any` allows speech o
1116
+ #
1117
+ # @param interruption_settings [Telnyx::Models::CallDialParams::ConversationRelayConfig::InterruptionSettings] Settings for handling caller interruptions during Conversation Relay speech.
1118
+ #
1119
+ # @param language [String] Default language for both text-to-speech and speech recognition.
1120
+ #
1121
+ # @param languages [Array<Telnyx::Models::CallDialParams::ConversationRelayConfig::Language>] Per-language TTS and transcription settings.
1122
+ #
1123
+ # @param provider [String] Structured voice provider. Must be supplied together with `structured_provider`.
1124
+ #
1125
+ # @param structured_provider [Hash{Symbol=>Object}] Provider-specific structured voice settings. Must be supplied together with `pro
1126
+ #
1127
+ # @param transcription_engine [Symbol, Telnyx::Models::CallDialParams::ConversationRelayConfig::TranscriptionEngine] Engine to use for speech recognition. Legacy values `A` - `Google`, `B` - `Telny
1128
+ #
1129
+ # @param transcription_engine_config [Hash{Symbol=>Object}] Engine-specific transcription settings for Conversation Relay. This accepts the
1130
+ #
1131
+ # @param tts_provider [String] Text-to-speech provider. If omitted, Telnyx derives it from `voice` or `provider
1132
+ #
1133
+ # @param voice [String] The voice to be used by the voice assistant. Currently we support ElevenLabs, Te
1134
+ #
1135
+ # @param voice_settings [Telnyx::Models::Calls::ElevenLabsVoiceSettings, Telnyx::Models::Calls::TelnyxVoiceSettings, Telnyx::Models::Calls::AwsVoiceSettings, Telnyx::Models::MinimaxVoiceSettings, Telnyx::Models::AzureVoiceSettings, Telnyx::Models::RimeVoiceSettings, Telnyx::Models::ResembleVoiceSettings, Telnyx::Models::CallDialParams::ConversationRelayConfig::VoiceSettings::Inworld, Telnyx::Models::XaiVoiceSettings] The settings associated with the voice selected
1136
+
1137
+ # Controls when caller input can interrupt assistant speech. `any` allows speech
1138
+ # or DTMF interruptions; `none` disables interruptions; `speech` allows speech
1139
+ # only; `dtmf` allows DTMF only.
1140
+ #
1141
+ # @see Telnyx::Models::CallDialParams::ConversationRelayConfig#interruptible
1142
+ module Interruptible
1143
+ extend Telnyx::Internal::Type::Enum
1144
+
1145
+ NONE = :none
1146
+ ANY = :any
1147
+ SPEECH = :speech
1148
+ DTMF = :dtmf
1149
+
1150
+ # @!method self.values
1151
+ # @return [Array<Symbol>]
1152
+ end
1153
+
1154
+ # Controls when caller input can interrupt assistant speech. `any` allows speech
1155
+ # or DTMF interruptions; `none` disables interruptions; `speech` allows speech
1156
+ # only; `dtmf` allows DTMF only.
1157
+ #
1158
+ # @see Telnyx::Models::CallDialParams::ConversationRelayConfig#interruptible_greeting
1159
+ module InterruptibleGreeting
1160
+ extend Telnyx::Internal::Type::Enum
1161
+
1162
+ NONE = :none
1163
+ ANY = :any
1164
+ SPEECH = :speech
1165
+ DTMF = :dtmf
1166
+
1167
+ # @!method self.values
1168
+ # @return [Array<Symbol>]
1169
+ end
1170
+
1171
+ # @see Telnyx::Models::CallDialParams::ConversationRelayConfig#interruption_settings
1172
+ class InterruptionSettings < Telnyx::Internal::Type::BaseModel
1173
+ # @!attribute enable
1174
+ # Legacy boolean form. `true` is equivalent to `interruptible=any`; `false` is
1175
+ # equivalent to `interruptible=none`.
1176
+ #
1177
+ # @return [Boolean, nil]
1178
+ optional :enable, Telnyx::Internal::Type::Boolean
1179
+
1180
+ # @!attribute interruptible
1181
+ # Controls when caller input can interrupt assistant speech. `any` allows speech
1182
+ # or DTMF interruptions; `none` disables interruptions; `speech` allows speech
1183
+ # only; `dtmf` allows DTMF only.
1184
+ #
1185
+ # @return [Symbol, Telnyx::Models::CallDialParams::ConversationRelayConfig::InterruptionSettings::Interruptible, nil]
1186
+ optional :interruptible,
1187
+ enum: -> { Telnyx::CallDialParams::ConversationRelayConfig::InterruptionSettings::Interruptible }
1188
+
1189
+ # @!attribute interruptible_greeting
1190
+ # Controls when caller input can interrupt assistant speech. `any` allows speech
1191
+ # or DTMF interruptions; `none` disables interruptions; `speech` allows speech
1192
+ # only; `dtmf` allows DTMF only.
1193
+ #
1194
+ # @return [Symbol, Telnyx::Models::CallDialParams::ConversationRelayConfig::InterruptionSettings::InterruptibleGreeting, nil]
1195
+ optional :interruptible_greeting,
1196
+ enum: -> { Telnyx::CallDialParams::ConversationRelayConfig::InterruptionSettings::InterruptibleGreeting }
1197
+
1198
+ # @!attribute welcome_greeting_interruptible
1199
+ # Controls when caller input can interrupt assistant speech. `any` allows speech
1200
+ # or DTMF interruptions; `none` disables interruptions; `speech` allows speech
1201
+ # only; `dtmf` allows DTMF only.
1202
+ #
1203
+ # @return [Symbol, Telnyx::Models::CallDialParams::ConversationRelayConfig::InterruptionSettings::WelcomeGreetingInterruptible, nil]
1204
+ optional :welcome_greeting_interruptible,
1205
+ enum: -> { Telnyx::CallDialParams::ConversationRelayConfig::InterruptionSettings::WelcomeGreetingInterruptible }
1206
+
1207
+ # @!method initialize(enable: nil, interruptible: nil, interruptible_greeting: nil, welcome_greeting_interruptible: nil)
1208
+ # Some parameter documentations has been truncated, see
1209
+ # {Telnyx::Models::CallDialParams::ConversationRelayConfig::InterruptionSettings}
1210
+ # for more details.
1211
+ #
1212
+ # Settings for handling caller interruptions during Conversation Relay speech.
1213
+ #
1214
+ # @param enable [Boolean] Legacy boolean form. `true` is equivalent to `interruptible=any`; `false` is equ
1215
+ #
1216
+ # @param interruptible [Symbol, Telnyx::Models::CallDialParams::ConversationRelayConfig::InterruptionSettings::Interruptible] Controls when caller input can interrupt assistant speech. `any` allows speech o
1217
+ #
1218
+ # @param interruptible_greeting [Symbol, Telnyx::Models::CallDialParams::ConversationRelayConfig::InterruptionSettings::InterruptibleGreeting] Controls when caller input can interrupt assistant speech. `any` allows speech o
1219
+ #
1220
+ # @param welcome_greeting_interruptible [Symbol, Telnyx::Models::CallDialParams::ConversationRelayConfig::InterruptionSettings::WelcomeGreetingInterruptible] Controls when caller input can interrupt assistant speech. `any` allows speech o
1221
+
1222
+ # Controls when caller input can interrupt assistant speech. `any` allows speech
1223
+ # or DTMF interruptions; `none` disables interruptions; `speech` allows speech
1224
+ # only; `dtmf` allows DTMF only.
1225
+ #
1226
+ # @see Telnyx::Models::CallDialParams::ConversationRelayConfig::InterruptionSettings#interruptible
1227
+ module Interruptible
1228
+ extend Telnyx::Internal::Type::Enum
1229
+
1230
+ NONE = :none
1231
+ ANY = :any
1232
+ SPEECH = :speech
1233
+ DTMF = :dtmf
1234
+
1235
+ # @!method self.values
1236
+ # @return [Array<Symbol>]
1237
+ end
1238
+
1239
+ # Controls when caller input can interrupt assistant speech. `any` allows speech
1240
+ # or DTMF interruptions; `none` disables interruptions; `speech` allows speech
1241
+ # only; `dtmf` allows DTMF only.
1242
+ #
1243
+ # @see Telnyx::Models::CallDialParams::ConversationRelayConfig::InterruptionSettings#interruptible_greeting
1244
+ module InterruptibleGreeting
1245
+ extend Telnyx::Internal::Type::Enum
1246
+
1247
+ NONE = :none
1248
+ ANY = :any
1249
+ SPEECH = :speech
1250
+ DTMF = :dtmf
1251
+
1252
+ # @!method self.values
1253
+ # @return [Array<Symbol>]
1254
+ end
1255
+
1256
+ # Controls when caller input can interrupt assistant speech. `any` allows speech
1257
+ # or DTMF interruptions; `none` disables interruptions; `speech` allows speech
1258
+ # only; `dtmf` allows DTMF only.
1259
+ #
1260
+ # @see Telnyx::Models::CallDialParams::ConversationRelayConfig::InterruptionSettings#welcome_greeting_interruptible
1261
+ module WelcomeGreetingInterruptible
1262
+ extend Telnyx::Internal::Type::Enum
1263
+
1264
+ NONE = :none
1265
+ ANY = :any
1266
+ SPEECH = :speech
1267
+ DTMF = :dtmf
1268
+
1269
+ # @!method self.values
1270
+ # @return [Array<Symbol>]
1271
+ end
1272
+ end
1273
+
1274
+ class Language < Telnyx::Internal::Type::BaseModel
1275
+ # @!attribute language
1276
+ # BCP 47 language tag for this language configuration.
1277
+ #
1278
+ # @return [String]
1279
+ required :language, String
1280
+
1281
+ # @!attribute speech_model
1282
+ # Conversation Relay speech model. Prefer
1283
+ # `transcription_engine_config.transcription_model` when configuring
1284
+ # speech-to-text.
1285
+ #
1286
+ # @return [String, nil]
1287
+ optional :speech_model, String
1288
+
1289
+ # @!attribute transcription_engine
1290
+ # Engine to use for speech recognition. Legacy values `A` - `Google`, `B` -
1291
+ # `Telnyx` are supported for backward compatibility. When provided in a
1292
+ # Conversation Relay language entry, Telnyx derives `transcription_provider` and
1293
+ # `speech_model` for that language.
1294
+ #
1295
+ # @return [Symbol, Telnyx::Models::CallDialParams::ConversationRelayConfig::Language::TranscriptionEngine, nil]
1296
+ optional :transcription_engine,
1297
+ enum: -> { Telnyx::CallDialParams::ConversationRelayConfig::Language::TranscriptionEngine }
1298
+
1299
+ # @!attribute transcription_engine_config
1300
+ # Engine-specific transcription settings for Conversation Relay. This accepts the
1301
+ # same provider-specific options used by the Call Transcription Start command,
1302
+ # such as `transcription_model`, without requiring the engine discriminator to be
1303
+ # repeated inside this object.
1304
+ #
1305
+ # @return [Hash{Symbol=>Object}, nil]
1306
+ optional :transcription_engine_config, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]
1307
+
1308
+ # @!attribute transcription_provider
1309
+ # Conversation Relay transcription provider name. Prefer `transcription_engine`
1310
+ # when configuring speech-to-text.
1311
+ #
1312
+ # @return [String, nil]
1313
+ optional :transcription_provider, String
1314
+
1315
+ # @!attribute tts_provider
1316
+ # Text-to-speech provider for this language. If omitted and `voice` is provided,
1317
+ # Telnyx derives the provider from the voice identifier.
1318
+ #
1319
+ # @return [String, nil]
1320
+ optional :tts_provider, String
1321
+
1322
+ # @!attribute voice
1323
+ # Voice identifier for this language.
1324
+ #
1325
+ # @return [String, nil]
1326
+ optional :voice, String
1327
+
1328
+ # @!attribute voice_settings
1329
+ # The settings associated with the voice selected
1330
+ #
1331
+ # @return [Telnyx::Models::Calls::ElevenLabsVoiceSettings, Telnyx::Models::Calls::TelnyxVoiceSettings, Telnyx::Models::Calls::AwsVoiceSettings, Telnyx::Models::MinimaxVoiceSettings, Telnyx::Models::AzureVoiceSettings, Telnyx::Models::RimeVoiceSettings, Telnyx::Models::ResembleVoiceSettings, Telnyx::Models::CallDialParams::ConversationRelayConfig::Language::VoiceSettings::Inworld, Telnyx::Models::XaiVoiceSettings, nil]
1332
+ optional :voice_settings,
1333
+ union: -> { Telnyx::CallDialParams::ConversationRelayConfig::Language::VoiceSettings }
1334
+
1335
+ # @!method initialize(language:, speech_model: nil, transcription_engine: nil, transcription_engine_config: nil, transcription_provider: nil, tts_provider: nil, voice: nil, voice_settings: nil)
1336
+ # Some parameter documentations has been truncated, see
1337
+ # {Telnyx::Models::CallDialParams::ConversationRelayConfig::Language} for more
1338
+ # details.
1339
+ #
1340
+ # Language-specific TTS and transcription settings for Conversation Relay.
1341
+ #
1342
+ # @param language [String] BCP 47 language tag for this language configuration.
1343
+ #
1344
+ # @param speech_model [String] Conversation Relay speech model. Prefer `transcription_engine_config.transcripti
1345
+ #
1346
+ # @param transcription_engine [Symbol, Telnyx::Models::CallDialParams::ConversationRelayConfig::Language::TranscriptionEngine] Engine to use for speech recognition. Legacy values `A` - `Google`, `B` - `Telny
1347
+ #
1348
+ # @param transcription_engine_config [Hash{Symbol=>Object}] Engine-specific transcription settings for Conversation Relay. This accepts the
1349
+ #
1350
+ # @param transcription_provider [String] Conversation Relay transcription provider name. Prefer `transcription_engine` wh
1351
+ #
1352
+ # @param tts_provider [String] Text-to-speech provider for this language. If omitted and `voice` is provided, T
1353
+ #
1354
+ # @param voice [String] Voice identifier for this language.
1355
+ #
1356
+ # @param voice_settings [Telnyx::Models::Calls::ElevenLabsVoiceSettings, Telnyx::Models::Calls::TelnyxVoiceSettings, Telnyx::Models::Calls::AwsVoiceSettings, Telnyx::Models::MinimaxVoiceSettings, Telnyx::Models::AzureVoiceSettings, Telnyx::Models::RimeVoiceSettings, Telnyx::Models::ResembleVoiceSettings, Telnyx::Models::CallDialParams::ConversationRelayConfig::Language::VoiceSettings::Inworld, Telnyx::Models::XaiVoiceSettings] The settings associated with the voice selected
1357
+
1358
+ # Engine to use for speech recognition. Legacy values `A` - `Google`, `B` -
1359
+ # `Telnyx` are supported for backward compatibility. When provided in a
1360
+ # Conversation Relay language entry, Telnyx derives `transcription_provider` and
1361
+ # `speech_model` for that language.
1362
+ #
1363
+ # @see Telnyx::Models::CallDialParams::ConversationRelayConfig::Language#transcription_engine
1364
+ module TranscriptionEngine
1365
+ extend Telnyx::Internal::Type::Enum
1366
+
1367
+ GOOGLE = :Google
1368
+ TELNYX = :Telnyx
1369
+ DEEPGRAM = :Deepgram
1370
+ AZURE = :Azure
1371
+ X_AI = :xAI
1372
+ ASSEMBLY_AI = :AssemblyAI
1373
+ SPEECHMATICS = :Speechmatics
1374
+ SONIOX = :Soniox
1375
+ A = :A
1376
+ B = :B
1377
+
1378
+ # @!method self.values
1379
+ # @return [Array<Symbol>]
1380
+ end
1381
+
1382
+ # The settings associated with the voice selected
1383
+ #
1384
+ # @see Telnyx::Models::CallDialParams::ConversationRelayConfig::Language#voice_settings
1385
+ module VoiceSettings
1386
+ extend Telnyx::Internal::Type::Union
1387
+
1388
+ discriminator :type
1389
+
1390
+ variant :elevenlabs, -> { Telnyx::Calls::ElevenLabsVoiceSettings }
1391
+
1392
+ variant :telnyx, -> { Telnyx::Calls::TelnyxVoiceSettings }
1393
+
1394
+ variant :aws, -> { Telnyx::Calls::AwsVoiceSettings }
1395
+
1396
+ variant :minimax, -> { Telnyx::MinimaxVoiceSettings }
1397
+
1398
+ variant :azure, -> { Telnyx::AzureVoiceSettings }
1399
+
1400
+ variant :rime, -> { Telnyx::RimeVoiceSettings }
1401
+
1402
+ variant :resemble, -> { Telnyx::ResembleVoiceSettings }
1403
+
1404
+ variant :inworld, -> { Telnyx::CallDialParams::ConversationRelayConfig::Language::VoiceSettings::Inworld }
1405
+
1406
+ variant :xai, -> { Telnyx::XaiVoiceSettings }
1407
+
1408
+ class Inworld < Telnyx::Internal::Type::BaseModel
1409
+ # @!attribute type
1410
+ # Voice settings provider type
1411
+ #
1412
+ # @return [Symbol, :inworld]
1413
+ required :type, const: :inworld
1414
+
1415
+ # @!method initialize(type: :inworld)
1416
+ # @param type [Symbol, :inworld] Voice settings provider type
1417
+ end
1418
+
1419
+ # @!method self.variants
1420
+ # @return [Array(Telnyx::Models::Calls::ElevenLabsVoiceSettings, Telnyx::Models::Calls::TelnyxVoiceSettings, Telnyx::Models::Calls::AwsVoiceSettings, Telnyx::Models::MinimaxVoiceSettings, Telnyx::Models::AzureVoiceSettings, Telnyx::Models::RimeVoiceSettings, Telnyx::Models::ResembleVoiceSettings, Telnyx::Models::CallDialParams::ConversationRelayConfig::Language::VoiceSettings::Inworld, Telnyx::Models::XaiVoiceSettings)]
1421
+ end
1422
+ end
1423
+
1424
+ # Engine to use for speech recognition. Legacy values `A` - `Google`, `B` -
1425
+ # `Telnyx` are supported for backward compatibility. For Conversation Relay, use
1426
+ # this field with `transcription_engine_config`; the `transcription` object is not
1427
+ # supported.
1428
+ #
1429
+ # @see Telnyx::Models::CallDialParams::ConversationRelayConfig#transcription_engine
1430
+ module TranscriptionEngine
1431
+ extend Telnyx::Internal::Type::Enum
1432
+
1433
+ GOOGLE = :Google
1434
+ TELNYX = :Telnyx
1435
+ DEEPGRAM = :Deepgram
1436
+ AZURE = :Azure
1437
+ X_AI = :xAI
1438
+ ASSEMBLY_AI = :AssemblyAI
1439
+ SPEECHMATICS = :Speechmatics
1440
+ SONIOX = :Soniox
1441
+ A = :A
1442
+ B = :B
1443
+
1444
+ # @!method self.values
1445
+ # @return [Array<Symbol>]
1446
+ end
1447
+
1448
+ # The settings associated with the voice selected
1449
+ #
1450
+ # @see Telnyx::Models::CallDialParams::ConversationRelayConfig#voice_settings
1451
+ module VoiceSettings
1452
+ extend Telnyx::Internal::Type::Union
1453
+
1454
+ discriminator :type
1455
+
1456
+ variant :elevenlabs, -> { Telnyx::Calls::ElevenLabsVoiceSettings }
1457
+
1458
+ variant :telnyx, -> { Telnyx::Calls::TelnyxVoiceSettings }
1459
+
1460
+ variant :aws, -> { Telnyx::Calls::AwsVoiceSettings }
1461
+
1462
+ variant :minimax, -> { Telnyx::MinimaxVoiceSettings }
1463
+
1464
+ variant :azure, -> { Telnyx::AzureVoiceSettings }
1465
+
1466
+ variant :rime, -> { Telnyx::RimeVoiceSettings }
1467
+
1468
+ variant :resemble, -> { Telnyx::ResembleVoiceSettings }
1469
+
1470
+ variant :inworld, -> { Telnyx::CallDialParams::ConversationRelayConfig::VoiceSettings::Inworld }
1471
+
1472
+ variant :xai, -> { Telnyx::XaiVoiceSettings }
1473
+
1474
+ class Inworld < Telnyx::Internal::Type::BaseModel
1475
+ # @!attribute type
1476
+ # Voice settings provider type
1477
+ #
1478
+ # @return [Symbol, :inworld]
1479
+ required :type, const: :inworld
1480
+
1481
+ # @!method initialize(type: :inworld)
1482
+ # @param type [Symbol, :inworld] Voice settings provider type
1483
+ end
1484
+
1485
+ # @!method self.variants
1486
+ # @return [Array(Telnyx::Models::Calls::ElevenLabsVoiceSettings, Telnyx::Models::Calls::TelnyxVoiceSettings, Telnyx::Models::Calls::AwsVoiceSettings, Telnyx::Models::MinimaxVoiceSettings, Telnyx::Models::AzureVoiceSettings, Telnyx::Models::RimeVoiceSettings, Telnyx::Models::ResembleVoiceSettings, Telnyx::Models::CallDialParams::ConversationRelayConfig::VoiceSettings::Inworld, Telnyx::Models::XaiVoiceSettings)]
1487
+ end
1488
+ end
1489
+
940
1490
  class DeepfakeDetection < Telnyx::Internal::Type::BaseModel
941
1491
  # @!attribute enabled
942
1492
  # Whether deepfake detection is enabled.