telnyx 5.119.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.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +21 -0
  3. data/README.md +1 -1
  4. data/lib/telnyx/client.rb +6 -0
  5. data/lib/telnyx/models/call_dial_params.rb +551 -1
  6. data/lib/telnyx/models/calls/action_answer_params.rb +556 -1
  7. data/lib/telnyx/models/calls/action_gather_using_speak_params.rb +2 -2
  8. data/lib/telnyx/models/calls/action_speak_params.rb +2 -2
  9. data/lib/telnyx/models/calls/action_start_conversation_relay_params.rb +411 -84
  10. data/lib/telnyx/models/conferences/action_speak_params.rb +2 -2
  11. data/lib/telnyx/models/voice_sdk_call_report_list_params.rb +56 -0
  12. data/lib/telnyx/models/voice_sdk_call_report_list_response.rb +385 -0
  13. data/lib/telnyx/models/voice_sdk_call_report_retrieve_params.rb +20 -0
  14. data/lib/telnyx/models/voice_sdk_call_report_retrieve_response.rb +390 -0
  15. data/lib/telnyx/models.rb +4 -0
  16. data/lib/telnyx/resources/calls/actions.rb +26 -8
  17. data/lib/telnyx/resources/calls.rb +3 -1
  18. data/lib/telnyx/resources/voice_sdk_call_reports.rb +71 -0
  19. data/lib/telnyx/version.rb +1 -1
  20. data/lib/telnyx.rb +5 -0
  21. data/rbi/telnyx/client.rbi +5 -0
  22. data/rbi/telnyx/models/call_dial_params.rbi +1273 -0
  23. data/rbi/telnyx/models/calls/action_answer_params.rbi +1279 -0
  24. data/rbi/telnyx/models/calls/action_gather_using_speak_params.rbi +4 -4
  25. data/rbi/telnyx/models/calls/action_speak_params.rbi +4 -4
  26. data/rbi/telnyx/models/calls/action_start_conversation_relay_params.rbi +928 -133
  27. data/rbi/telnyx/models/conferences/action_speak_params.rbi +4 -4
  28. data/rbi/telnyx/models/voice_sdk_call_report_list_params.rbi +108 -0
  29. data/rbi/telnyx/models/voice_sdk_call_report_list_response.rbi +774 -0
  30. data/rbi/telnyx/models/voice_sdk_call_report_retrieve_params.rbi +38 -0
  31. data/rbi/telnyx/models/voice_sdk_call_report_retrieve_response.rbi +782 -0
  32. data/rbi/telnyx/models.rbi +5 -0
  33. data/rbi/telnyx/resources/calls/actions.rbi +73 -24
  34. data/rbi/telnyx/resources/calls.rbi +9 -0
  35. data/rbi/telnyx/resources/conferences/actions.rbi +2 -2
  36. data/rbi/telnyx/resources/voice_sdk_call_reports.rbi +58 -0
  37. data/sig/telnyx/client.rbs +2 -0
  38. data/sig/telnyx/models/call_dial_params.rbs +440 -0
  39. data/sig/telnyx/models/calls/action_answer_params.rbs +440 -0
  40. data/sig/telnyx/models/calls/action_start_conversation_relay_params.rbs +317 -51
  41. data/sig/telnyx/models/voice_sdk_call_report_list_params.rbs +57 -0
  42. data/sig/telnyx/models/voice_sdk_call_report_list_response.rbs +340 -0
  43. data/sig/telnyx/models/voice_sdk_call_report_retrieve_params.rbs +23 -0
  44. data/sig/telnyx/models/voice_sdk_call_report_retrieve_response.rbs +345 -0
  45. data/sig/telnyx/models.rbs +4 -0
  46. data/sig/telnyx/resources/calls/actions.rbs +12 -3
  47. data/sig/telnyx/resources/calls.rbs +1 -0
  48. data/sig/telnyx/resources/voice_sdk_call_reports.rbs +19 -0
  49. metadata +17 -2
@@ -41,12 +41,9 @@ module Telnyx
41
41
  optional :conversation_relay_dtmf_detection, Telnyx::Internal::Type::Boolean
42
42
 
43
43
  # @!attribute conversation_relay_settings
44
- # Conversation Relay connection settings. This object is used by TeXML Call
45
- # Scripting's `<ConversationRelay>` verb. The `interruptible` and
46
- # `interruptible_greeting` fields are shorthand for
47
- # `interruption_settings.interruptible` and
48
- # `interruption_settings.interruptible_greeting`; use top-level
49
- # `interruption_settings` for the full interruption settings shape.
44
+ # Conversation Relay connection settings. This object can provide `url`,
45
+ # `dtmf_detection`, `interruptible`, `interruptible_greeting`, and `languages`.
46
+ # Top-level aliases override nested values when both are present.
50
47
  #
51
48
  # @return [Telnyx::Models::Calls::ActionStartConversationRelayParams::ConversationRelaySettings, nil]
52
49
  optional :conversation_relay_settings,
@@ -59,12 +56,44 @@ module Telnyx
59
56
  # @return [String, nil]
60
57
  optional :conversation_relay_url, String
61
58
 
59
+ # @!attribute custom_parameters
60
+ # Custom key-value parameters forwarded to the relay session as
61
+ # `assistant.dynamic_variables`. If `assistant.dynamic_variables` is also present,
62
+ # these values are merged in.
63
+ #
64
+ # @return [Hash{Symbol=>Object}, nil]
65
+ optional :custom_parameters, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]
66
+
67
+ # @!attribute dtmf_detection
68
+ # Public alias for `conversation_relay_dtmf_detection`. If both are present, this
69
+ # value wins.
70
+ #
71
+ # @return [Boolean, nil]
72
+ optional :dtmf_detection, Telnyx::Internal::Type::Boolean
73
+
62
74
  # @!attribute greeting
63
75
  # Text played when the relay session starts.
64
76
  #
65
77
  # @return [String, nil]
66
78
  optional :greeting, String
67
79
 
80
+ # @!attribute interruptible
81
+ # Controls when caller input can interrupt assistant speech. `any` allows speech
82
+ # or DTMF interruptions; `none` disables interruptions; `speech` allows speech
83
+ # only; `dtmf` allows DTMF only.
84
+ #
85
+ # @return [Symbol, Telnyx::Models::Calls::ActionStartConversationRelayParams::Interruptible, nil]
86
+ optional :interruptible, enum: -> { Telnyx::Calls::ActionStartConversationRelayParams::Interruptible }
87
+
88
+ # @!attribute interruptible_greeting
89
+ # Controls when caller input can interrupt assistant speech. `any` allows speech
90
+ # or DTMF interruptions; `none` disables interruptions; `speech` allows speech
91
+ # only; `dtmf` allows DTMF only.
92
+ #
93
+ # @return [Symbol, Telnyx::Models::Calls::ActionStartConversationRelayParams::InterruptibleGreeting, nil]
94
+ optional :interruptible_greeting,
95
+ enum: -> { Telnyx::Calls::ActionStartConversationRelayParams::InterruptibleGreeting }
96
+
68
97
  # @!attribute interruption_settings
69
98
  # Settings for handling caller interruptions during Conversation Relay speech.
70
99
  #
@@ -74,38 +103,73 @@ module Telnyx
74
103
 
75
104
  # @!attribute language
76
105
  # Default language for the relay session. This value is used for both
77
- # text-to-speech and speech recognition unless `tts_language` or
78
- # `transcription_language` are provided.
106
+ # text-to-speech and speech recognition.
79
107
  #
80
108
  # @return [String, nil]
81
109
  optional :language, String
82
110
 
83
111
  # @!attribute languages
84
- # Language-specific TTS and transcription settings. Use this when the relay
85
- # session needs per-language provider, voice, or speech model configuration.
112
+ # Per-language TTS and transcription settings.
86
113
  #
87
114
  # @return [Array<Telnyx::Models::Calls::ActionStartConversationRelayParams::Language>, nil]
88
115
  optional :languages,
89
116
  -> { Telnyx::Internal::Type::ArrayOf[Telnyx::Calls::ActionStartConversationRelayParams::Language] }
90
117
 
118
+ # @!attribute provider
119
+ # Structured voice provider. Must be supplied together with `structured_provider`.
120
+ #
121
+ # @return [String, nil]
122
+ optional :provider, String
123
+
124
+ # @!attribute structured_provider
125
+ # Provider-specific structured voice settings. Must be supplied together with
126
+ # `provider`; Telnyx sends the value as the nested provider configuration for
127
+ # Conversation Relay.
128
+ #
129
+ # @return [Hash{Symbol=>Object}, nil]
130
+ optional :structured_provider, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]
131
+
91
132
  # @!attribute transcription
92
- # Speech-to-text settings for Conversation Relay.
133
+ # @deprecated
93
134
  #
94
- # @return [Telnyx::Models::Calls::ActionStartConversationRelayParams::Transcription, nil]
95
- optional :transcription, -> { Telnyx::Calls::ActionStartConversationRelayParams::Transcription }
135
+ # Not supported for Conversation Relay start requests. Use `transcription_engine`
136
+ # and `transcription_engine_config` instead.
137
+ #
138
+ # @return [Hash{Symbol=>Object}, nil]
139
+ optional :transcription, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]
140
+
141
+ # @!attribute transcription_engine
142
+ # Engine to use for speech recognition. Legacy values `A` - `Google`, `B` -
143
+ # `Telnyx` are supported for backward compatibility. For Conversation Relay, use
144
+ # this field with `transcription_engine_config`; the `transcription` object is not
145
+ # supported.
146
+ #
147
+ # @return [Symbol, Telnyx::Models::Calls::ActionStartConversationRelayParams::TranscriptionEngine, nil]
148
+ optional :transcription_engine,
149
+ enum: -> { Telnyx::Calls::ActionStartConversationRelayParams::TranscriptionEngine }
96
150
 
97
- # @!attribute transcription_language
98
- # Language to use for speech recognition. Overrides `language` for transcription
99
- # when provided.
151
+ # @!attribute transcription_engine_config
152
+ # Engine-specific transcription settings for Conversation Relay. This accepts the
153
+ # same provider-specific options used by the Call Transcription Start command,
154
+ # such as `transcription_model`, without requiring the engine discriminator to be
155
+ # repeated inside this object.
156
+ #
157
+ # @return [Hash{Symbol=>Object}, nil]
158
+ optional :transcription_engine_config, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]
159
+
160
+ # @!attribute tts_provider
161
+ # Text-to-speech provider. If omitted, Telnyx derives it from `voice` or
162
+ # `provider`.
100
163
  #
101
164
  # @return [String, nil]
102
- optional :transcription_language, String
165
+ optional :tts_provider, String
103
166
 
104
- # @!attribute tts_language
105
- # Language to use for text-to-speech. Overrides `language` for TTS when provided.
167
+ # @!attribute url
168
+ # Public alias for `conversation_relay_url`. Must start with `ws://` or `wss://`.
169
+ # If both are present, this value wins.
106
170
  #
107
171
  # @return [String, nil]
108
- optional :tts_language, String
172
+ optional :url, String
109
173
 
110
174
  # @!attribute voice
111
175
  # The voice to be used by the voice assistant. Currently we support ElevenLabs,
@@ -141,10 +205,10 @@ module Telnyx
141
205
  # @!attribute voice_settings
142
206
  # The settings associated with the voice selected
143
207
  #
144
- # @return [Telnyx::Models::Calls::ElevenLabsVoiceSettings, Telnyx::Models::Calls::TelnyxVoiceSettings, Telnyx::Models::Calls::AwsVoiceSettings, Telnyx::Models::AzureVoiceSettings, Telnyx::Models::RimeVoiceSettings, Telnyx::Models::ResembleVoiceSettings, Telnyx::Models::XaiVoiceSettings, nil]
208
+ # @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::Calls::ActionStartConversationRelayParams::VoiceSettings::Inworld, Telnyx::Models::XaiVoiceSettings, nil]
145
209
  optional :voice_settings, union: -> { Telnyx::Calls::ActionStartConversationRelayParams::VoiceSettings }
146
210
 
147
- # @!method initialize(call_control_id:, assistant: nil, client_state: nil, command_id: nil, conversation_relay_dtmf_detection: nil, conversation_relay_settings: nil, conversation_relay_url: nil, greeting: nil, interruption_settings: nil, language: nil, languages: nil, transcription: nil, transcription_language: nil, tts_language: nil, voice: nil, voice_settings: nil, request_options: {})
211
+ # @!method initialize(call_control_id:, assistant: nil, client_state: nil, command_id: nil, conversation_relay_dtmf_detection: nil, conversation_relay_settings: nil, conversation_relay_url: nil, 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: nil, transcription_engine: nil, transcription_engine_config: nil, tts_provider: nil, url: nil, voice: nil, voice_settings: nil, request_options: {})
148
212
  # Some parameter documentations has been truncated, see
149
213
  # {Telnyx::Models::Calls::ActionStartConversationRelayParams} for more details.
150
214
  #
@@ -158,27 +222,43 @@ module Telnyx
158
222
  #
159
223
  # @param conversation_relay_dtmf_detection [Boolean] Enable DTMF detection for the relay session.
160
224
  #
161
- # @param conversation_relay_settings [Telnyx::Models::Calls::ActionStartConversationRelayParams::ConversationRelaySettings] Conversation Relay connection settings. This object is used by TeXML Call Script
225
+ # @param conversation_relay_settings [Telnyx::Models::Calls::ActionStartConversationRelayParams::ConversationRelaySettings] Conversation Relay connection settings. This object can provide `url`, `dtmf_det
162
226
  #
163
227
  # @param conversation_relay_url [String] WebSocket URL for your Conversation Relay server. Must start with `ws://` or `ws
164
228
  #
229
+ # @param custom_parameters [Hash{Symbol=>Object}] Custom key-value parameters forwarded to the relay session as `assistant.dynamic
230
+ #
231
+ # @param dtmf_detection [Boolean] Public alias for `conversation_relay_dtmf_detection`. If both are present, this
232
+ #
165
233
  # @param greeting [String] Text played when the relay session starts.
166
234
  #
235
+ # @param interruptible [Symbol, Telnyx::Models::Calls::ActionStartConversationRelayParams::Interruptible] Controls when caller input can interrupt assistant speech. `any` allows speech o
236
+ #
237
+ # @param interruptible_greeting [Symbol, Telnyx::Models::Calls::ActionStartConversationRelayParams::InterruptibleGreeting] Controls when caller input can interrupt assistant speech. `any` allows speech o
238
+ #
167
239
  # @param interruption_settings [Telnyx::Models::Calls::ActionStartConversationRelayParams::InterruptionSettings] Settings for handling caller interruptions during Conversation Relay speech.
168
240
  #
169
241
  # @param language [String] Default language for the relay session. This value is used for both text-to-spee
170
242
  #
171
- # @param languages [Array<Telnyx::Models::Calls::ActionStartConversationRelayParams::Language>] Language-specific TTS and transcription settings. Use this when the relay sessio
243
+ # @param languages [Array<Telnyx::Models::Calls::ActionStartConversationRelayParams::Language>] Per-language TTS and transcription settings.
244
+ #
245
+ # @param provider [String] Structured voice provider. Must be supplied together with `structured_provider`.
246
+ #
247
+ # @param structured_provider [Hash{Symbol=>Object}] Provider-specific structured voice settings. Must be supplied together with `pro
172
248
  #
173
- # @param transcription [Telnyx::Models::Calls::ActionStartConversationRelayParams::Transcription] Speech-to-text settings for Conversation Relay.
249
+ # @param transcription [Hash{Symbol=>Object}] Not supported for Conversation Relay start requests. Use `transcription_engine`
174
250
  #
175
- # @param transcription_language [String] Language to use for speech recognition. Overrides `language` for transcription w
251
+ # @param transcription_engine [Symbol, Telnyx::Models::Calls::ActionStartConversationRelayParams::TranscriptionEngine] Engine to use for speech recognition. Legacy values `A` - `Google`, `B` - `Telny
176
252
  #
177
- # @param tts_language [String] Language to use for text-to-speech. Overrides `language` for TTS when provided.
253
+ # @param transcription_engine_config [Hash{Symbol=>Object}] Engine-specific transcription settings for Conversation Relay. This accepts the
254
+ #
255
+ # @param tts_provider [String] Text-to-speech provider. If omitted, Telnyx derives it from `voice` or `provider
256
+ #
257
+ # @param url [String] Public alias for `conversation_relay_url`. Must start with `ws://` or `wss://`.
178
258
  #
179
259
  # @param voice [String] The voice to be used by the voice assistant. Currently we support ElevenLabs, Te
180
260
  #
181
- # @param voice_settings [Telnyx::Models::Calls::ElevenLabsVoiceSettings, Telnyx::Models::Calls::TelnyxVoiceSettings, Telnyx::Models::Calls::AwsVoiceSettings, Telnyx::Models::AzureVoiceSettings, Telnyx::Models::RimeVoiceSettings, Telnyx::Models::ResembleVoiceSettings, Telnyx::Models::XaiVoiceSettings] The settings associated with the voice selected
261
+ # @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::Calls::ActionStartConversationRelayParams::VoiceSettings::Inworld, Telnyx::Models::XaiVoiceSettings] The settings associated with the voice selected
182
262
  #
183
263
  # @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}]
184
264
 
@@ -240,12 +320,9 @@ module Telnyx
240
320
  # {Telnyx::Models::Calls::ActionStartConversationRelayParams::ConversationRelaySettings}
241
321
  # for more details.
242
322
  #
243
- # Conversation Relay connection settings. This object is used by TeXML Call
244
- # Scripting's `<ConversationRelay>` verb. The `interruptible` and
245
- # `interruptible_greeting` fields are shorthand for
246
- # `interruption_settings.interruptible` and
247
- # `interruption_settings.interruptible_greeting`; use top-level
248
- # `interruption_settings` for the full interruption settings shape.
323
+ # Conversation Relay connection settings. This object can provide `url`,
324
+ # `dtmf_detection`, `interruptible`, `interruptible_greeting`, and `languages`.
325
+ # Top-level aliases override nested values when both are present.
249
326
  #
250
327
  # @param url [String] WebSocket URL for your Conversation Relay server. Must start with `ws://` or `ws
251
328
  #
@@ -292,26 +369,49 @@ module Telnyx
292
369
  end
293
370
 
294
371
  class Language < Telnyx::Internal::Type::BaseModel
295
- # @!attribute code
296
- # BCP 47 language code.
372
+ # @!attribute language
373
+ # BCP 47 language tag for this language configuration.
297
374
  #
298
- # @return [String, nil]
299
- optional :code, String
375
+ # @return [String]
376
+ required :language, String
300
377
 
301
378
  # @!attribute speech_model
302
- # Speech recognition model for this language.
379
+ # Conversation Relay speech model. Prefer
380
+ # `transcription_engine_config.transcription_model` when configuring
381
+ # speech-to-text.
303
382
  #
304
383
  # @return [String, nil]
305
384
  optional :speech_model, String
306
385
 
386
+ # @!attribute transcription_engine
387
+ # Engine to use for speech recognition. Legacy values `A` - `Google`, `B` -
388
+ # `Telnyx` are supported for backward compatibility. When provided in a
389
+ # Conversation Relay language entry, Telnyx derives `transcription_provider` and
390
+ # `speech_model` for that language.
391
+ #
392
+ # @return [Symbol, Telnyx::Models::Calls::ActionStartConversationRelayParams::ConversationRelaySettings::Language::TranscriptionEngine, nil]
393
+ optional :transcription_engine,
394
+ enum: -> { Telnyx::Calls::ActionStartConversationRelayParams::ConversationRelaySettings::Language::TranscriptionEngine }
395
+
396
+ # @!attribute transcription_engine_config
397
+ # Engine-specific transcription settings for Conversation Relay. This accepts the
398
+ # same provider-specific options used by the Call Transcription Start command,
399
+ # such as `transcription_model`, without requiring the engine discriminator to be
400
+ # repeated inside this object.
401
+ #
402
+ # @return [Hash{Symbol=>Object}, nil]
403
+ optional :transcription_engine_config, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]
404
+
307
405
  # @!attribute transcription_provider
308
- # Speech-to-text provider for this language.
406
+ # Conversation Relay transcription provider name. Prefer `transcription_engine`
407
+ # when configuring speech-to-text.
309
408
  #
310
409
  # @return [String, nil]
311
410
  optional :transcription_provider, String
312
411
 
313
412
  # @!attribute tts_provider
314
- # Text-to-speech provider for this language.
413
+ # Text-to-speech provider for this language. If omitted and `voice` is provided,
414
+ # Telnyx derives the provider from the voice identifier.
315
415
  #
316
416
  # @return [String, nil]
317
417
  optional :tts_provider, String
@@ -322,21 +422,134 @@ module Telnyx
322
422
  # @return [String, nil]
323
423
  optional :voice, String
324
424
 
325
- # @!method initialize(code: nil, speech_model: nil, transcription_provider: nil, tts_provider: nil, voice: nil)
326
- # Language-specific speech and transcription settings for Conversation Relay.
425
+ # @!attribute voice_settings
426
+ # The settings associated with the voice selected
427
+ #
428
+ # @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::Calls::ActionStartConversationRelayParams::ConversationRelaySettings::Language::VoiceSettings::Inworld, Telnyx::Models::XaiVoiceSettings, nil]
429
+ optional :voice_settings,
430
+ union: -> { Telnyx::Calls::ActionStartConversationRelayParams::ConversationRelaySettings::Language::VoiceSettings }
431
+
432
+ # @!method initialize(language:, speech_model: nil, transcription_engine: nil, transcription_engine_config: nil, transcription_provider: nil, tts_provider: nil, voice: nil, voice_settings: nil)
433
+ # Some parameter documentations has been truncated, see
434
+ # {Telnyx::Models::Calls::ActionStartConversationRelayParams::ConversationRelaySettings::Language}
435
+ # for more details.
436
+ #
437
+ # Language-specific TTS and transcription settings for Conversation Relay.
438
+ #
439
+ # @param language [String] BCP 47 language tag for this language configuration.
440
+ #
441
+ # @param speech_model [String] Conversation Relay speech model. Prefer `transcription_engine_config.transcripti
327
442
  #
328
- # @param code [String] BCP 47 language code.
443
+ # @param transcription_engine [Symbol, Telnyx::Models::Calls::ActionStartConversationRelayParams::ConversationRelaySettings::Language::TranscriptionEngine] Engine to use for speech recognition. Legacy values `A` - `Google`, `B` - `Telny
329
444
  #
330
- # @param speech_model [String] Speech recognition model for this language.
445
+ # @param transcription_engine_config [Hash{Symbol=>Object}] Engine-specific transcription settings for Conversation Relay. This accepts the
331
446
  #
332
- # @param transcription_provider [String] Speech-to-text provider for this language.
447
+ # @param transcription_provider [String] Conversation Relay transcription provider name. Prefer `transcription_engine` wh
333
448
  #
334
- # @param tts_provider [String] Text-to-speech provider for this language.
449
+ # @param tts_provider [String] Text-to-speech provider for this language. If omitted and `voice` is provided, T
335
450
  #
336
451
  # @param voice [String] Voice identifier for this language.
452
+ #
453
+ # @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::Calls::ActionStartConversationRelayParams::ConversationRelaySettings::Language::VoiceSettings::Inworld, Telnyx::Models::XaiVoiceSettings] The settings associated with the voice selected
454
+
455
+ # Engine to use for speech recognition. Legacy values `A` - `Google`, `B` -
456
+ # `Telnyx` are supported for backward compatibility. When provided in a
457
+ # Conversation Relay language entry, Telnyx derives `transcription_provider` and
458
+ # `speech_model` for that language.
459
+ #
460
+ # @see Telnyx::Models::Calls::ActionStartConversationRelayParams::ConversationRelaySettings::Language#transcription_engine
461
+ module TranscriptionEngine
462
+ extend Telnyx::Internal::Type::Enum
463
+
464
+ GOOGLE = :Google
465
+ TELNYX = :Telnyx
466
+ DEEPGRAM = :Deepgram
467
+ AZURE = :Azure
468
+ X_AI = :xAI
469
+ ASSEMBLY_AI = :AssemblyAI
470
+ SPEECHMATICS = :Speechmatics
471
+ SONIOX = :Soniox
472
+ A = :A
473
+ B = :B
474
+
475
+ # @!method self.values
476
+ # @return [Array<Symbol>]
477
+ end
478
+
479
+ # The settings associated with the voice selected
480
+ #
481
+ # @see Telnyx::Models::Calls::ActionStartConversationRelayParams::ConversationRelaySettings::Language#voice_settings
482
+ module VoiceSettings
483
+ extend Telnyx::Internal::Type::Union
484
+
485
+ discriminator :type
486
+
487
+ variant :elevenlabs, -> { Telnyx::Calls::ElevenLabsVoiceSettings }
488
+
489
+ variant :telnyx, -> { Telnyx::Calls::TelnyxVoiceSettings }
490
+
491
+ variant :aws, -> { Telnyx::Calls::AwsVoiceSettings }
492
+
493
+ variant :minimax, -> { Telnyx::MinimaxVoiceSettings }
494
+
495
+ variant :azure, -> { Telnyx::AzureVoiceSettings }
496
+
497
+ variant :rime, -> { Telnyx::RimeVoiceSettings }
498
+
499
+ variant :resemble, -> { Telnyx::ResembleVoiceSettings }
500
+
501
+ variant :inworld,
502
+ -> { Telnyx::Calls::ActionStartConversationRelayParams::ConversationRelaySettings::Language::VoiceSettings::Inworld }
503
+
504
+ variant :xai, -> { Telnyx::XaiVoiceSettings }
505
+
506
+ class Inworld < Telnyx::Internal::Type::BaseModel
507
+ # @!attribute type
508
+ # Voice settings provider type
509
+ #
510
+ # @return [Symbol, :inworld]
511
+ required :type, const: :inworld
512
+
513
+ # @!method initialize(type: :inworld)
514
+ # @param type [Symbol, :inworld] Voice settings provider type
515
+ end
516
+
517
+ # @!method self.variants
518
+ # @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::Calls::ActionStartConversationRelayParams::ConversationRelaySettings::Language::VoiceSettings::Inworld, Telnyx::Models::XaiVoiceSettings)]
519
+ end
337
520
  end
338
521
  end
339
522
 
523
+ # Controls when caller input can interrupt assistant speech. `any` allows speech
524
+ # or DTMF interruptions; `none` disables interruptions; `speech` allows speech
525
+ # only; `dtmf` allows DTMF only.
526
+ module Interruptible
527
+ extend Telnyx::Internal::Type::Enum
528
+
529
+ NONE = :none
530
+ ANY = :any
531
+ SPEECH = :speech
532
+ DTMF = :dtmf
533
+
534
+ # @!method self.values
535
+ # @return [Array<Symbol>]
536
+ end
537
+
538
+ # Controls when caller input can interrupt assistant speech. `any` allows speech
539
+ # or DTMF interruptions; `none` disables interruptions; `speech` allows speech
540
+ # only; `dtmf` allows DTMF only.
541
+ module InterruptibleGreeting
542
+ extend Telnyx::Internal::Type::Enum
543
+
544
+ NONE = :none
545
+ ANY = :any
546
+ SPEECH = :speech
547
+ DTMF = :dtmf
548
+
549
+ # @!method self.values
550
+ # @return [Array<Symbol>]
551
+ end
552
+
340
553
  class InterruptionSettings < Telnyx::Internal::Type::BaseModel
341
554
  # @!attribute enable
342
555
  # Legacy boolean form. `true` is equivalent to `interruptible=any`; `false` is
@@ -440,26 +653,49 @@ module Telnyx
440
653
  end
441
654
 
442
655
  class Language < Telnyx::Internal::Type::BaseModel
443
- # @!attribute code
444
- # BCP 47 language code.
656
+ # @!attribute language
657
+ # BCP 47 language tag for this language configuration.
445
658
  #
446
- # @return [String, nil]
447
- optional :code, String
659
+ # @return [String]
660
+ required :language, String
448
661
 
449
662
  # @!attribute speech_model
450
- # Speech recognition model for this language.
663
+ # Conversation Relay speech model. Prefer
664
+ # `transcription_engine_config.transcription_model` when configuring
665
+ # speech-to-text.
451
666
  #
452
667
  # @return [String, nil]
453
668
  optional :speech_model, String
454
669
 
670
+ # @!attribute transcription_engine
671
+ # Engine to use for speech recognition. Legacy values `A` - `Google`, `B` -
672
+ # `Telnyx` are supported for backward compatibility. When provided in a
673
+ # Conversation Relay language entry, Telnyx derives `transcription_provider` and
674
+ # `speech_model` for that language.
675
+ #
676
+ # @return [Symbol, Telnyx::Models::Calls::ActionStartConversationRelayParams::Language::TranscriptionEngine, nil]
677
+ optional :transcription_engine,
678
+ enum: -> { Telnyx::Calls::ActionStartConversationRelayParams::Language::TranscriptionEngine }
679
+
680
+ # @!attribute transcription_engine_config
681
+ # Engine-specific transcription settings for Conversation Relay. This accepts the
682
+ # same provider-specific options used by the Call Transcription Start command,
683
+ # such as `transcription_model`, without requiring the engine discriminator to be
684
+ # repeated inside this object.
685
+ #
686
+ # @return [Hash{Symbol=>Object}, nil]
687
+ optional :transcription_engine_config, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]
688
+
455
689
  # @!attribute transcription_provider
456
- # Speech-to-text provider for this language.
690
+ # Conversation Relay transcription provider name. Prefer `transcription_engine`
691
+ # when configuring speech-to-text.
457
692
  #
458
693
  # @return [String, nil]
459
694
  optional :transcription_provider, String
460
695
 
461
696
  # @!attribute tts_provider
462
- # Text-to-speech provider for this language.
697
+ # Text-to-speech provider for this language. If omitted and `voice` is provided,
698
+ # Telnyx derives the provider from the voice identifier.
463
699
  #
464
700
  # @return [String, nil]
465
701
  optional :tts_provider, String
@@ -470,47 +706,123 @@ module Telnyx
470
706
  # @return [String, nil]
471
707
  optional :voice, String
472
708
 
473
- # @!method initialize(code: nil, speech_model: nil, transcription_provider: nil, tts_provider: nil, voice: nil)
474
- # Language-specific speech and transcription settings for Conversation Relay.
709
+ # @!attribute voice_settings
710
+ # The settings associated with the voice selected
475
711
  #
476
- # @param code [String] BCP 47 language code.
712
+ # @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::Calls::ActionStartConversationRelayParams::Language::VoiceSettings::Inworld, Telnyx::Models::XaiVoiceSettings, nil]
713
+ optional :voice_settings,
714
+ union: -> { Telnyx::Calls::ActionStartConversationRelayParams::Language::VoiceSettings }
715
+
716
+ # @!method initialize(language:, speech_model: nil, transcription_engine: nil, transcription_engine_config: nil, transcription_provider: nil, tts_provider: nil, voice: nil, voice_settings: nil)
717
+ # Some parameter documentations has been truncated, see
718
+ # {Telnyx::Models::Calls::ActionStartConversationRelayParams::Language} for more
719
+ # details.
477
720
  #
478
- # @param speech_model [String] Speech recognition model for this language.
721
+ # Language-specific TTS and transcription settings for Conversation Relay.
479
722
  #
480
- # @param transcription_provider [String] Speech-to-text provider for this language.
723
+ # @param language [String] BCP 47 language tag for this language configuration.
481
724
  #
482
- # @param tts_provider [String] Text-to-speech provider for this language.
725
+ # @param speech_model [String] Conversation Relay speech model. Prefer `transcription_engine_config.transcripti
726
+ #
727
+ # @param transcription_engine [Symbol, Telnyx::Models::Calls::ActionStartConversationRelayParams::Language::TranscriptionEngine] Engine to use for speech recognition. Legacy values `A` - `Google`, `B` - `Telny
728
+ #
729
+ # @param transcription_engine_config [Hash{Symbol=>Object}] Engine-specific transcription settings for Conversation Relay. This accepts the
730
+ #
731
+ # @param transcription_provider [String] Conversation Relay transcription provider name. Prefer `transcription_engine` wh
732
+ #
733
+ # @param tts_provider [String] Text-to-speech provider for this language. If omitted and `voice` is provided, T
483
734
  #
484
735
  # @param voice [String] Voice identifier for this language.
485
- end
486
-
487
- class Transcription < Telnyx::Internal::Type::BaseModel
488
- # @!attribute language
489
- # Transcription language.
490
736
  #
491
- # @return [String, nil]
492
- optional :language, String
737
+ # @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::Calls::ActionStartConversationRelayParams::Language::VoiceSettings::Inworld, Telnyx::Models::XaiVoiceSettings] The settings associated with the voice selected
493
738
 
494
- # @!attribute model
495
- # Transcription model to use.
739
+ # Engine to use for speech recognition. Legacy values `A` - `Google`, `B` -
740
+ # `Telnyx` are supported for backward compatibility. When provided in a
741
+ # Conversation Relay language entry, Telnyx derives `transcription_provider` and
742
+ # `speech_model` for that language.
496
743
  #
497
- # @return [String, nil]
498
- optional :model, String
744
+ # @see Telnyx::Models::Calls::ActionStartConversationRelayParams::Language#transcription_engine
745
+ module TranscriptionEngine
746
+ extend Telnyx::Internal::Type::Enum
499
747
 
500
- # @!attribute provider
501
- # Transcription provider to use.
502
- #
503
- # @return [String, nil]
504
- optional :provider, String
748
+ GOOGLE = :Google
749
+ TELNYX = :Telnyx
750
+ DEEPGRAM = :Deepgram
751
+ AZURE = :Azure
752
+ X_AI = :xAI
753
+ ASSEMBLY_AI = :AssemblyAI
754
+ SPEECHMATICS = :Speechmatics
755
+ SONIOX = :Soniox
756
+ A = :A
757
+ B = :B
505
758
 
506
- # @!method initialize(language: nil, model: nil, provider: nil)
507
- # Speech-to-text settings for Conversation Relay.
508
- #
509
- # @param language [String] Transcription language.
510
- #
511
- # @param model [String] Transcription model to use.
759
+ # @!method self.values
760
+ # @return [Array<Symbol>]
761
+ end
762
+
763
+ # The settings associated with the voice selected
512
764
  #
513
- # @param provider [String] Transcription provider to use.
765
+ # @see Telnyx::Models::Calls::ActionStartConversationRelayParams::Language#voice_settings
766
+ module VoiceSettings
767
+ extend Telnyx::Internal::Type::Union
768
+
769
+ discriminator :type
770
+
771
+ variant :elevenlabs, -> { Telnyx::Calls::ElevenLabsVoiceSettings }
772
+
773
+ variant :telnyx, -> { Telnyx::Calls::TelnyxVoiceSettings }
774
+
775
+ variant :aws, -> { Telnyx::Calls::AwsVoiceSettings }
776
+
777
+ variant :minimax, -> { Telnyx::MinimaxVoiceSettings }
778
+
779
+ variant :azure, -> { Telnyx::AzureVoiceSettings }
780
+
781
+ variant :rime, -> { Telnyx::RimeVoiceSettings }
782
+
783
+ variant :resemble, -> { Telnyx::ResembleVoiceSettings }
784
+
785
+ variant :inworld,
786
+ -> { Telnyx::Calls::ActionStartConversationRelayParams::Language::VoiceSettings::Inworld }
787
+
788
+ variant :xai, -> { Telnyx::XaiVoiceSettings }
789
+
790
+ class Inworld < Telnyx::Internal::Type::BaseModel
791
+ # @!attribute type
792
+ # Voice settings provider type
793
+ #
794
+ # @return [Symbol, :inworld]
795
+ required :type, const: :inworld
796
+
797
+ # @!method initialize(type: :inworld)
798
+ # @param type [Symbol, :inworld] Voice settings provider type
799
+ end
800
+
801
+ # @!method self.variants
802
+ # @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::Calls::ActionStartConversationRelayParams::Language::VoiceSettings::Inworld, Telnyx::Models::XaiVoiceSettings)]
803
+ end
804
+ end
805
+
806
+ # Engine to use for speech recognition. Legacy values `A` - `Google`, `B` -
807
+ # `Telnyx` are supported for backward compatibility. For Conversation Relay, use
808
+ # this field with `transcription_engine_config`; the `transcription` object is not
809
+ # supported.
810
+ module TranscriptionEngine
811
+ extend Telnyx::Internal::Type::Enum
812
+
813
+ GOOGLE = :Google
814
+ TELNYX = :Telnyx
815
+ DEEPGRAM = :Deepgram
816
+ AZURE = :Azure
817
+ X_AI = :xAI
818
+ ASSEMBLY_AI = :AssemblyAI
819
+ SPEECHMATICS = :Speechmatics
820
+ SONIOX = :Soniox
821
+ A = :A
822
+ B = :B
823
+
824
+ # @!method self.values
825
+ # @return [Array<Symbol>]
514
826
  end
515
827
 
516
828
  # The settings associated with the voice selected
@@ -525,16 +837,31 @@ module Telnyx
525
837
 
526
838
  variant :aws, -> { Telnyx::Calls::AwsVoiceSettings }
527
839
 
840
+ variant :minimax, -> { Telnyx::MinimaxVoiceSettings }
841
+
528
842
  variant :azure, -> { Telnyx::AzureVoiceSettings }
529
843
 
530
844
  variant :rime, -> { Telnyx::RimeVoiceSettings }
531
845
 
532
846
  variant :resemble, -> { Telnyx::ResembleVoiceSettings }
533
847
 
848
+ variant :inworld, -> { Telnyx::Calls::ActionStartConversationRelayParams::VoiceSettings::Inworld }
849
+
534
850
  variant :xai, -> { Telnyx::XaiVoiceSettings }
535
851
 
852
+ class Inworld < Telnyx::Internal::Type::BaseModel
853
+ # @!attribute type
854
+ # Voice settings provider type
855
+ #
856
+ # @return [Symbol, :inworld]
857
+ required :type, const: :inworld
858
+
859
+ # @!method initialize(type: :inworld)
860
+ # @param type [Symbol, :inworld] Voice settings provider type
861
+ end
862
+
536
863
  # @!method self.variants
537
- # @return [Array(Telnyx::Models::Calls::ElevenLabsVoiceSettings, Telnyx::Models::Calls::TelnyxVoiceSettings, Telnyx::Models::Calls::AwsVoiceSettings, Telnyx::Models::AzureVoiceSettings, Telnyx::Models::RimeVoiceSettings, Telnyx::Models::ResembleVoiceSettings, Telnyx::Models::XaiVoiceSettings)]
864
+ # @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::Calls::ActionStartConversationRelayParams::VoiceSettings::Inworld, Telnyx::Models::XaiVoiceSettings)]
538
865
  end
539
866
  end
540
867
  end