Class: Telnyx::Models::CallDialParams::ConversationRelayConfig

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/telnyx/models/call_dial_params.rb

Defined Under Namespace

Modules: Interruptible, InterruptibleGreeting, TranscriptionEngine, VoiceSettings

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#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) ⇒ Object

Some parameter documentations has been truncated, see Telnyx::Models::CallDialParams::ConversationRelayConfig for more details.

Starts a Conversation Relay session automatically when the answered/dialed call is answered. This embedded shape is supported on ‘answer` and `dial`. It uses public field names (`url`, `dtmf_detection`, `greeting`, `voice`, `language`, etc.) and maps them to the underlying Conversation Relay action. `client_state`, `tts_language`, and `transcription_language` inside this object are ignored; use the parent command’s ‘client_state` and `command_id` fields instead.

Parameters:



# File 'lib/telnyx/models/call_dial_params.rb', line 1092

Instance Attribute Details

#custom_parametersHash{Symbol=>Object}?

Custom key-value parameters forwarded to the relay session as assistant dynamic variables.

Returns:

  • (Hash{Symbol=>Object}, nil)


966
# File 'lib/telnyx/models/call_dial_params.rb', line 966

optional :custom_parameters, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]

#dtmf_detectionBoolean?

Enable DTMF detection for the relay session.

Returns:

  • (Boolean, nil)


972
# File 'lib/telnyx/models/call_dial_params.rb', line 972

optional :dtmf_detection, Telnyx::Internal::Type::Boolean

#greetingString?

Text played when the relay session starts.

Returns:

  • (String, nil)


978
# File 'lib/telnyx/models/call_dial_params.rb', line 978

optional :greeting, String

#interruptibleSymbol, ...

Controls when caller input can interrupt assistant speech. ‘any` allows speech or DTMF interruptions; `none` disables interruptions; `speech` allows speech only; `dtmf` allows DTMF only.



986
# File 'lib/telnyx/models/call_dial_params.rb', line 986

optional :interruptible, enum: -> { Telnyx::CallDialParams::ConversationRelayConfig::Interruptible }

#interruptible_greetingSymbol, ...

Controls when caller input can interrupt assistant speech. ‘any` allows speech or DTMF interruptions; `none` disables interruptions; `speech` allows speech only; `dtmf` allows DTMF only.



994
995
# File 'lib/telnyx/models/call_dial_params.rb', line 994

optional :interruptible_greeting,
enum: -> { Telnyx::CallDialParams::ConversationRelayConfig::InterruptibleGreeting }

#interruption_settingsTelnyx::Models::ConversationRelayInterruptionSettings?

Settings for handling caller interruptions during Conversation Relay speech.



1001
# File 'lib/telnyx/models/call_dial_params.rb', line 1001

optional :interruption_settings, -> { Telnyx::ConversationRelayInterruptionSettings }

#languageString?

Default language for both text-to-speech and speech recognition.

Returns:

  • (String, nil)


1007
# File 'lib/telnyx/models/call_dial_params.rb', line 1007

optional :language, String

#languagesArray<Telnyx::Models::ConversationRelayLanguage>?

Per-language TTS and transcription settings.



1013
# File 'lib/telnyx/models/call_dial_params.rb', line 1013

optional :languages, -> { Telnyx::Internal::Type::ArrayOf[Telnyx::ConversationRelayLanguage] }

#providerString?

Structured voice provider. Must be supplied together with ‘structured_provider`.

Returns:

  • (String, nil)


1019
# File 'lib/telnyx/models/call_dial_params.rb', line 1019

optional :provider, String

#structured_providerHash{Symbol=>Object}?

Provider-specific structured voice settings. Must be supplied together with ‘provider`; Telnyx sends the value as the nested provider configuration for Conversation Relay.

Returns:

  • (Hash{Symbol=>Object}, nil)


1027
# File 'lib/telnyx/models/call_dial_params.rb', line 1027

optional :structured_provider, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]

#transcription_engineSymbol, ...

Engine to use for speech recognition. Legacy values ‘A` - `Google`, `B` - `Telnyx` are supported for backward compatibility. For Conversation Relay, use this field with `transcription_engine_config`; the `transcription` object is not supported.



1036
1037
# File 'lib/telnyx/models/call_dial_params.rb', line 1036

optional :transcription_engine,
enum: -> { Telnyx::CallDialParams::ConversationRelayConfig::TranscriptionEngine }

#transcription_engine_configHash{Symbol=>Object}?

Engine-specific transcription settings for Conversation Relay. This accepts the same provider-specific options used by the Call Transcription Start command, such as ‘transcription_model`, without requiring the engine discriminator to be repeated inside this object.

Returns:

  • (Hash{Symbol=>Object}, nil)


1046
# File 'lib/telnyx/models/call_dial_params.rb', line 1046

optional :transcription_engine_config, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]

#tts_providerString?

Text-to-speech provider. If omitted, Telnyx derives it from ‘voice` or `provider`.

Returns:

  • (String, nil)


1053
# File 'lib/telnyx/models/call_dial_params.rb', line 1053

optional :tts_provider, String

#urlString

WebSocket URL for your Conversation Relay server. Must start with ‘ws://` or `wss://`.

Returns:

  • (String)


959
# File 'lib/telnyx/models/call_dial_params.rb', line 959

required :url, String

#voiceString?

The voice to be used by the voice assistant. Currently we support ElevenLabs, Telnyx and AWS voices.

**Supported Providers:**

  • AWS: Use ‘AWS.Polly.<VoiceId>` (e.g., `AWS.Polly.Joanna`). For neural voices, which provide more realistic, human-like speech, append `-Neural` to the `VoiceId` (e.g., `AWS.Polly.Joanna-Neural`). Check the [available voices](docs.aws.amazon.com/polly/latest/dg/available-voices.html) for compatibility.

  • Azure: Use ‘Azure.<VoiceId>. (e.g. Azure.en-CA-ClaraNeural, Azure.en-CA-LiamNeural, Azure.en-US-BrianMultilingualNeural, Azure.en-US-Ava:DragonHDLatestNeural. For a complete list of voices, go to [Azure Voice Gallery](speech.microsoft.com/portal/voicegallery).)

  • ElevenLabs: Use ‘ElevenLabs.<ModelId>.<VoiceId>` (e.g., `ElevenLabs.BaseModel.John`). The `ModelId` part is optional. To use ElevenLabs, you must provide your ElevenLabs API key as an integration secret under `“voice_settings”: “<secret_id>”`. See [integration secrets documentation](developers.telnyx.com/api/secrets-manager/integration-secrets/create-integration-secret) for details. Check [available voices](elevenlabs.io/docs/api-reference/get-voices).

  • Telnyx: Use ‘Telnyx.<model_id>.<voice_id>`

  • Inworld: Use ‘Inworld.<ModelId>.<VoiceId>` (e.g., `Inworld.Mini.Loretta`, `Inworld.Max.Oliver`). Supported models: `Mini`, `Max`.

  • xAI: Use ‘xAI.<VoiceId>` (e.g., `xAI.eve`). Available voices: `eve`, `ara`, `rex`, `sal`, `leo`.

Returns:

  • (String, nil)


1084
# File 'lib/telnyx/models/call_dial_params.rb', line 1084

optional :voice, String

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/telnyx/models/call_dial_params.rb', line 1148