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.
@@ -42,6 +42,17 @@ module Telnyx
42
42
  # @return [String, nil]
43
43
  optional :command_id, String
44
44
 
45
+ # @!attribute conversation_relay_config
46
+ # Starts a Conversation Relay session automatically when the answered/dialed call
47
+ # is answered. This embedded shape is supported on `answer` and `dial`. It uses
48
+ # public field names (`url`, `dtmf_detection`, `greeting`, `voice`, `language`,
49
+ # etc.) and maps them to the underlying Conversation Relay action. `client_state`,
50
+ # `tts_language`, and `transcription_language` inside this object are ignored; use
51
+ # the parent command's `client_state` and `command_id` fields instead.
52
+ #
53
+ # @return [Telnyx::Models::Calls::ActionAnswerParams::ConversationRelayConfig, nil]
54
+ optional :conversation_relay_config, -> { Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig }
55
+
45
56
  # @!attribute custom_headers
46
57
  # Custom headers to be added to the SIP INVITE response.
47
58
  #
@@ -227,7 +238,7 @@ module Telnyx
227
238
  # @return [Symbol, Telnyx::Models::Calls::ActionAnswerParams::WebhookURLsMethod, nil]
228
239
  optional :webhook_urls_method, enum: -> { Telnyx::Calls::ActionAnswerParams::WebhookURLsMethod }
229
240
 
230
- # @!method initialize(call_control_id:, assistant: nil, billing_group_id: nil, client_state: nil, command_id: nil, custom_headers: nil, deepfake_detection: nil, preferred_codecs: 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_silence_when_idle: nil, sip_headers: nil, sound_modifications: nil, stream_bidirectional_codec: nil, stream_bidirectional_mode: nil, stream_bidirectional_target_legs: nil, stream_codec: nil, stream_track: nil, stream_url: 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: {})
241
+ # @!method initialize(call_control_id:, assistant: nil, billing_group_id: nil, client_state: nil, command_id: nil, conversation_relay_config: nil, custom_headers: nil, deepfake_detection: nil, preferred_codecs: 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_silence_when_idle: nil, sip_headers: nil, sound_modifications: nil, stream_bidirectional_codec: nil, stream_bidirectional_mode: nil, stream_bidirectional_target_legs: nil, stream_codec: nil, stream_track: nil, stream_url: 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: {})
231
242
  # Some parameter documentations has been truncated, see
232
243
  # {Telnyx::Models::Calls::ActionAnswerParams} for more details.
233
244
  #
@@ -241,6 +252,8 @@ module Telnyx
241
252
  #
242
253
  # @param command_id [String] Use this field to avoid duplicate commands. Telnyx will ignore any command with
243
254
  #
255
+ # @param conversation_relay_config [Telnyx::Models::Calls::ActionAnswerParams::ConversationRelayConfig] Starts a Conversation Relay session automatically when the answered/dialed call
256
+ #
244
257
  # @param custom_headers [Array<Telnyx::Models::CustomSipHeader>] Custom headers to be added to the SIP INVITE response.
245
258
  #
246
259
  # @param deepfake_detection [Telnyx::Models::Calls::ActionAnswerParams::DeepfakeDetection] Enables deepfake detection on the call. When enabled, audio from the remote part
@@ -298,6 +311,548 @@ module Telnyx
298
311
  #
299
312
  # @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}]
300
313
 
314
+ class ConversationRelayConfig < Telnyx::Internal::Type::BaseModel
315
+ # @!attribute url
316
+ # WebSocket URL for your Conversation Relay server. Must start with `ws://` or
317
+ # `wss://`.
318
+ #
319
+ # @return [String]
320
+ required :url, String
321
+
322
+ # @!attribute custom_parameters
323
+ # Custom key-value parameters forwarded to the relay session as assistant dynamic
324
+ # variables.
325
+ #
326
+ # @return [Hash{Symbol=>Object}, nil]
327
+ optional :custom_parameters, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]
328
+
329
+ # @!attribute dtmf_detection
330
+ # Enable DTMF detection for the relay session.
331
+ #
332
+ # @return [Boolean, nil]
333
+ optional :dtmf_detection, Telnyx::Internal::Type::Boolean
334
+
335
+ # @!attribute greeting
336
+ # Text played when the relay session starts.
337
+ #
338
+ # @return [String, nil]
339
+ optional :greeting, String
340
+
341
+ # @!attribute interruptible
342
+ # Controls when caller input can interrupt assistant speech. `any` allows speech
343
+ # or DTMF interruptions; `none` disables interruptions; `speech` allows speech
344
+ # only; `dtmf` allows DTMF only.
345
+ #
346
+ # @return [Symbol, Telnyx::Models::Calls::ActionAnswerParams::ConversationRelayConfig::Interruptible, nil]
347
+ optional :interruptible,
348
+ enum: -> { Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::Interruptible }
349
+
350
+ # @!attribute interruptible_greeting
351
+ # Controls when caller input can interrupt assistant speech. `any` allows speech
352
+ # or DTMF interruptions; `none` disables interruptions; `speech` allows speech
353
+ # only; `dtmf` allows DTMF only.
354
+ #
355
+ # @return [Symbol, Telnyx::Models::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptibleGreeting, nil]
356
+ optional :interruptible_greeting,
357
+ enum: -> { Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptibleGreeting }
358
+
359
+ # @!attribute interruption_settings
360
+ # Settings for handling caller interruptions during Conversation Relay speech.
361
+ #
362
+ # @return [Telnyx::Models::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptionSettings, nil]
363
+ optional :interruption_settings,
364
+ -> { Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptionSettings }
365
+
366
+ # @!attribute language
367
+ # Default language for both text-to-speech and speech recognition.
368
+ #
369
+ # @return [String, nil]
370
+ optional :language, String
371
+
372
+ # @!attribute languages
373
+ # Per-language TTS and transcription settings.
374
+ #
375
+ # @return [Array<Telnyx::Models::Calls::ActionAnswerParams::ConversationRelayConfig::Language>, nil]
376
+ optional :languages,
377
+ -> { Telnyx::Internal::Type::ArrayOf[Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::Language] }
378
+
379
+ # @!attribute provider
380
+ # Structured voice provider. Must be supplied together with `structured_provider`.
381
+ #
382
+ # @return [String, nil]
383
+ optional :provider, String
384
+
385
+ # @!attribute structured_provider
386
+ # Provider-specific structured voice settings. Must be supplied together with
387
+ # `provider`; Telnyx sends the value as the nested provider configuration for
388
+ # Conversation Relay.
389
+ #
390
+ # @return [Hash{Symbol=>Object}, nil]
391
+ optional :structured_provider, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]
392
+
393
+ # @!attribute transcription_engine
394
+ # Engine to use for speech recognition. Legacy values `A` - `Google`, `B` -
395
+ # `Telnyx` are supported for backward compatibility. For Conversation Relay, use
396
+ # this field with `transcription_engine_config`; the `transcription` object is not
397
+ # supported.
398
+ #
399
+ # @return [Symbol, Telnyx::Models::Calls::ActionAnswerParams::ConversationRelayConfig::TranscriptionEngine, nil]
400
+ optional :transcription_engine,
401
+ enum: -> { Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::TranscriptionEngine }
402
+
403
+ # @!attribute transcription_engine_config
404
+ # Engine-specific transcription settings for Conversation Relay. This accepts the
405
+ # same provider-specific options used by the Call Transcription Start command,
406
+ # such as `transcription_model`, without requiring the engine discriminator to be
407
+ # repeated inside this object.
408
+ #
409
+ # @return [Hash{Symbol=>Object}, nil]
410
+ optional :transcription_engine_config, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]
411
+
412
+ # @!attribute tts_provider
413
+ # Text-to-speech provider. If omitted, Telnyx derives it from `voice` or
414
+ # `provider`.
415
+ #
416
+ # @return [String, nil]
417
+ optional :tts_provider, String
418
+
419
+ # @!attribute voice
420
+ # The voice to be used by the voice assistant. Currently we support ElevenLabs,
421
+ # Telnyx and AWS voices.
422
+ #
423
+ # **Supported Providers:**
424
+ #
425
+ # - **AWS:** Use `AWS.Polly.<VoiceId>` (e.g., `AWS.Polly.Joanna`). For neural
426
+ # voices, which provide more realistic, human-like speech, append `-Neural` to
427
+ # the `VoiceId` (e.g., `AWS.Polly.Joanna-Neural`). Check the
428
+ # [available voices](https://docs.aws.amazon.com/polly/latest/dg/available-voices.html)
429
+ # for compatibility.
430
+ # - **Azure:** Use `Azure.<VoiceId>. (e.g. Azure.en-CA-ClaraNeural,
431
+ # Azure.en-CA-LiamNeural, Azure.en-US-BrianMultilingualNeural,
432
+ # Azure.en-US-Ava:DragonHDLatestNeural. For a complete list of voices, go to
433
+ # [Azure Voice Gallery](https://speech.microsoft.com/portal/voicegallery).)
434
+ # - **ElevenLabs:** Use `ElevenLabs.<ModelId>.<VoiceId>` (e.g.,
435
+ # `ElevenLabs.BaseModel.John`). The `ModelId` part is optional. To use
436
+ # ElevenLabs, you must provide your ElevenLabs API key as an integration secret
437
+ # under `"voice_settings": {"api_key_ref": "<secret_id>"}`. See
438
+ # [integration secrets documentation](https://developers.telnyx.com/api/secrets-manager/integration-secrets/create-integration-secret)
439
+ # for details. Check
440
+ # [available voices](https://elevenlabs.io/docs/api-reference/get-voices).
441
+ # - **Telnyx:** Use `Telnyx.<model_id>.<voice_id>`
442
+ # - **Inworld:** Use `Inworld.<ModelId>.<VoiceId>` (e.g., `Inworld.Mini.Loretta`,
443
+ # `Inworld.Max.Oliver`). Supported models: `Mini`, `Max`.
444
+ # - **xAI:** Use `xAI.<VoiceId>` (e.g., `xAI.eve`). Available voices: `eve`,
445
+ # `ara`, `rex`, `sal`, `leo`.
446
+ #
447
+ # @return [String, nil]
448
+ optional :voice, String
449
+
450
+ # @!attribute voice_settings
451
+ # The settings associated with the voice selected
452
+ #
453
+ # @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::ActionAnswerParams::ConversationRelayConfig::VoiceSettings::Inworld, Telnyx::Models::XaiVoiceSettings, nil]
454
+ optional :voice_settings,
455
+ union: -> { Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::VoiceSettings }
456
+
457
+ # @!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)
458
+ # Some parameter documentations has been truncated, see
459
+ # {Telnyx::Models::Calls::ActionAnswerParams::ConversationRelayConfig} for more
460
+ # details.
461
+ #
462
+ # Starts a Conversation Relay session automatically when the answered/dialed call
463
+ # is answered. This embedded shape is supported on `answer` and `dial`. It uses
464
+ # public field names (`url`, `dtmf_detection`, `greeting`, `voice`, `language`,
465
+ # etc.) and maps them to the underlying Conversation Relay action. `client_state`,
466
+ # `tts_language`, and `transcription_language` inside this object are ignored; use
467
+ # the parent command's `client_state` and `command_id` fields instead.
468
+ #
469
+ # @param url [String] WebSocket URL for your Conversation Relay server. Must start with `ws://` or `ws
470
+ #
471
+ # @param custom_parameters [Hash{Symbol=>Object}] Custom key-value parameters forwarded to the relay session as assistant dynamic
472
+ #
473
+ # @param dtmf_detection [Boolean] Enable DTMF detection for the relay session.
474
+ #
475
+ # @param greeting [String] Text played when the relay session starts.
476
+ #
477
+ # @param interruptible [Symbol, Telnyx::Models::Calls::ActionAnswerParams::ConversationRelayConfig::Interruptible] Controls when caller input can interrupt assistant speech. `any` allows speech o
478
+ #
479
+ # @param interruptible_greeting [Symbol, Telnyx::Models::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptibleGreeting] Controls when caller input can interrupt assistant speech. `any` allows speech o
480
+ #
481
+ # @param interruption_settings [Telnyx::Models::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptionSettings] Settings for handling caller interruptions during Conversation Relay speech.
482
+ #
483
+ # @param language [String] Default language for both text-to-speech and speech recognition.
484
+ #
485
+ # @param languages [Array<Telnyx::Models::Calls::ActionAnswerParams::ConversationRelayConfig::Language>] Per-language TTS and transcription settings.
486
+ #
487
+ # @param provider [String] Structured voice provider. Must be supplied together with `structured_provider`.
488
+ #
489
+ # @param structured_provider [Hash{Symbol=>Object}] Provider-specific structured voice settings. Must be supplied together with `pro
490
+ #
491
+ # @param transcription_engine [Symbol, Telnyx::Models::Calls::ActionAnswerParams::ConversationRelayConfig::TranscriptionEngine] Engine to use for speech recognition. Legacy values `A` - `Google`, `B` - `Telny
492
+ #
493
+ # @param transcription_engine_config [Hash{Symbol=>Object}] Engine-specific transcription settings for Conversation Relay. This accepts the
494
+ #
495
+ # @param tts_provider [String] Text-to-speech provider. If omitted, Telnyx derives it from `voice` or `provider
496
+ #
497
+ # @param voice [String] The voice to be used by the voice assistant. Currently we support ElevenLabs, Te
498
+ #
499
+ # @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::ActionAnswerParams::ConversationRelayConfig::VoiceSettings::Inworld, Telnyx::Models::XaiVoiceSettings] The settings associated with the voice selected
500
+
501
+ # Controls when caller input can interrupt assistant speech. `any` allows speech
502
+ # or DTMF interruptions; `none` disables interruptions; `speech` allows speech
503
+ # only; `dtmf` allows DTMF only.
504
+ #
505
+ # @see Telnyx::Models::Calls::ActionAnswerParams::ConversationRelayConfig#interruptible
506
+ module Interruptible
507
+ extend Telnyx::Internal::Type::Enum
508
+
509
+ NONE = :none
510
+ ANY = :any
511
+ SPEECH = :speech
512
+ DTMF = :dtmf
513
+
514
+ # @!method self.values
515
+ # @return [Array<Symbol>]
516
+ end
517
+
518
+ # Controls when caller input can interrupt assistant speech. `any` allows speech
519
+ # or DTMF interruptions; `none` disables interruptions; `speech` allows speech
520
+ # only; `dtmf` allows DTMF only.
521
+ #
522
+ # @see Telnyx::Models::Calls::ActionAnswerParams::ConversationRelayConfig#interruptible_greeting
523
+ module InterruptibleGreeting
524
+ extend Telnyx::Internal::Type::Enum
525
+
526
+ NONE = :none
527
+ ANY = :any
528
+ SPEECH = :speech
529
+ DTMF = :dtmf
530
+
531
+ # @!method self.values
532
+ # @return [Array<Symbol>]
533
+ end
534
+
535
+ # @see Telnyx::Models::Calls::ActionAnswerParams::ConversationRelayConfig#interruption_settings
536
+ class InterruptionSettings < Telnyx::Internal::Type::BaseModel
537
+ # @!attribute enable
538
+ # Legacy boolean form. `true` is equivalent to `interruptible=any`; `false` is
539
+ # equivalent to `interruptible=none`.
540
+ #
541
+ # @return [Boolean, nil]
542
+ optional :enable, Telnyx::Internal::Type::Boolean
543
+
544
+ # @!attribute interruptible
545
+ # Controls when caller input can interrupt assistant speech. `any` allows speech
546
+ # or DTMF interruptions; `none` disables interruptions; `speech` allows speech
547
+ # only; `dtmf` allows DTMF only.
548
+ #
549
+ # @return [Symbol, Telnyx::Models::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptionSettings::Interruptible, nil]
550
+ optional :interruptible,
551
+ enum: -> { Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptionSettings::Interruptible }
552
+
553
+ # @!attribute interruptible_greeting
554
+ # Controls when caller input can interrupt assistant speech. `any` allows speech
555
+ # or DTMF interruptions; `none` disables interruptions; `speech` allows speech
556
+ # only; `dtmf` allows DTMF only.
557
+ #
558
+ # @return [Symbol, Telnyx::Models::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptionSettings::InterruptibleGreeting, nil]
559
+ optional :interruptible_greeting,
560
+ enum: -> { Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptionSettings::InterruptibleGreeting }
561
+
562
+ # @!attribute welcome_greeting_interruptible
563
+ # Controls when caller input can interrupt assistant speech. `any` allows speech
564
+ # or DTMF interruptions; `none` disables interruptions; `speech` allows speech
565
+ # only; `dtmf` allows DTMF only.
566
+ #
567
+ # @return [Symbol, Telnyx::Models::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptionSettings::WelcomeGreetingInterruptible, nil]
568
+ optional :welcome_greeting_interruptible,
569
+ enum: -> { Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptionSettings::WelcomeGreetingInterruptible }
570
+
571
+ # @!method initialize(enable: nil, interruptible: nil, interruptible_greeting: nil, welcome_greeting_interruptible: nil)
572
+ # Some parameter documentations has been truncated, see
573
+ # {Telnyx::Models::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptionSettings}
574
+ # for more details.
575
+ #
576
+ # Settings for handling caller interruptions during Conversation Relay speech.
577
+ #
578
+ # @param enable [Boolean] Legacy boolean form. `true` is equivalent to `interruptible=any`; `false` is equ
579
+ #
580
+ # @param interruptible [Symbol, Telnyx::Models::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptionSettings::Interruptible] Controls when caller input can interrupt assistant speech. `any` allows speech o
581
+ #
582
+ # @param interruptible_greeting [Symbol, Telnyx::Models::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptionSettings::InterruptibleGreeting] Controls when caller input can interrupt assistant speech. `any` allows speech o
583
+ #
584
+ # @param welcome_greeting_interruptible [Symbol, Telnyx::Models::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptionSettings::WelcomeGreetingInterruptible] Controls when caller input can interrupt assistant speech. `any` allows speech o
585
+
586
+ # Controls when caller input can interrupt assistant speech. `any` allows speech
587
+ # or DTMF interruptions; `none` disables interruptions; `speech` allows speech
588
+ # only; `dtmf` allows DTMF only.
589
+ #
590
+ # @see Telnyx::Models::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptionSettings#interruptible
591
+ module Interruptible
592
+ extend Telnyx::Internal::Type::Enum
593
+
594
+ NONE = :none
595
+ ANY = :any
596
+ SPEECH = :speech
597
+ DTMF = :dtmf
598
+
599
+ # @!method self.values
600
+ # @return [Array<Symbol>]
601
+ end
602
+
603
+ # Controls when caller input can interrupt assistant speech. `any` allows speech
604
+ # or DTMF interruptions; `none` disables interruptions; `speech` allows speech
605
+ # only; `dtmf` allows DTMF only.
606
+ #
607
+ # @see Telnyx::Models::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptionSettings#interruptible_greeting
608
+ module InterruptibleGreeting
609
+ extend Telnyx::Internal::Type::Enum
610
+
611
+ NONE = :none
612
+ ANY = :any
613
+ SPEECH = :speech
614
+ DTMF = :dtmf
615
+
616
+ # @!method self.values
617
+ # @return [Array<Symbol>]
618
+ end
619
+
620
+ # Controls when caller input can interrupt assistant speech. `any` allows speech
621
+ # or DTMF interruptions; `none` disables interruptions; `speech` allows speech
622
+ # only; `dtmf` allows DTMF only.
623
+ #
624
+ # @see Telnyx::Models::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptionSettings#welcome_greeting_interruptible
625
+ module WelcomeGreetingInterruptible
626
+ extend Telnyx::Internal::Type::Enum
627
+
628
+ NONE = :none
629
+ ANY = :any
630
+ SPEECH = :speech
631
+ DTMF = :dtmf
632
+
633
+ # @!method self.values
634
+ # @return [Array<Symbol>]
635
+ end
636
+ end
637
+
638
+ class Language < Telnyx::Internal::Type::BaseModel
639
+ # @!attribute language
640
+ # BCP 47 language tag for this language configuration.
641
+ #
642
+ # @return [String]
643
+ required :language, String
644
+
645
+ # @!attribute speech_model
646
+ # Conversation Relay speech model. Prefer
647
+ # `transcription_engine_config.transcription_model` when configuring
648
+ # speech-to-text.
649
+ #
650
+ # @return [String, nil]
651
+ optional :speech_model, String
652
+
653
+ # @!attribute transcription_engine
654
+ # Engine to use for speech recognition. Legacy values `A` - `Google`, `B` -
655
+ # `Telnyx` are supported for backward compatibility. When provided in a
656
+ # Conversation Relay language entry, Telnyx derives `transcription_provider` and
657
+ # `speech_model` for that language.
658
+ #
659
+ # @return [Symbol, Telnyx::Models::Calls::ActionAnswerParams::ConversationRelayConfig::Language::TranscriptionEngine, nil]
660
+ optional :transcription_engine,
661
+ enum: -> { Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::Language::TranscriptionEngine }
662
+
663
+ # @!attribute transcription_engine_config
664
+ # Engine-specific transcription settings for Conversation Relay. This accepts the
665
+ # same provider-specific options used by the Call Transcription Start command,
666
+ # such as `transcription_model`, without requiring the engine discriminator to be
667
+ # repeated inside this object.
668
+ #
669
+ # @return [Hash{Symbol=>Object}, nil]
670
+ optional :transcription_engine_config, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]
671
+
672
+ # @!attribute transcription_provider
673
+ # Conversation Relay transcription provider name. Prefer `transcription_engine`
674
+ # when configuring speech-to-text.
675
+ #
676
+ # @return [String, nil]
677
+ optional :transcription_provider, String
678
+
679
+ # @!attribute tts_provider
680
+ # Text-to-speech provider for this language. If omitted and `voice` is provided,
681
+ # Telnyx derives the provider from the voice identifier.
682
+ #
683
+ # @return [String, nil]
684
+ optional :tts_provider, String
685
+
686
+ # @!attribute voice
687
+ # Voice identifier for this language.
688
+ #
689
+ # @return [String, nil]
690
+ optional :voice, String
691
+
692
+ # @!attribute voice_settings
693
+ # The settings associated with the voice selected
694
+ #
695
+ # @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::ActionAnswerParams::ConversationRelayConfig::Language::VoiceSettings::Inworld, Telnyx::Models::XaiVoiceSettings, nil]
696
+ optional :voice_settings,
697
+ union: -> { Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::Language::VoiceSettings }
698
+
699
+ # @!method initialize(language:, speech_model: nil, transcription_engine: nil, transcription_engine_config: nil, transcription_provider: nil, tts_provider: nil, voice: nil, voice_settings: nil)
700
+ # Some parameter documentations has been truncated, see
701
+ # {Telnyx::Models::Calls::ActionAnswerParams::ConversationRelayConfig::Language}
702
+ # for more details.
703
+ #
704
+ # Language-specific TTS and transcription settings for Conversation Relay.
705
+ #
706
+ # @param language [String] BCP 47 language tag for this language configuration.
707
+ #
708
+ # @param speech_model [String] Conversation Relay speech model. Prefer `transcription_engine_config.transcripti
709
+ #
710
+ # @param transcription_engine [Symbol, Telnyx::Models::Calls::ActionAnswerParams::ConversationRelayConfig::Language::TranscriptionEngine] Engine to use for speech recognition. Legacy values `A` - `Google`, `B` - `Telny
711
+ #
712
+ # @param transcription_engine_config [Hash{Symbol=>Object}] Engine-specific transcription settings for Conversation Relay. This accepts the
713
+ #
714
+ # @param transcription_provider [String] Conversation Relay transcription provider name. Prefer `transcription_engine` wh
715
+ #
716
+ # @param tts_provider [String] Text-to-speech provider for this language. If omitted and `voice` is provided, T
717
+ #
718
+ # @param voice [String] Voice identifier for this language.
719
+ #
720
+ # @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::ActionAnswerParams::ConversationRelayConfig::Language::VoiceSettings::Inworld, Telnyx::Models::XaiVoiceSettings] The settings associated with the voice selected
721
+
722
+ # Engine to use for speech recognition. Legacy values `A` - `Google`, `B` -
723
+ # `Telnyx` are supported for backward compatibility. When provided in a
724
+ # Conversation Relay language entry, Telnyx derives `transcription_provider` and
725
+ # `speech_model` for that language.
726
+ #
727
+ # @see Telnyx::Models::Calls::ActionAnswerParams::ConversationRelayConfig::Language#transcription_engine
728
+ module TranscriptionEngine
729
+ extend Telnyx::Internal::Type::Enum
730
+
731
+ GOOGLE = :Google
732
+ TELNYX = :Telnyx
733
+ DEEPGRAM = :Deepgram
734
+ AZURE = :Azure
735
+ X_AI = :xAI
736
+ ASSEMBLY_AI = :AssemblyAI
737
+ SPEECHMATICS = :Speechmatics
738
+ SONIOX = :Soniox
739
+ A = :A
740
+ B = :B
741
+
742
+ # @!method self.values
743
+ # @return [Array<Symbol>]
744
+ end
745
+
746
+ # The settings associated with the voice selected
747
+ #
748
+ # @see Telnyx::Models::Calls::ActionAnswerParams::ConversationRelayConfig::Language#voice_settings
749
+ module VoiceSettings
750
+ extend Telnyx::Internal::Type::Union
751
+
752
+ discriminator :type
753
+
754
+ variant :elevenlabs, -> { Telnyx::Calls::ElevenLabsVoiceSettings }
755
+
756
+ variant :telnyx, -> { Telnyx::Calls::TelnyxVoiceSettings }
757
+
758
+ variant :aws, -> { Telnyx::Calls::AwsVoiceSettings }
759
+
760
+ variant :minimax, -> { Telnyx::MinimaxVoiceSettings }
761
+
762
+ variant :azure, -> { Telnyx::AzureVoiceSettings }
763
+
764
+ variant :rime, -> { Telnyx::RimeVoiceSettings }
765
+
766
+ variant :resemble, -> { Telnyx::ResembleVoiceSettings }
767
+
768
+ variant :inworld,
769
+ -> { Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::Language::VoiceSettings::Inworld }
770
+
771
+ variant :xai, -> { Telnyx::XaiVoiceSettings }
772
+
773
+ class Inworld < Telnyx::Internal::Type::BaseModel
774
+ # @!attribute type
775
+ # Voice settings provider type
776
+ #
777
+ # @return [Symbol, :inworld]
778
+ required :type, const: :inworld
779
+
780
+ # @!method initialize(type: :inworld)
781
+ # @param type [Symbol, :inworld] Voice settings provider type
782
+ end
783
+
784
+ # @!method self.variants
785
+ # @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::ActionAnswerParams::ConversationRelayConfig::Language::VoiceSettings::Inworld, Telnyx::Models::XaiVoiceSettings)]
786
+ end
787
+ end
788
+
789
+ # Engine to use for speech recognition. Legacy values `A` - `Google`, `B` -
790
+ # `Telnyx` are supported for backward compatibility. For Conversation Relay, use
791
+ # this field with `transcription_engine_config`; the `transcription` object is not
792
+ # supported.
793
+ #
794
+ # @see Telnyx::Models::Calls::ActionAnswerParams::ConversationRelayConfig#transcription_engine
795
+ module TranscriptionEngine
796
+ extend Telnyx::Internal::Type::Enum
797
+
798
+ GOOGLE = :Google
799
+ TELNYX = :Telnyx
800
+ DEEPGRAM = :Deepgram
801
+ AZURE = :Azure
802
+ X_AI = :xAI
803
+ ASSEMBLY_AI = :AssemblyAI
804
+ SPEECHMATICS = :Speechmatics
805
+ SONIOX = :Soniox
806
+ A = :A
807
+ B = :B
808
+
809
+ # @!method self.values
810
+ # @return [Array<Symbol>]
811
+ end
812
+
813
+ # The settings associated with the voice selected
814
+ #
815
+ # @see Telnyx::Models::Calls::ActionAnswerParams::ConversationRelayConfig#voice_settings
816
+ module VoiceSettings
817
+ extend Telnyx::Internal::Type::Union
818
+
819
+ discriminator :type
820
+
821
+ variant :elevenlabs, -> { Telnyx::Calls::ElevenLabsVoiceSettings }
822
+
823
+ variant :telnyx, -> { Telnyx::Calls::TelnyxVoiceSettings }
824
+
825
+ variant :aws, -> { Telnyx::Calls::AwsVoiceSettings }
826
+
827
+ variant :minimax, -> { Telnyx::MinimaxVoiceSettings }
828
+
829
+ variant :azure, -> { Telnyx::AzureVoiceSettings }
830
+
831
+ variant :rime, -> { Telnyx::RimeVoiceSettings }
832
+
833
+ variant :resemble, -> { Telnyx::ResembleVoiceSettings }
834
+
835
+ variant :inworld,
836
+ -> { Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::VoiceSettings::Inworld }
837
+
838
+ variant :xai, -> { Telnyx::XaiVoiceSettings }
839
+
840
+ class Inworld < Telnyx::Internal::Type::BaseModel
841
+ # @!attribute type
842
+ # Voice settings provider type
843
+ #
844
+ # @return [Symbol, :inworld]
845
+ required :type, const: :inworld
846
+
847
+ # @!method initialize(type: :inworld)
848
+ # @param type [Symbol, :inworld] Voice settings provider type
849
+ end
850
+
851
+ # @!method self.variants
852
+ # @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::ActionAnswerParams::ConversationRelayConfig::VoiceSettings::Inworld, Telnyx::Models::XaiVoiceSettings)]
853
+ end
854
+ end
855
+
301
856
  class DeepfakeDetection < Telnyx::Internal::Type::BaseModel
302
857
  # @!attribute enabled
303
858
  # Whether deepfake detection is enabled.