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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +21 -0
- data/README.md +1 -1
- data/lib/telnyx/client.rb +6 -0
- data/lib/telnyx/models/call_dial_params.rb +551 -1
- data/lib/telnyx/models/calls/action_answer_params.rb +556 -1
- data/lib/telnyx/models/calls/action_gather_using_speak_params.rb +2 -2
- data/lib/telnyx/models/calls/action_speak_params.rb +2 -2
- data/lib/telnyx/models/calls/action_start_conversation_relay_params.rb +411 -84
- data/lib/telnyx/models/conferences/action_speak_params.rb +2 -2
- data/lib/telnyx/models/voice_sdk_call_report_list_params.rb +56 -0
- data/lib/telnyx/models/voice_sdk_call_report_list_response.rb +385 -0
- data/lib/telnyx/models/voice_sdk_call_report_retrieve_params.rb +20 -0
- data/lib/telnyx/models/voice_sdk_call_report_retrieve_response.rb +390 -0
- data/lib/telnyx/models.rb +4 -0
- data/lib/telnyx/resources/calls/actions.rb +26 -8
- data/lib/telnyx/resources/calls.rb +3 -1
- data/lib/telnyx/resources/voice_sdk_call_reports.rb +71 -0
- data/lib/telnyx/version.rb +1 -1
- data/lib/telnyx.rb +5 -0
- data/rbi/telnyx/client.rbi +5 -0
- data/rbi/telnyx/models/call_dial_params.rbi +1273 -0
- data/rbi/telnyx/models/calls/action_answer_params.rbi +1279 -0
- data/rbi/telnyx/models/calls/action_gather_using_speak_params.rbi +4 -4
- data/rbi/telnyx/models/calls/action_speak_params.rbi +4 -4
- data/rbi/telnyx/models/calls/action_start_conversation_relay_params.rbi +928 -133
- data/rbi/telnyx/models/conferences/action_speak_params.rbi +4 -4
- data/rbi/telnyx/models/voice_sdk_call_report_list_params.rbi +108 -0
- data/rbi/telnyx/models/voice_sdk_call_report_list_response.rbi +774 -0
- data/rbi/telnyx/models/voice_sdk_call_report_retrieve_params.rbi +38 -0
- data/rbi/telnyx/models/voice_sdk_call_report_retrieve_response.rbi +782 -0
- data/rbi/telnyx/models.rbi +5 -0
- data/rbi/telnyx/resources/calls/actions.rbi +73 -24
- data/rbi/telnyx/resources/calls.rbi +9 -0
- data/rbi/telnyx/resources/conferences/actions.rbi +2 -2
- data/rbi/telnyx/resources/voice_sdk_call_reports.rbi +58 -0
- data/sig/telnyx/client.rbs +2 -0
- data/sig/telnyx/models/call_dial_params.rbs +440 -0
- data/sig/telnyx/models/calls/action_answer_params.rbs +440 -0
- data/sig/telnyx/models/calls/action_start_conversation_relay_params.rbs +317 -51
- data/sig/telnyx/models/voice_sdk_call_report_list_params.rbs +57 -0
- data/sig/telnyx/models/voice_sdk_call_report_list_response.rbs +340 -0
- data/sig/telnyx/models/voice_sdk_call_report_retrieve_params.rbs +23 -0
- data/sig/telnyx/models/voice_sdk_call_report_retrieve_response.rbs +345 -0
- data/sig/telnyx/models.rbs +4 -0
- data/sig/telnyx/resources/calls/actions.rbs +12 -3
- data/sig/telnyx/resources/calls.rbs +1 -0
- data/sig/telnyx/resources/voice_sdk_call_reports.rbs +19 -0
- metadata +17 -2
|
@@ -48,6 +48,29 @@ module Telnyx
|
|
|
48
48
|
sig { params(command_id: String).void }
|
|
49
49
|
attr_writer :command_id
|
|
50
50
|
|
|
51
|
+
# Starts a Conversation Relay session automatically when the answered/dialed call
|
|
52
|
+
# is answered. This embedded shape is supported on `answer` and `dial`. It uses
|
|
53
|
+
# public field names (`url`, `dtmf_detection`, `greeting`, `voice`, `language`,
|
|
54
|
+
# etc.) and maps them to the underlying Conversation Relay action. `client_state`,
|
|
55
|
+
# `tts_language`, and `transcription_language` inside this object are ignored; use
|
|
56
|
+
# the parent command's `client_state` and `command_id` fields instead.
|
|
57
|
+
sig do
|
|
58
|
+
returns(
|
|
59
|
+
T.nilable(
|
|
60
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig
|
|
61
|
+
)
|
|
62
|
+
)
|
|
63
|
+
end
|
|
64
|
+
attr_reader :conversation_relay_config
|
|
65
|
+
|
|
66
|
+
sig do
|
|
67
|
+
params(
|
|
68
|
+
conversation_relay_config:
|
|
69
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::OrHash
|
|
70
|
+
).void
|
|
71
|
+
end
|
|
72
|
+
attr_writer :conversation_relay_config
|
|
73
|
+
|
|
51
74
|
# Custom headers to be added to the SIP INVITE response.
|
|
52
75
|
sig { returns(T.nilable(T::Array[Telnyx::CustomSipHeader])) }
|
|
53
76
|
attr_reader :custom_headers
|
|
@@ -404,6 +427,8 @@ module Telnyx
|
|
|
404
427
|
billing_group_id: String,
|
|
405
428
|
client_state: String,
|
|
406
429
|
command_id: String,
|
|
430
|
+
conversation_relay_config:
|
|
431
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::OrHash,
|
|
407
432
|
custom_headers: T::Array[Telnyx::CustomSipHeader::OrHash],
|
|
408
433
|
deepfake_detection:
|
|
409
434
|
Telnyx::Calls::ActionAnswerParams::DeepfakeDetection::OrHash,
|
|
@@ -466,6 +491,13 @@ module Telnyx
|
|
|
466
491
|
# Use this field to avoid duplicate commands. Telnyx will ignore any command with
|
|
467
492
|
# the same `command_id` for the same `call_control_id`.
|
|
468
493
|
command_id: nil,
|
|
494
|
+
# Starts a Conversation Relay session automatically when the answered/dialed call
|
|
495
|
+
# is answered. This embedded shape is supported on `answer` and `dial`. It uses
|
|
496
|
+
# public field names (`url`, `dtmf_detection`, `greeting`, `voice`, `language`,
|
|
497
|
+
# etc.) and maps them to the underlying Conversation Relay action. `client_state`,
|
|
498
|
+
# `tts_language`, and `transcription_language` inside this object are ignored; use
|
|
499
|
+
# the parent command's `client_state` and `command_id` fields instead.
|
|
500
|
+
conversation_relay_config: nil,
|
|
469
501
|
# Custom headers to be added to the SIP INVITE response.
|
|
470
502
|
custom_headers: nil,
|
|
471
503
|
# Enables deepfake detection on the call. When enabled, audio from the remote
|
|
@@ -554,6 +586,8 @@ module Telnyx
|
|
|
554
586
|
billing_group_id: String,
|
|
555
587
|
client_state: String,
|
|
556
588
|
command_id: String,
|
|
589
|
+
conversation_relay_config:
|
|
590
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig,
|
|
557
591
|
custom_headers: T::Array[Telnyx::CustomSipHeader],
|
|
558
592
|
deepfake_detection:
|
|
559
593
|
Telnyx::Calls::ActionAnswerParams::DeepfakeDetection,
|
|
@@ -604,6 +638,1251 @@ module Telnyx
|
|
|
604
638
|
def to_hash
|
|
605
639
|
end
|
|
606
640
|
|
|
641
|
+
class ConversationRelayConfig < Telnyx::Internal::Type::BaseModel
|
|
642
|
+
OrHash =
|
|
643
|
+
T.type_alias do
|
|
644
|
+
T.any(
|
|
645
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig,
|
|
646
|
+
Telnyx::Internal::AnyHash
|
|
647
|
+
)
|
|
648
|
+
end
|
|
649
|
+
|
|
650
|
+
# WebSocket URL for your Conversation Relay server. Must start with `ws://` or
|
|
651
|
+
# `wss://`.
|
|
652
|
+
sig { returns(String) }
|
|
653
|
+
attr_accessor :url
|
|
654
|
+
|
|
655
|
+
# Custom key-value parameters forwarded to the relay session as assistant dynamic
|
|
656
|
+
# variables.
|
|
657
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
658
|
+
attr_reader :custom_parameters
|
|
659
|
+
|
|
660
|
+
sig { params(custom_parameters: T::Hash[Symbol, T.anything]).void }
|
|
661
|
+
attr_writer :custom_parameters
|
|
662
|
+
|
|
663
|
+
# Enable DTMF detection for the relay session.
|
|
664
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
665
|
+
attr_reader :dtmf_detection
|
|
666
|
+
|
|
667
|
+
sig { params(dtmf_detection: T::Boolean).void }
|
|
668
|
+
attr_writer :dtmf_detection
|
|
669
|
+
|
|
670
|
+
# Text played when the relay session starts.
|
|
671
|
+
sig { returns(T.nilable(String)) }
|
|
672
|
+
attr_reader :greeting
|
|
673
|
+
|
|
674
|
+
sig { params(greeting: String).void }
|
|
675
|
+
attr_writer :greeting
|
|
676
|
+
|
|
677
|
+
# Controls when caller input can interrupt assistant speech. `any` allows speech
|
|
678
|
+
# or DTMF interruptions; `none` disables interruptions; `speech` allows speech
|
|
679
|
+
# only; `dtmf` allows DTMF only.
|
|
680
|
+
sig do
|
|
681
|
+
returns(
|
|
682
|
+
T.nilable(
|
|
683
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::Interruptible::OrSymbol
|
|
684
|
+
)
|
|
685
|
+
)
|
|
686
|
+
end
|
|
687
|
+
attr_reader :interruptible
|
|
688
|
+
|
|
689
|
+
sig do
|
|
690
|
+
params(
|
|
691
|
+
interruptible:
|
|
692
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::Interruptible::OrSymbol
|
|
693
|
+
).void
|
|
694
|
+
end
|
|
695
|
+
attr_writer :interruptible
|
|
696
|
+
|
|
697
|
+
# Controls when caller input can interrupt assistant speech. `any` allows speech
|
|
698
|
+
# or DTMF interruptions; `none` disables interruptions; `speech` allows speech
|
|
699
|
+
# only; `dtmf` allows DTMF only.
|
|
700
|
+
sig do
|
|
701
|
+
returns(
|
|
702
|
+
T.nilable(
|
|
703
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptibleGreeting::OrSymbol
|
|
704
|
+
)
|
|
705
|
+
)
|
|
706
|
+
end
|
|
707
|
+
attr_reader :interruptible_greeting
|
|
708
|
+
|
|
709
|
+
sig do
|
|
710
|
+
params(
|
|
711
|
+
interruptible_greeting:
|
|
712
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptibleGreeting::OrSymbol
|
|
713
|
+
).void
|
|
714
|
+
end
|
|
715
|
+
attr_writer :interruptible_greeting
|
|
716
|
+
|
|
717
|
+
# Settings for handling caller interruptions during Conversation Relay speech.
|
|
718
|
+
sig do
|
|
719
|
+
returns(
|
|
720
|
+
T.nilable(
|
|
721
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptionSettings
|
|
722
|
+
)
|
|
723
|
+
)
|
|
724
|
+
end
|
|
725
|
+
attr_reader :interruption_settings
|
|
726
|
+
|
|
727
|
+
sig do
|
|
728
|
+
params(
|
|
729
|
+
interruption_settings:
|
|
730
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptionSettings::OrHash
|
|
731
|
+
).void
|
|
732
|
+
end
|
|
733
|
+
attr_writer :interruption_settings
|
|
734
|
+
|
|
735
|
+
# Default language for both text-to-speech and speech recognition.
|
|
736
|
+
sig { returns(T.nilable(String)) }
|
|
737
|
+
attr_reader :language
|
|
738
|
+
|
|
739
|
+
sig { params(language: String).void }
|
|
740
|
+
attr_writer :language
|
|
741
|
+
|
|
742
|
+
# Per-language TTS and transcription settings.
|
|
743
|
+
sig do
|
|
744
|
+
returns(
|
|
745
|
+
T.nilable(
|
|
746
|
+
T::Array[
|
|
747
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::Language
|
|
748
|
+
]
|
|
749
|
+
)
|
|
750
|
+
)
|
|
751
|
+
end
|
|
752
|
+
attr_reader :languages
|
|
753
|
+
|
|
754
|
+
sig do
|
|
755
|
+
params(
|
|
756
|
+
languages:
|
|
757
|
+
T::Array[
|
|
758
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::Language::OrHash
|
|
759
|
+
]
|
|
760
|
+
).void
|
|
761
|
+
end
|
|
762
|
+
attr_writer :languages
|
|
763
|
+
|
|
764
|
+
# Structured voice provider. Must be supplied together with `structured_provider`.
|
|
765
|
+
sig { returns(T.nilable(String)) }
|
|
766
|
+
attr_reader :provider
|
|
767
|
+
|
|
768
|
+
sig { params(provider: String).void }
|
|
769
|
+
attr_writer :provider
|
|
770
|
+
|
|
771
|
+
# Provider-specific structured voice settings. Must be supplied together with
|
|
772
|
+
# `provider`; Telnyx sends the value as the nested provider configuration for
|
|
773
|
+
# Conversation Relay.
|
|
774
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
775
|
+
attr_reader :structured_provider
|
|
776
|
+
|
|
777
|
+
sig { params(structured_provider: T::Hash[Symbol, T.anything]).void }
|
|
778
|
+
attr_writer :structured_provider
|
|
779
|
+
|
|
780
|
+
# Engine to use for speech recognition. Legacy values `A` - `Google`, `B` -
|
|
781
|
+
# `Telnyx` are supported for backward compatibility. For Conversation Relay, use
|
|
782
|
+
# this field with `transcription_engine_config`; the `transcription` object is not
|
|
783
|
+
# supported.
|
|
784
|
+
sig do
|
|
785
|
+
returns(
|
|
786
|
+
T.nilable(
|
|
787
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::TranscriptionEngine::OrSymbol
|
|
788
|
+
)
|
|
789
|
+
)
|
|
790
|
+
end
|
|
791
|
+
attr_reader :transcription_engine
|
|
792
|
+
|
|
793
|
+
sig do
|
|
794
|
+
params(
|
|
795
|
+
transcription_engine:
|
|
796
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::TranscriptionEngine::OrSymbol
|
|
797
|
+
).void
|
|
798
|
+
end
|
|
799
|
+
attr_writer :transcription_engine
|
|
800
|
+
|
|
801
|
+
# Engine-specific transcription settings for Conversation Relay. This accepts the
|
|
802
|
+
# same provider-specific options used by the Call Transcription Start command,
|
|
803
|
+
# such as `transcription_model`, without requiring the engine discriminator to be
|
|
804
|
+
# repeated inside this object.
|
|
805
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
806
|
+
attr_reader :transcription_engine_config
|
|
807
|
+
|
|
808
|
+
sig do
|
|
809
|
+
params(
|
|
810
|
+
transcription_engine_config: T::Hash[Symbol, T.anything]
|
|
811
|
+
).void
|
|
812
|
+
end
|
|
813
|
+
attr_writer :transcription_engine_config
|
|
814
|
+
|
|
815
|
+
# Text-to-speech provider. If omitted, Telnyx derives it from `voice` or
|
|
816
|
+
# `provider`.
|
|
817
|
+
sig { returns(T.nilable(String)) }
|
|
818
|
+
attr_reader :tts_provider
|
|
819
|
+
|
|
820
|
+
sig { params(tts_provider: String).void }
|
|
821
|
+
attr_writer :tts_provider
|
|
822
|
+
|
|
823
|
+
# The voice to be used by the voice assistant. Currently we support ElevenLabs,
|
|
824
|
+
# Telnyx and AWS voices.
|
|
825
|
+
#
|
|
826
|
+
# **Supported Providers:**
|
|
827
|
+
#
|
|
828
|
+
# - **AWS:** Use `AWS.Polly.<VoiceId>` (e.g., `AWS.Polly.Joanna`). For neural
|
|
829
|
+
# voices, which provide more realistic, human-like speech, append `-Neural` to
|
|
830
|
+
# the `VoiceId` (e.g., `AWS.Polly.Joanna-Neural`). Check the
|
|
831
|
+
# [available voices](https://docs.aws.amazon.com/polly/latest/dg/available-voices.html)
|
|
832
|
+
# for compatibility.
|
|
833
|
+
# - **Azure:** Use `Azure.<VoiceId>. (e.g. Azure.en-CA-ClaraNeural,
|
|
834
|
+
# Azure.en-CA-LiamNeural, Azure.en-US-BrianMultilingualNeural,
|
|
835
|
+
# Azure.en-US-Ava:DragonHDLatestNeural. For a complete list of voices, go to
|
|
836
|
+
# [Azure Voice Gallery](https://speech.microsoft.com/portal/voicegallery).)
|
|
837
|
+
# - **ElevenLabs:** Use `ElevenLabs.<ModelId>.<VoiceId>` (e.g.,
|
|
838
|
+
# `ElevenLabs.BaseModel.John`). The `ModelId` part is optional. To use
|
|
839
|
+
# ElevenLabs, you must provide your ElevenLabs API key as an integration secret
|
|
840
|
+
# under `"voice_settings": {"api_key_ref": "<secret_id>"}`. See
|
|
841
|
+
# [integration secrets documentation](https://developers.telnyx.com/api/secrets-manager/integration-secrets/create-integration-secret)
|
|
842
|
+
# for details. Check
|
|
843
|
+
# [available voices](https://elevenlabs.io/docs/api-reference/get-voices).
|
|
844
|
+
# - **Telnyx:** Use `Telnyx.<model_id>.<voice_id>`
|
|
845
|
+
# - **Inworld:** Use `Inworld.<ModelId>.<VoiceId>` (e.g., `Inworld.Mini.Loretta`,
|
|
846
|
+
# `Inworld.Max.Oliver`). Supported models: `Mini`, `Max`.
|
|
847
|
+
# - **xAI:** Use `xAI.<VoiceId>` (e.g., `xAI.eve`). Available voices: `eve`,
|
|
848
|
+
# `ara`, `rex`, `sal`, `leo`.
|
|
849
|
+
sig { returns(T.nilable(String)) }
|
|
850
|
+
attr_reader :voice
|
|
851
|
+
|
|
852
|
+
sig { params(voice: String).void }
|
|
853
|
+
attr_writer :voice
|
|
854
|
+
|
|
855
|
+
# The settings associated with the voice selected
|
|
856
|
+
sig do
|
|
857
|
+
returns(
|
|
858
|
+
T.nilable(
|
|
859
|
+
T.any(
|
|
860
|
+
Telnyx::Calls::ElevenLabsVoiceSettings,
|
|
861
|
+
Telnyx::Calls::TelnyxVoiceSettings,
|
|
862
|
+
Telnyx::Calls::AwsVoiceSettings,
|
|
863
|
+
Telnyx::MinimaxVoiceSettings,
|
|
864
|
+
Telnyx::AzureVoiceSettings,
|
|
865
|
+
Telnyx::RimeVoiceSettings,
|
|
866
|
+
Telnyx::ResembleVoiceSettings,
|
|
867
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::VoiceSettings::Inworld,
|
|
868
|
+
Telnyx::XaiVoiceSettings
|
|
869
|
+
)
|
|
870
|
+
)
|
|
871
|
+
)
|
|
872
|
+
end
|
|
873
|
+
attr_reader :voice_settings
|
|
874
|
+
|
|
875
|
+
sig do
|
|
876
|
+
params(
|
|
877
|
+
voice_settings:
|
|
878
|
+
T.any(
|
|
879
|
+
Telnyx::Calls::ElevenLabsVoiceSettings::OrHash,
|
|
880
|
+
Telnyx::Calls::TelnyxVoiceSettings::OrHash,
|
|
881
|
+
Telnyx::Calls::AwsVoiceSettings::OrHash,
|
|
882
|
+
Telnyx::MinimaxVoiceSettings::OrHash,
|
|
883
|
+
Telnyx::AzureVoiceSettings::OrHash,
|
|
884
|
+
Telnyx::RimeVoiceSettings::OrHash,
|
|
885
|
+
Telnyx::ResembleVoiceSettings::OrHash,
|
|
886
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::VoiceSettings::Inworld::OrHash,
|
|
887
|
+
Telnyx::XaiVoiceSettings::OrHash
|
|
888
|
+
)
|
|
889
|
+
).void
|
|
890
|
+
end
|
|
891
|
+
attr_writer :voice_settings
|
|
892
|
+
|
|
893
|
+
# Starts a Conversation Relay session automatically when the answered/dialed call
|
|
894
|
+
# is answered. This embedded shape is supported on `answer` and `dial`. It uses
|
|
895
|
+
# public field names (`url`, `dtmf_detection`, `greeting`, `voice`, `language`,
|
|
896
|
+
# etc.) and maps them to the underlying Conversation Relay action. `client_state`,
|
|
897
|
+
# `tts_language`, and `transcription_language` inside this object are ignored; use
|
|
898
|
+
# the parent command's `client_state` and `command_id` fields instead.
|
|
899
|
+
sig do
|
|
900
|
+
params(
|
|
901
|
+
url: String,
|
|
902
|
+
custom_parameters: T::Hash[Symbol, T.anything],
|
|
903
|
+
dtmf_detection: T::Boolean,
|
|
904
|
+
greeting: String,
|
|
905
|
+
interruptible:
|
|
906
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::Interruptible::OrSymbol,
|
|
907
|
+
interruptible_greeting:
|
|
908
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptibleGreeting::OrSymbol,
|
|
909
|
+
interruption_settings:
|
|
910
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptionSettings::OrHash,
|
|
911
|
+
language: String,
|
|
912
|
+
languages:
|
|
913
|
+
T::Array[
|
|
914
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::Language::OrHash
|
|
915
|
+
],
|
|
916
|
+
provider: String,
|
|
917
|
+
structured_provider: T::Hash[Symbol, T.anything],
|
|
918
|
+
transcription_engine:
|
|
919
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::TranscriptionEngine::OrSymbol,
|
|
920
|
+
transcription_engine_config: T::Hash[Symbol, T.anything],
|
|
921
|
+
tts_provider: String,
|
|
922
|
+
voice: String,
|
|
923
|
+
voice_settings:
|
|
924
|
+
T.any(
|
|
925
|
+
Telnyx::Calls::ElevenLabsVoiceSettings::OrHash,
|
|
926
|
+
Telnyx::Calls::TelnyxVoiceSettings::OrHash,
|
|
927
|
+
Telnyx::Calls::AwsVoiceSettings::OrHash,
|
|
928
|
+
Telnyx::MinimaxVoiceSettings::OrHash,
|
|
929
|
+
Telnyx::AzureVoiceSettings::OrHash,
|
|
930
|
+
Telnyx::RimeVoiceSettings::OrHash,
|
|
931
|
+
Telnyx::ResembleVoiceSettings::OrHash,
|
|
932
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::VoiceSettings::Inworld::OrHash,
|
|
933
|
+
Telnyx::XaiVoiceSettings::OrHash
|
|
934
|
+
)
|
|
935
|
+
).returns(T.attached_class)
|
|
936
|
+
end
|
|
937
|
+
def self.new(
|
|
938
|
+
# WebSocket URL for your Conversation Relay server. Must start with `ws://` or
|
|
939
|
+
# `wss://`.
|
|
940
|
+
url:,
|
|
941
|
+
# Custom key-value parameters forwarded to the relay session as assistant dynamic
|
|
942
|
+
# variables.
|
|
943
|
+
custom_parameters: nil,
|
|
944
|
+
# Enable DTMF detection for the relay session.
|
|
945
|
+
dtmf_detection: nil,
|
|
946
|
+
# Text played when the relay session starts.
|
|
947
|
+
greeting: nil,
|
|
948
|
+
# Controls when caller input can interrupt assistant speech. `any` allows speech
|
|
949
|
+
# or DTMF interruptions; `none` disables interruptions; `speech` allows speech
|
|
950
|
+
# only; `dtmf` allows DTMF only.
|
|
951
|
+
interruptible: nil,
|
|
952
|
+
# Controls when caller input can interrupt assistant speech. `any` allows speech
|
|
953
|
+
# or DTMF interruptions; `none` disables interruptions; `speech` allows speech
|
|
954
|
+
# only; `dtmf` allows DTMF only.
|
|
955
|
+
interruptible_greeting: nil,
|
|
956
|
+
# Settings for handling caller interruptions during Conversation Relay speech.
|
|
957
|
+
interruption_settings: nil,
|
|
958
|
+
# Default language for both text-to-speech and speech recognition.
|
|
959
|
+
language: nil,
|
|
960
|
+
# Per-language TTS and transcription settings.
|
|
961
|
+
languages: nil,
|
|
962
|
+
# Structured voice provider. Must be supplied together with `structured_provider`.
|
|
963
|
+
provider: nil,
|
|
964
|
+
# Provider-specific structured voice settings. Must be supplied together with
|
|
965
|
+
# `provider`; Telnyx sends the value as the nested provider configuration for
|
|
966
|
+
# Conversation Relay.
|
|
967
|
+
structured_provider: nil,
|
|
968
|
+
# Engine to use for speech recognition. Legacy values `A` - `Google`, `B` -
|
|
969
|
+
# `Telnyx` are supported for backward compatibility. For Conversation Relay, use
|
|
970
|
+
# this field with `transcription_engine_config`; the `transcription` object is not
|
|
971
|
+
# supported.
|
|
972
|
+
transcription_engine: nil,
|
|
973
|
+
# Engine-specific transcription settings for Conversation Relay. This accepts the
|
|
974
|
+
# same provider-specific options used by the Call Transcription Start command,
|
|
975
|
+
# such as `transcription_model`, without requiring the engine discriminator to be
|
|
976
|
+
# repeated inside this object.
|
|
977
|
+
transcription_engine_config: nil,
|
|
978
|
+
# Text-to-speech provider. If omitted, Telnyx derives it from `voice` or
|
|
979
|
+
# `provider`.
|
|
980
|
+
tts_provider: nil,
|
|
981
|
+
# The voice to be used by the voice assistant. Currently we support ElevenLabs,
|
|
982
|
+
# Telnyx and AWS voices.
|
|
983
|
+
#
|
|
984
|
+
# **Supported Providers:**
|
|
985
|
+
#
|
|
986
|
+
# - **AWS:** Use `AWS.Polly.<VoiceId>` (e.g., `AWS.Polly.Joanna`). For neural
|
|
987
|
+
# voices, which provide more realistic, human-like speech, append `-Neural` to
|
|
988
|
+
# the `VoiceId` (e.g., `AWS.Polly.Joanna-Neural`). Check the
|
|
989
|
+
# [available voices](https://docs.aws.amazon.com/polly/latest/dg/available-voices.html)
|
|
990
|
+
# for compatibility.
|
|
991
|
+
# - **Azure:** Use `Azure.<VoiceId>. (e.g. Azure.en-CA-ClaraNeural,
|
|
992
|
+
# Azure.en-CA-LiamNeural, Azure.en-US-BrianMultilingualNeural,
|
|
993
|
+
# Azure.en-US-Ava:DragonHDLatestNeural. For a complete list of voices, go to
|
|
994
|
+
# [Azure Voice Gallery](https://speech.microsoft.com/portal/voicegallery).)
|
|
995
|
+
# - **ElevenLabs:** Use `ElevenLabs.<ModelId>.<VoiceId>` (e.g.,
|
|
996
|
+
# `ElevenLabs.BaseModel.John`). The `ModelId` part is optional. To use
|
|
997
|
+
# ElevenLabs, you must provide your ElevenLabs API key as an integration secret
|
|
998
|
+
# under `"voice_settings": {"api_key_ref": "<secret_id>"}`. See
|
|
999
|
+
# [integration secrets documentation](https://developers.telnyx.com/api/secrets-manager/integration-secrets/create-integration-secret)
|
|
1000
|
+
# for details. Check
|
|
1001
|
+
# [available voices](https://elevenlabs.io/docs/api-reference/get-voices).
|
|
1002
|
+
# - **Telnyx:** Use `Telnyx.<model_id>.<voice_id>`
|
|
1003
|
+
# - **Inworld:** Use `Inworld.<ModelId>.<VoiceId>` (e.g., `Inworld.Mini.Loretta`,
|
|
1004
|
+
# `Inworld.Max.Oliver`). Supported models: `Mini`, `Max`.
|
|
1005
|
+
# - **xAI:** Use `xAI.<VoiceId>` (e.g., `xAI.eve`). Available voices: `eve`,
|
|
1006
|
+
# `ara`, `rex`, `sal`, `leo`.
|
|
1007
|
+
voice: nil,
|
|
1008
|
+
# The settings associated with the voice selected
|
|
1009
|
+
voice_settings: nil
|
|
1010
|
+
)
|
|
1011
|
+
end
|
|
1012
|
+
|
|
1013
|
+
sig do
|
|
1014
|
+
override.returns(
|
|
1015
|
+
{
|
|
1016
|
+
url: String,
|
|
1017
|
+
custom_parameters: T::Hash[Symbol, T.anything],
|
|
1018
|
+
dtmf_detection: T::Boolean,
|
|
1019
|
+
greeting: String,
|
|
1020
|
+
interruptible:
|
|
1021
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::Interruptible::OrSymbol,
|
|
1022
|
+
interruptible_greeting:
|
|
1023
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptibleGreeting::OrSymbol,
|
|
1024
|
+
interruption_settings:
|
|
1025
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptionSettings,
|
|
1026
|
+
language: String,
|
|
1027
|
+
languages:
|
|
1028
|
+
T::Array[
|
|
1029
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::Language
|
|
1030
|
+
],
|
|
1031
|
+
provider: String,
|
|
1032
|
+
structured_provider: T::Hash[Symbol, T.anything],
|
|
1033
|
+
transcription_engine:
|
|
1034
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::TranscriptionEngine::OrSymbol,
|
|
1035
|
+
transcription_engine_config: T::Hash[Symbol, T.anything],
|
|
1036
|
+
tts_provider: String,
|
|
1037
|
+
voice: String,
|
|
1038
|
+
voice_settings:
|
|
1039
|
+
T.any(
|
|
1040
|
+
Telnyx::Calls::ElevenLabsVoiceSettings,
|
|
1041
|
+
Telnyx::Calls::TelnyxVoiceSettings,
|
|
1042
|
+
Telnyx::Calls::AwsVoiceSettings,
|
|
1043
|
+
Telnyx::MinimaxVoiceSettings,
|
|
1044
|
+
Telnyx::AzureVoiceSettings,
|
|
1045
|
+
Telnyx::RimeVoiceSettings,
|
|
1046
|
+
Telnyx::ResembleVoiceSettings,
|
|
1047
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::VoiceSettings::Inworld,
|
|
1048
|
+
Telnyx::XaiVoiceSettings
|
|
1049
|
+
)
|
|
1050
|
+
}
|
|
1051
|
+
)
|
|
1052
|
+
end
|
|
1053
|
+
def to_hash
|
|
1054
|
+
end
|
|
1055
|
+
|
|
1056
|
+
# Controls when caller input can interrupt assistant speech. `any` allows speech
|
|
1057
|
+
# or DTMF interruptions; `none` disables interruptions; `speech` allows speech
|
|
1058
|
+
# only; `dtmf` allows DTMF only.
|
|
1059
|
+
module Interruptible
|
|
1060
|
+
extend Telnyx::Internal::Type::Enum
|
|
1061
|
+
|
|
1062
|
+
TaggedSymbol =
|
|
1063
|
+
T.type_alias do
|
|
1064
|
+
T.all(
|
|
1065
|
+
Symbol,
|
|
1066
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::Interruptible
|
|
1067
|
+
)
|
|
1068
|
+
end
|
|
1069
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1070
|
+
|
|
1071
|
+
NONE =
|
|
1072
|
+
T.let(
|
|
1073
|
+
:none,
|
|
1074
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::Interruptible::TaggedSymbol
|
|
1075
|
+
)
|
|
1076
|
+
ANY =
|
|
1077
|
+
T.let(
|
|
1078
|
+
:any,
|
|
1079
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::Interruptible::TaggedSymbol
|
|
1080
|
+
)
|
|
1081
|
+
SPEECH =
|
|
1082
|
+
T.let(
|
|
1083
|
+
:speech,
|
|
1084
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::Interruptible::TaggedSymbol
|
|
1085
|
+
)
|
|
1086
|
+
DTMF =
|
|
1087
|
+
T.let(
|
|
1088
|
+
:dtmf,
|
|
1089
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::Interruptible::TaggedSymbol
|
|
1090
|
+
)
|
|
1091
|
+
|
|
1092
|
+
sig do
|
|
1093
|
+
override.returns(
|
|
1094
|
+
T::Array[
|
|
1095
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::Interruptible::TaggedSymbol
|
|
1096
|
+
]
|
|
1097
|
+
)
|
|
1098
|
+
end
|
|
1099
|
+
def self.values
|
|
1100
|
+
end
|
|
1101
|
+
end
|
|
1102
|
+
|
|
1103
|
+
# Controls when caller input can interrupt assistant speech. `any` allows speech
|
|
1104
|
+
# or DTMF interruptions; `none` disables interruptions; `speech` allows speech
|
|
1105
|
+
# only; `dtmf` allows DTMF only.
|
|
1106
|
+
module InterruptibleGreeting
|
|
1107
|
+
extend Telnyx::Internal::Type::Enum
|
|
1108
|
+
|
|
1109
|
+
TaggedSymbol =
|
|
1110
|
+
T.type_alias do
|
|
1111
|
+
T.all(
|
|
1112
|
+
Symbol,
|
|
1113
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptibleGreeting
|
|
1114
|
+
)
|
|
1115
|
+
end
|
|
1116
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1117
|
+
|
|
1118
|
+
NONE =
|
|
1119
|
+
T.let(
|
|
1120
|
+
:none,
|
|
1121
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptibleGreeting::TaggedSymbol
|
|
1122
|
+
)
|
|
1123
|
+
ANY =
|
|
1124
|
+
T.let(
|
|
1125
|
+
:any,
|
|
1126
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptibleGreeting::TaggedSymbol
|
|
1127
|
+
)
|
|
1128
|
+
SPEECH =
|
|
1129
|
+
T.let(
|
|
1130
|
+
:speech,
|
|
1131
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptibleGreeting::TaggedSymbol
|
|
1132
|
+
)
|
|
1133
|
+
DTMF =
|
|
1134
|
+
T.let(
|
|
1135
|
+
:dtmf,
|
|
1136
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptibleGreeting::TaggedSymbol
|
|
1137
|
+
)
|
|
1138
|
+
|
|
1139
|
+
sig do
|
|
1140
|
+
override.returns(
|
|
1141
|
+
T::Array[
|
|
1142
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptibleGreeting::TaggedSymbol
|
|
1143
|
+
]
|
|
1144
|
+
)
|
|
1145
|
+
end
|
|
1146
|
+
def self.values
|
|
1147
|
+
end
|
|
1148
|
+
end
|
|
1149
|
+
|
|
1150
|
+
class InterruptionSettings < Telnyx::Internal::Type::BaseModel
|
|
1151
|
+
OrHash =
|
|
1152
|
+
T.type_alias do
|
|
1153
|
+
T.any(
|
|
1154
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptionSettings,
|
|
1155
|
+
Telnyx::Internal::AnyHash
|
|
1156
|
+
)
|
|
1157
|
+
end
|
|
1158
|
+
|
|
1159
|
+
# Legacy boolean form. `true` is equivalent to `interruptible=any`; `false` is
|
|
1160
|
+
# equivalent to `interruptible=none`.
|
|
1161
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
1162
|
+
attr_reader :enable
|
|
1163
|
+
|
|
1164
|
+
sig { params(enable: T::Boolean).void }
|
|
1165
|
+
attr_writer :enable
|
|
1166
|
+
|
|
1167
|
+
# Controls when caller input can interrupt assistant speech. `any` allows speech
|
|
1168
|
+
# or DTMF interruptions; `none` disables interruptions; `speech` allows speech
|
|
1169
|
+
# only; `dtmf` allows DTMF only.
|
|
1170
|
+
sig do
|
|
1171
|
+
returns(
|
|
1172
|
+
T.nilable(
|
|
1173
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptionSettings::Interruptible::OrSymbol
|
|
1174
|
+
)
|
|
1175
|
+
)
|
|
1176
|
+
end
|
|
1177
|
+
attr_reader :interruptible
|
|
1178
|
+
|
|
1179
|
+
sig do
|
|
1180
|
+
params(
|
|
1181
|
+
interruptible:
|
|
1182
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptionSettings::Interruptible::OrSymbol
|
|
1183
|
+
).void
|
|
1184
|
+
end
|
|
1185
|
+
attr_writer :interruptible
|
|
1186
|
+
|
|
1187
|
+
# Controls when caller input can interrupt assistant speech. `any` allows speech
|
|
1188
|
+
# or DTMF interruptions; `none` disables interruptions; `speech` allows speech
|
|
1189
|
+
# only; `dtmf` allows DTMF only.
|
|
1190
|
+
sig do
|
|
1191
|
+
returns(
|
|
1192
|
+
T.nilable(
|
|
1193
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptionSettings::InterruptibleGreeting::OrSymbol
|
|
1194
|
+
)
|
|
1195
|
+
)
|
|
1196
|
+
end
|
|
1197
|
+
attr_reader :interruptible_greeting
|
|
1198
|
+
|
|
1199
|
+
sig do
|
|
1200
|
+
params(
|
|
1201
|
+
interruptible_greeting:
|
|
1202
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptionSettings::InterruptibleGreeting::OrSymbol
|
|
1203
|
+
).void
|
|
1204
|
+
end
|
|
1205
|
+
attr_writer :interruptible_greeting
|
|
1206
|
+
|
|
1207
|
+
# Controls when caller input can interrupt assistant speech. `any` allows speech
|
|
1208
|
+
# or DTMF interruptions; `none` disables interruptions; `speech` allows speech
|
|
1209
|
+
# only; `dtmf` allows DTMF only.
|
|
1210
|
+
sig do
|
|
1211
|
+
returns(
|
|
1212
|
+
T.nilable(
|
|
1213
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptionSettings::WelcomeGreetingInterruptible::OrSymbol
|
|
1214
|
+
)
|
|
1215
|
+
)
|
|
1216
|
+
end
|
|
1217
|
+
attr_reader :welcome_greeting_interruptible
|
|
1218
|
+
|
|
1219
|
+
sig do
|
|
1220
|
+
params(
|
|
1221
|
+
welcome_greeting_interruptible:
|
|
1222
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptionSettings::WelcomeGreetingInterruptible::OrSymbol
|
|
1223
|
+
).void
|
|
1224
|
+
end
|
|
1225
|
+
attr_writer :welcome_greeting_interruptible
|
|
1226
|
+
|
|
1227
|
+
# Settings for handling caller interruptions during Conversation Relay speech.
|
|
1228
|
+
sig do
|
|
1229
|
+
params(
|
|
1230
|
+
enable: T::Boolean,
|
|
1231
|
+
interruptible:
|
|
1232
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptionSettings::Interruptible::OrSymbol,
|
|
1233
|
+
interruptible_greeting:
|
|
1234
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptionSettings::InterruptibleGreeting::OrSymbol,
|
|
1235
|
+
welcome_greeting_interruptible:
|
|
1236
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptionSettings::WelcomeGreetingInterruptible::OrSymbol
|
|
1237
|
+
).returns(T.attached_class)
|
|
1238
|
+
end
|
|
1239
|
+
def self.new(
|
|
1240
|
+
# Legacy boolean form. `true` is equivalent to `interruptible=any`; `false` is
|
|
1241
|
+
# equivalent to `interruptible=none`.
|
|
1242
|
+
enable: nil,
|
|
1243
|
+
# Controls when caller input can interrupt assistant speech. `any` allows speech
|
|
1244
|
+
# or DTMF interruptions; `none` disables interruptions; `speech` allows speech
|
|
1245
|
+
# only; `dtmf` allows DTMF only.
|
|
1246
|
+
interruptible: nil,
|
|
1247
|
+
# Controls when caller input can interrupt assistant speech. `any` allows speech
|
|
1248
|
+
# or DTMF interruptions; `none` disables interruptions; `speech` allows speech
|
|
1249
|
+
# only; `dtmf` allows DTMF only.
|
|
1250
|
+
interruptible_greeting: nil,
|
|
1251
|
+
# Controls when caller input can interrupt assistant speech. `any` allows speech
|
|
1252
|
+
# or DTMF interruptions; `none` disables interruptions; `speech` allows speech
|
|
1253
|
+
# only; `dtmf` allows DTMF only.
|
|
1254
|
+
welcome_greeting_interruptible: nil
|
|
1255
|
+
)
|
|
1256
|
+
end
|
|
1257
|
+
|
|
1258
|
+
sig do
|
|
1259
|
+
override.returns(
|
|
1260
|
+
{
|
|
1261
|
+
enable: T::Boolean,
|
|
1262
|
+
interruptible:
|
|
1263
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptionSettings::Interruptible::OrSymbol,
|
|
1264
|
+
interruptible_greeting:
|
|
1265
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptionSettings::InterruptibleGreeting::OrSymbol,
|
|
1266
|
+
welcome_greeting_interruptible:
|
|
1267
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptionSettings::WelcomeGreetingInterruptible::OrSymbol
|
|
1268
|
+
}
|
|
1269
|
+
)
|
|
1270
|
+
end
|
|
1271
|
+
def to_hash
|
|
1272
|
+
end
|
|
1273
|
+
|
|
1274
|
+
# Controls when caller input can interrupt assistant speech. `any` allows speech
|
|
1275
|
+
# or DTMF interruptions; `none` disables interruptions; `speech` allows speech
|
|
1276
|
+
# only; `dtmf` allows DTMF only.
|
|
1277
|
+
module Interruptible
|
|
1278
|
+
extend Telnyx::Internal::Type::Enum
|
|
1279
|
+
|
|
1280
|
+
TaggedSymbol =
|
|
1281
|
+
T.type_alias do
|
|
1282
|
+
T.all(
|
|
1283
|
+
Symbol,
|
|
1284
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptionSettings::Interruptible
|
|
1285
|
+
)
|
|
1286
|
+
end
|
|
1287
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1288
|
+
|
|
1289
|
+
NONE =
|
|
1290
|
+
T.let(
|
|
1291
|
+
:none,
|
|
1292
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptionSettings::Interruptible::TaggedSymbol
|
|
1293
|
+
)
|
|
1294
|
+
ANY =
|
|
1295
|
+
T.let(
|
|
1296
|
+
:any,
|
|
1297
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptionSettings::Interruptible::TaggedSymbol
|
|
1298
|
+
)
|
|
1299
|
+
SPEECH =
|
|
1300
|
+
T.let(
|
|
1301
|
+
:speech,
|
|
1302
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptionSettings::Interruptible::TaggedSymbol
|
|
1303
|
+
)
|
|
1304
|
+
DTMF =
|
|
1305
|
+
T.let(
|
|
1306
|
+
:dtmf,
|
|
1307
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptionSettings::Interruptible::TaggedSymbol
|
|
1308
|
+
)
|
|
1309
|
+
|
|
1310
|
+
sig do
|
|
1311
|
+
override.returns(
|
|
1312
|
+
T::Array[
|
|
1313
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptionSettings::Interruptible::TaggedSymbol
|
|
1314
|
+
]
|
|
1315
|
+
)
|
|
1316
|
+
end
|
|
1317
|
+
def self.values
|
|
1318
|
+
end
|
|
1319
|
+
end
|
|
1320
|
+
|
|
1321
|
+
# Controls when caller input can interrupt assistant speech. `any` allows speech
|
|
1322
|
+
# or DTMF interruptions; `none` disables interruptions; `speech` allows speech
|
|
1323
|
+
# only; `dtmf` allows DTMF only.
|
|
1324
|
+
module InterruptibleGreeting
|
|
1325
|
+
extend Telnyx::Internal::Type::Enum
|
|
1326
|
+
|
|
1327
|
+
TaggedSymbol =
|
|
1328
|
+
T.type_alias do
|
|
1329
|
+
T.all(
|
|
1330
|
+
Symbol,
|
|
1331
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptionSettings::InterruptibleGreeting
|
|
1332
|
+
)
|
|
1333
|
+
end
|
|
1334
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1335
|
+
|
|
1336
|
+
NONE =
|
|
1337
|
+
T.let(
|
|
1338
|
+
:none,
|
|
1339
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptionSettings::InterruptibleGreeting::TaggedSymbol
|
|
1340
|
+
)
|
|
1341
|
+
ANY =
|
|
1342
|
+
T.let(
|
|
1343
|
+
:any,
|
|
1344
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptionSettings::InterruptibleGreeting::TaggedSymbol
|
|
1345
|
+
)
|
|
1346
|
+
SPEECH =
|
|
1347
|
+
T.let(
|
|
1348
|
+
:speech,
|
|
1349
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptionSettings::InterruptibleGreeting::TaggedSymbol
|
|
1350
|
+
)
|
|
1351
|
+
DTMF =
|
|
1352
|
+
T.let(
|
|
1353
|
+
:dtmf,
|
|
1354
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptionSettings::InterruptibleGreeting::TaggedSymbol
|
|
1355
|
+
)
|
|
1356
|
+
|
|
1357
|
+
sig do
|
|
1358
|
+
override.returns(
|
|
1359
|
+
T::Array[
|
|
1360
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptionSettings::InterruptibleGreeting::TaggedSymbol
|
|
1361
|
+
]
|
|
1362
|
+
)
|
|
1363
|
+
end
|
|
1364
|
+
def self.values
|
|
1365
|
+
end
|
|
1366
|
+
end
|
|
1367
|
+
|
|
1368
|
+
# Controls when caller input can interrupt assistant speech. `any` allows speech
|
|
1369
|
+
# or DTMF interruptions; `none` disables interruptions; `speech` allows speech
|
|
1370
|
+
# only; `dtmf` allows DTMF only.
|
|
1371
|
+
module WelcomeGreetingInterruptible
|
|
1372
|
+
extend Telnyx::Internal::Type::Enum
|
|
1373
|
+
|
|
1374
|
+
TaggedSymbol =
|
|
1375
|
+
T.type_alias do
|
|
1376
|
+
T.all(
|
|
1377
|
+
Symbol,
|
|
1378
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptionSettings::WelcomeGreetingInterruptible
|
|
1379
|
+
)
|
|
1380
|
+
end
|
|
1381
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1382
|
+
|
|
1383
|
+
NONE =
|
|
1384
|
+
T.let(
|
|
1385
|
+
:none,
|
|
1386
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptionSettings::WelcomeGreetingInterruptible::TaggedSymbol
|
|
1387
|
+
)
|
|
1388
|
+
ANY =
|
|
1389
|
+
T.let(
|
|
1390
|
+
:any,
|
|
1391
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptionSettings::WelcomeGreetingInterruptible::TaggedSymbol
|
|
1392
|
+
)
|
|
1393
|
+
SPEECH =
|
|
1394
|
+
T.let(
|
|
1395
|
+
:speech,
|
|
1396
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptionSettings::WelcomeGreetingInterruptible::TaggedSymbol
|
|
1397
|
+
)
|
|
1398
|
+
DTMF =
|
|
1399
|
+
T.let(
|
|
1400
|
+
:dtmf,
|
|
1401
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptionSettings::WelcomeGreetingInterruptible::TaggedSymbol
|
|
1402
|
+
)
|
|
1403
|
+
|
|
1404
|
+
sig do
|
|
1405
|
+
override.returns(
|
|
1406
|
+
T::Array[
|
|
1407
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::InterruptionSettings::WelcomeGreetingInterruptible::TaggedSymbol
|
|
1408
|
+
]
|
|
1409
|
+
)
|
|
1410
|
+
end
|
|
1411
|
+
def self.values
|
|
1412
|
+
end
|
|
1413
|
+
end
|
|
1414
|
+
end
|
|
1415
|
+
|
|
1416
|
+
class Language < Telnyx::Internal::Type::BaseModel
|
|
1417
|
+
OrHash =
|
|
1418
|
+
T.type_alias do
|
|
1419
|
+
T.any(
|
|
1420
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::Language,
|
|
1421
|
+
Telnyx::Internal::AnyHash
|
|
1422
|
+
)
|
|
1423
|
+
end
|
|
1424
|
+
|
|
1425
|
+
# BCP 47 language tag for this language configuration.
|
|
1426
|
+
sig { returns(String) }
|
|
1427
|
+
attr_accessor :language
|
|
1428
|
+
|
|
1429
|
+
# Conversation Relay speech model. Prefer
|
|
1430
|
+
# `transcription_engine_config.transcription_model` when configuring
|
|
1431
|
+
# speech-to-text.
|
|
1432
|
+
sig { returns(T.nilable(String)) }
|
|
1433
|
+
attr_reader :speech_model
|
|
1434
|
+
|
|
1435
|
+
sig { params(speech_model: String).void }
|
|
1436
|
+
attr_writer :speech_model
|
|
1437
|
+
|
|
1438
|
+
# Engine to use for speech recognition. Legacy values `A` - `Google`, `B` -
|
|
1439
|
+
# `Telnyx` are supported for backward compatibility. When provided in a
|
|
1440
|
+
# Conversation Relay language entry, Telnyx derives `transcription_provider` and
|
|
1441
|
+
# `speech_model` for that language.
|
|
1442
|
+
sig do
|
|
1443
|
+
returns(
|
|
1444
|
+
T.nilable(
|
|
1445
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::Language::TranscriptionEngine::OrSymbol
|
|
1446
|
+
)
|
|
1447
|
+
)
|
|
1448
|
+
end
|
|
1449
|
+
attr_reader :transcription_engine
|
|
1450
|
+
|
|
1451
|
+
sig do
|
|
1452
|
+
params(
|
|
1453
|
+
transcription_engine:
|
|
1454
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::Language::TranscriptionEngine::OrSymbol
|
|
1455
|
+
).void
|
|
1456
|
+
end
|
|
1457
|
+
attr_writer :transcription_engine
|
|
1458
|
+
|
|
1459
|
+
# Engine-specific transcription settings for Conversation Relay. This accepts the
|
|
1460
|
+
# same provider-specific options used by the Call Transcription Start command,
|
|
1461
|
+
# such as `transcription_model`, without requiring the engine discriminator to be
|
|
1462
|
+
# repeated inside this object.
|
|
1463
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
1464
|
+
attr_reader :transcription_engine_config
|
|
1465
|
+
|
|
1466
|
+
sig do
|
|
1467
|
+
params(
|
|
1468
|
+
transcription_engine_config: T::Hash[Symbol, T.anything]
|
|
1469
|
+
).void
|
|
1470
|
+
end
|
|
1471
|
+
attr_writer :transcription_engine_config
|
|
1472
|
+
|
|
1473
|
+
# Conversation Relay transcription provider name. Prefer `transcription_engine`
|
|
1474
|
+
# when configuring speech-to-text.
|
|
1475
|
+
sig { returns(T.nilable(String)) }
|
|
1476
|
+
attr_reader :transcription_provider
|
|
1477
|
+
|
|
1478
|
+
sig { params(transcription_provider: String).void }
|
|
1479
|
+
attr_writer :transcription_provider
|
|
1480
|
+
|
|
1481
|
+
# Text-to-speech provider for this language. If omitted and `voice` is provided,
|
|
1482
|
+
# Telnyx derives the provider from the voice identifier.
|
|
1483
|
+
sig { returns(T.nilable(String)) }
|
|
1484
|
+
attr_reader :tts_provider
|
|
1485
|
+
|
|
1486
|
+
sig { params(tts_provider: String).void }
|
|
1487
|
+
attr_writer :tts_provider
|
|
1488
|
+
|
|
1489
|
+
# Voice identifier for this language.
|
|
1490
|
+
sig { returns(T.nilable(String)) }
|
|
1491
|
+
attr_reader :voice
|
|
1492
|
+
|
|
1493
|
+
sig { params(voice: String).void }
|
|
1494
|
+
attr_writer :voice
|
|
1495
|
+
|
|
1496
|
+
# The settings associated with the voice selected
|
|
1497
|
+
sig do
|
|
1498
|
+
returns(
|
|
1499
|
+
T.nilable(
|
|
1500
|
+
T.any(
|
|
1501
|
+
Telnyx::Calls::ElevenLabsVoiceSettings,
|
|
1502
|
+
Telnyx::Calls::TelnyxVoiceSettings,
|
|
1503
|
+
Telnyx::Calls::AwsVoiceSettings,
|
|
1504
|
+
Telnyx::MinimaxVoiceSettings,
|
|
1505
|
+
Telnyx::AzureVoiceSettings,
|
|
1506
|
+
Telnyx::RimeVoiceSettings,
|
|
1507
|
+
Telnyx::ResembleVoiceSettings,
|
|
1508
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::Language::VoiceSettings::Inworld,
|
|
1509
|
+
Telnyx::XaiVoiceSettings
|
|
1510
|
+
)
|
|
1511
|
+
)
|
|
1512
|
+
)
|
|
1513
|
+
end
|
|
1514
|
+
attr_reader :voice_settings
|
|
1515
|
+
|
|
1516
|
+
sig do
|
|
1517
|
+
params(
|
|
1518
|
+
voice_settings:
|
|
1519
|
+
T.any(
|
|
1520
|
+
Telnyx::Calls::ElevenLabsVoiceSettings::OrHash,
|
|
1521
|
+
Telnyx::Calls::TelnyxVoiceSettings::OrHash,
|
|
1522
|
+
Telnyx::Calls::AwsVoiceSettings::OrHash,
|
|
1523
|
+
Telnyx::MinimaxVoiceSettings::OrHash,
|
|
1524
|
+
Telnyx::AzureVoiceSettings::OrHash,
|
|
1525
|
+
Telnyx::RimeVoiceSettings::OrHash,
|
|
1526
|
+
Telnyx::ResembleVoiceSettings::OrHash,
|
|
1527
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::Language::VoiceSettings::Inworld::OrHash,
|
|
1528
|
+
Telnyx::XaiVoiceSettings::OrHash
|
|
1529
|
+
)
|
|
1530
|
+
).void
|
|
1531
|
+
end
|
|
1532
|
+
attr_writer :voice_settings
|
|
1533
|
+
|
|
1534
|
+
# Language-specific TTS and transcription settings for Conversation Relay.
|
|
1535
|
+
sig do
|
|
1536
|
+
params(
|
|
1537
|
+
language: String,
|
|
1538
|
+
speech_model: String,
|
|
1539
|
+
transcription_engine:
|
|
1540
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::Language::TranscriptionEngine::OrSymbol,
|
|
1541
|
+
transcription_engine_config: T::Hash[Symbol, T.anything],
|
|
1542
|
+
transcription_provider: String,
|
|
1543
|
+
tts_provider: String,
|
|
1544
|
+
voice: String,
|
|
1545
|
+
voice_settings:
|
|
1546
|
+
T.any(
|
|
1547
|
+
Telnyx::Calls::ElevenLabsVoiceSettings::OrHash,
|
|
1548
|
+
Telnyx::Calls::TelnyxVoiceSettings::OrHash,
|
|
1549
|
+
Telnyx::Calls::AwsVoiceSettings::OrHash,
|
|
1550
|
+
Telnyx::MinimaxVoiceSettings::OrHash,
|
|
1551
|
+
Telnyx::AzureVoiceSettings::OrHash,
|
|
1552
|
+
Telnyx::RimeVoiceSettings::OrHash,
|
|
1553
|
+
Telnyx::ResembleVoiceSettings::OrHash,
|
|
1554
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::Language::VoiceSettings::Inworld::OrHash,
|
|
1555
|
+
Telnyx::XaiVoiceSettings::OrHash
|
|
1556
|
+
)
|
|
1557
|
+
).returns(T.attached_class)
|
|
1558
|
+
end
|
|
1559
|
+
def self.new(
|
|
1560
|
+
# BCP 47 language tag for this language configuration.
|
|
1561
|
+
language:,
|
|
1562
|
+
# Conversation Relay speech model. Prefer
|
|
1563
|
+
# `transcription_engine_config.transcription_model` when configuring
|
|
1564
|
+
# speech-to-text.
|
|
1565
|
+
speech_model: nil,
|
|
1566
|
+
# Engine to use for speech recognition. Legacy values `A` - `Google`, `B` -
|
|
1567
|
+
# `Telnyx` are supported for backward compatibility. When provided in a
|
|
1568
|
+
# Conversation Relay language entry, Telnyx derives `transcription_provider` and
|
|
1569
|
+
# `speech_model` for that language.
|
|
1570
|
+
transcription_engine: nil,
|
|
1571
|
+
# Engine-specific transcription settings for Conversation Relay. This accepts the
|
|
1572
|
+
# same provider-specific options used by the Call Transcription Start command,
|
|
1573
|
+
# such as `transcription_model`, without requiring the engine discriminator to be
|
|
1574
|
+
# repeated inside this object.
|
|
1575
|
+
transcription_engine_config: nil,
|
|
1576
|
+
# Conversation Relay transcription provider name. Prefer `transcription_engine`
|
|
1577
|
+
# when configuring speech-to-text.
|
|
1578
|
+
transcription_provider: nil,
|
|
1579
|
+
# Text-to-speech provider for this language. If omitted and `voice` is provided,
|
|
1580
|
+
# Telnyx derives the provider from the voice identifier.
|
|
1581
|
+
tts_provider: nil,
|
|
1582
|
+
# Voice identifier for this language.
|
|
1583
|
+
voice: nil,
|
|
1584
|
+
# The settings associated with the voice selected
|
|
1585
|
+
voice_settings: nil
|
|
1586
|
+
)
|
|
1587
|
+
end
|
|
1588
|
+
|
|
1589
|
+
sig do
|
|
1590
|
+
override.returns(
|
|
1591
|
+
{
|
|
1592
|
+
language: String,
|
|
1593
|
+
speech_model: String,
|
|
1594
|
+
transcription_engine:
|
|
1595
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::Language::TranscriptionEngine::OrSymbol,
|
|
1596
|
+
transcription_engine_config: T::Hash[Symbol, T.anything],
|
|
1597
|
+
transcription_provider: String,
|
|
1598
|
+
tts_provider: String,
|
|
1599
|
+
voice: String,
|
|
1600
|
+
voice_settings:
|
|
1601
|
+
T.any(
|
|
1602
|
+
Telnyx::Calls::ElevenLabsVoiceSettings,
|
|
1603
|
+
Telnyx::Calls::TelnyxVoiceSettings,
|
|
1604
|
+
Telnyx::Calls::AwsVoiceSettings,
|
|
1605
|
+
Telnyx::MinimaxVoiceSettings,
|
|
1606
|
+
Telnyx::AzureVoiceSettings,
|
|
1607
|
+
Telnyx::RimeVoiceSettings,
|
|
1608
|
+
Telnyx::ResembleVoiceSettings,
|
|
1609
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::Language::VoiceSettings::Inworld,
|
|
1610
|
+
Telnyx::XaiVoiceSettings
|
|
1611
|
+
)
|
|
1612
|
+
}
|
|
1613
|
+
)
|
|
1614
|
+
end
|
|
1615
|
+
def to_hash
|
|
1616
|
+
end
|
|
1617
|
+
|
|
1618
|
+
# Engine to use for speech recognition. Legacy values `A` - `Google`, `B` -
|
|
1619
|
+
# `Telnyx` are supported for backward compatibility. When provided in a
|
|
1620
|
+
# Conversation Relay language entry, Telnyx derives `transcription_provider` and
|
|
1621
|
+
# `speech_model` for that language.
|
|
1622
|
+
module TranscriptionEngine
|
|
1623
|
+
extend Telnyx::Internal::Type::Enum
|
|
1624
|
+
|
|
1625
|
+
TaggedSymbol =
|
|
1626
|
+
T.type_alias do
|
|
1627
|
+
T.all(
|
|
1628
|
+
Symbol,
|
|
1629
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::Language::TranscriptionEngine
|
|
1630
|
+
)
|
|
1631
|
+
end
|
|
1632
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1633
|
+
|
|
1634
|
+
GOOGLE =
|
|
1635
|
+
T.let(
|
|
1636
|
+
:Google,
|
|
1637
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::Language::TranscriptionEngine::TaggedSymbol
|
|
1638
|
+
)
|
|
1639
|
+
TELNYX =
|
|
1640
|
+
T.let(
|
|
1641
|
+
:Telnyx,
|
|
1642
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::Language::TranscriptionEngine::TaggedSymbol
|
|
1643
|
+
)
|
|
1644
|
+
DEEPGRAM =
|
|
1645
|
+
T.let(
|
|
1646
|
+
:Deepgram,
|
|
1647
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::Language::TranscriptionEngine::TaggedSymbol
|
|
1648
|
+
)
|
|
1649
|
+
AZURE =
|
|
1650
|
+
T.let(
|
|
1651
|
+
:Azure,
|
|
1652
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::Language::TranscriptionEngine::TaggedSymbol
|
|
1653
|
+
)
|
|
1654
|
+
X_AI =
|
|
1655
|
+
T.let(
|
|
1656
|
+
:xAI,
|
|
1657
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::Language::TranscriptionEngine::TaggedSymbol
|
|
1658
|
+
)
|
|
1659
|
+
ASSEMBLY_AI =
|
|
1660
|
+
T.let(
|
|
1661
|
+
:AssemblyAI,
|
|
1662
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::Language::TranscriptionEngine::TaggedSymbol
|
|
1663
|
+
)
|
|
1664
|
+
SPEECHMATICS =
|
|
1665
|
+
T.let(
|
|
1666
|
+
:Speechmatics,
|
|
1667
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::Language::TranscriptionEngine::TaggedSymbol
|
|
1668
|
+
)
|
|
1669
|
+
SONIOX =
|
|
1670
|
+
T.let(
|
|
1671
|
+
:Soniox,
|
|
1672
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::Language::TranscriptionEngine::TaggedSymbol
|
|
1673
|
+
)
|
|
1674
|
+
A =
|
|
1675
|
+
T.let(
|
|
1676
|
+
:A,
|
|
1677
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::Language::TranscriptionEngine::TaggedSymbol
|
|
1678
|
+
)
|
|
1679
|
+
B =
|
|
1680
|
+
T.let(
|
|
1681
|
+
:B,
|
|
1682
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::Language::TranscriptionEngine::TaggedSymbol
|
|
1683
|
+
)
|
|
1684
|
+
|
|
1685
|
+
sig do
|
|
1686
|
+
override.returns(
|
|
1687
|
+
T::Array[
|
|
1688
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::Language::TranscriptionEngine::TaggedSymbol
|
|
1689
|
+
]
|
|
1690
|
+
)
|
|
1691
|
+
end
|
|
1692
|
+
def self.values
|
|
1693
|
+
end
|
|
1694
|
+
end
|
|
1695
|
+
|
|
1696
|
+
# The settings associated with the voice selected
|
|
1697
|
+
module VoiceSettings
|
|
1698
|
+
extend Telnyx::Internal::Type::Union
|
|
1699
|
+
|
|
1700
|
+
Variants =
|
|
1701
|
+
T.type_alias do
|
|
1702
|
+
T.any(
|
|
1703
|
+
Telnyx::Calls::ElevenLabsVoiceSettings,
|
|
1704
|
+
Telnyx::Calls::TelnyxVoiceSettings,
|
|
1705
|
+
Telnyx::Calls::AwsVoiceSettings,
|
|
1706
|
+
Telnyx::MinimaxVoiceSettings,
|
|
1707
|
+
Telnyx::AzureVoiceSettings,
|
|
1708
|
+
Telnyx::RimeVoiceSettings,
|
|
1709
|
+
Telnyx::ResembleVoiceSettings,
|
|
1710
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::Language::VoiceSettings::Inworld,
|
|
1711
|
+
Telnyx::XaiVoiceSettings
|
|
1712
|
+
)
|
|
1713
|
+
end
|
|
1714
|
+
|
|
1715
|
+
class Inworld < Telnyx::Internal::Type::BaseModel
|
|
1716
|
+
OrHash =
|
|
1717
|
+
T.type_alias do
|
|
1718
|
+
T.any(
|
|
1719
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::Language::VoiceSettings::Inworld,
|
|
1720
|
+
Telnyx::Internal::AnyHash
|
|
1721
|
+
)
|
|
1722
|
+
end
|
|
1723
|
+
|
|
1724
|
+
# Voice settings provider type
|
|
1725
|
+
sig { returns(Symbol) }
|
|
1726
|
+
attr_accessor :type
|
|
1727
|
+
|
|
1728
|
+
sig { params(type: Symbol).returns(T.attached_class) }
|
|
1729
|
+
def self.new(
|
|
1730
|
+
# Voice settings provider type
|
|
1731
|
+
type: :inworld
|
|
1732
|
+
)
|
|
1733
|
+
end
|
|
1734
|
+
|
|
1735
|
+
sig { override.returns({ type: Symbol }) }
|
|
1736
|
+
def to_hash
|
|
1737
|
+
end
|
|
1738
|
+
end
|
|
1739
|
+
|
|
1740
|
+
sig do
|
|
1741
|
+
override.returns(
|
|
1742
|
+
T::Array[
|
|
1743
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::Language::VoiceSettings::Variants
|
|
1744
|
+
]
|
|
1745
|
+
)
|
|
1746
|
+
end
|
|
1747
|
+
def self.variants
|
|
1748
|
+
end
|
|
1749
|
+
end
|
|
1750
|
+
end
|
|
1751
|
+
|
|
1752
|
+
# Engine to use for speech recognition. Legacy values `A` - `Google`, `B` -
|
|
1753
|
+
# `Telnyx` are supported for backward compatibility. For Conversation Relay, use
|
|
1754
|
+
# this field with `transcription_engine_config`; the `transcription` object is not
|
|
1755
|
+
# supported.
|
|
1756
|
+
module TranscriptionEngine
|
|
1757
|
+
extend Telnyx::Internal::Type::Enum
|
|
1758
|
+
|
|
1759
|
+
TaggedSymbol =
|
|
1760
|
+
T.type_alias do
|
|
1761
|
+
T.all(
|
|
1762
|
+
Symbol,
|
|
1763
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::TranscriptionEngine
|
|
1764
|
+
)
|
|
1765
|
+
end
|
|
1766
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1767
|
+
|
|
1768
|
+
GOOGLE =
|
|
1769
|
+
T.let(
|
|
1770
|
+
:Google,
|
|
1771
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::TranscriptionEngine::TaggedSymbol
|
|
1772
|
+
)
|
|
1773
|
+
TELNYX =
|
|
1774
|
+
T.let(
|
|
1775
|
+
:Telnyx,
|
|
1776
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::TranscriptionEngine::TaggedSymbol
|
|
1777
|
+
)
|
|
1778
|
+
DEEPGRAM =
|
|
1779
|
+
T.let(
|
|
1780
|
+
:Deepgram,
|
|
1781
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::TranscriptionEngine::TaggedSymbol
|
|
1782
|
+
)
|
|
1783
|
+
AZURE =
|
|
1784
|
+
T.let(
|
|
1785
|
+
:Azure,
|
|
1786
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::TranscriptionEngine::TaggedSymbol
|
|
1787
|
+
)
|
|
1788
|
+
X_AI =
|
|
1789
|
+
T.let(
|
|
1790
|
+
:xAI,
|
|
1791
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::TranscriptionEngine::TaggedSymbol
|
|
1792
|
+
)
|
|
1793
|
+
ASSEMBLY_AI =
|
|
1794
|
+
T.let(
|
|
1795
|
+
:AssemblyAI,
|
|
1796
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::TranscriptionEngine::TaggedSymbol
|
|
1797
|
+
)
|
|
1798
|
+
SPEECHMATICS =
|
|
1799
|
+
T.let(
|
|
1800
|
+
:Speechmatics,
|
|
1801
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::TranscriptionEngine::TaggedSymbol
|
|
1802
|
+
)
|
|
1803
|
+
SONIOX =
|
|
1804
|
+
T.let(
|
|
1805
|
+
:Soniox,
|
|
1806
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::TranscriptionEngine::TaggedSymbol
|
|
1807
|
+
)
|
|
1808
|
+
A =
|
|
1809
|
+
T.let(
|
|
1810
|
+
:A,
|
|
1811
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::TranscriptionEngine::TaggedSymbol
|
|
1812
|
+
)
|
|
1813
|
+
B =
|
|
1814
|
+
T.let(
|
|
1815
|
+
:B,
|
|
1816
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::TranscriptionEngine::TaggedSymbol
|
|
1817
|
+
)
|
|
1818
|
+
|
|
1819
|
+
sig do
|
|
1820
|
+
override.returns(
|
|
1821
|
+
T::Array[
|
|
1822
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::TranscriptionEngine::TaggedSymbol
|
|
1823
|
+
]
|
|
1824
|
+
)
|
|
1825
|
+
end
|
|
1826
|
+
def self.values
|
|
1827
|
+
end
|
|
1828
|
+
end
|
|
1829
|
+
|
|
1830
|
+
# The settings associated with the voice selected
|
|
1831
|
+
module VoiceSettings
|
|
1832
|
+
extend Telnyx::Internal::Type::Union
|
|
1833
|
+
|
|
1834
|
+
Variants =
|
|
1835
|
+
T.type_alias do
|
|
1836
|
+
T.any(
|
|
1837
|
+
Telnyx::Calls::ElevenLabsVoiceSettings,
|
|
1838
|
+
Telnyx::Calls::TelnyxVoiceSettings,
|
|
1839
|
+
Telnyx::Calls::AwsVoiceSettings,
|
|
1840
|
+
Telnyx::MinimaxVoiceSettings,
|
|
1841
|
+
Telnyx::AzureVoiceSettings,
|
|
1842
|
+
Telnyx::RimeVoiceSettings,
|
|
1843
|
+
Telnyx::ResembleVoiceSettings,
|
|
1844
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::VoiceSettings::Inworld,
|
|
1845
|
+
Telnyx::XaiVoiceSettings
|
|
1846
|
+
)
|
|
1847
|
+
end
|
|
1848
|
+
|
|
1849
|
+
class Inworld < Telnyx::Internal::Type::BaseModel
|
|
1850
|
+
OrHash =
|
|
1851
|
+
T.type_alias do
|
|
1852
|
+
T.any(
|
|
1853
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::VoiceSettings::Inworld,
|
|
1854
|
+
Telnyx::Internal::AnyHash
|
|
1855
|
+
)
|
|
1856
|
+
end
|
|
1857
|
+
|
|
1858
|
+
# Voice settings provider type
|
|
1859
|
+
sig { returns(Symbol) }
|
|
1860
|
+
attr_accessor :type
|
|
1861
|
+
|
|
1862
|
+
sig { params(type: Symbol).returns(T.attached_class) }
|
|
1863
|
+
def self.new(
|
|
1864
|
+
# Voice settings provider type
|
|
1865
|
+
type: :inworld
|
|
1866
|
+
)
|
|
1867
|
+
end
|
|
1868
|
+
|
|
1869
|
+
sig { override.returns({ type: Symbol }) }
|
|
1870
|
+
def to_hash
|
|
1871
|
+
end
|
|
1872
|
+
end
|
|
1873
|
+
|
|
1874
|
+
sig do
|
|
1875
|
+
override.returns(
|
|
1876
|
+
T::Array[
|
|
1877
|
+
Telnyx::Calls::ActionAnswerParams::ConversationRelayConfig::VoiceSettings::Variants
|
|
1878
|
+
]
|
|
1879
|
+
)
|
|
1880
|
+
end
|
|
1881
|
+
def self.variants
|
|
1882
|
+
end
|
|
1883
|
+
end
|
|
1884
|
+
end
|
|
1885
|
+
|
|
607
1886
|
class DeepfakeDetection < Telnyx::Internal::Type::BaseModel
|
|
608
1887
|
OrHash =
|
|
609
1888
|
T.type_alias do
|