Class: Vapi::TavusConversationProperties
- Inherits:
-
Object
- Object
- Vapi::TavusConversationProperties
- Defined in:
- lib/vapi_server_sdk/types/tavus_conversation_properties.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
-
#apply_greenscreen ⇒ Boolean
readonly
If true, the background will be replaced with a greenscreen (RGB values: ‘[0, 255, 155]`).
-
#aws_assume_role_arn ⇒ String
readonly
The ARN of the role that will be assumed to access the S3 bucket.
-
#enable_recording ⇒ Boolean
readonly
If true, the user will be able to record the conversation.
-
#enable_transcription ⇒ Boolean
readonly
If true, the user will be able to transcribe the conversation.
-
#language ⇒ String
readonly
The language of the conversation.
-
#max_call_duration ⇒ Float
readonly
The maximum duration of the call in seconds.
-
#participant_absent_timeout ⇒ Float
readonly
Starting from conversation creation, the duration in seconds after which the call will be automatically shut down if no participant joins the call.
-
#participant_left_timeout ⇒ Float
readonly
The duration in seconds after which the call will be automatically shut down once the last participant leaves.
-
#recording_s_3_bucket_name ⇒ String
readonly
The name of the S3 bucket where the recording will be stored.
-
#recording_s_3_bucket_region ⇒ String
readonly
The region of the S3 bucket where the recording will be stored.
Class Method Summary collapse
-
.from_json(json_object:) ⇒ Vapi::TavusConversationProperties
Deserialize a JSON object to an instance of TavusConversationProperties.
-
.validate_raw(obj:) ⇒ Void
Leveraged for Union-type generation, validate_raw attempts to parse the given hash and check each fields type against the current object’s property definitions.
Instance Method Summary collapse
- #initialize(max_call_duration: OMIT, participant_left_timeout: OMIT, participant_absent_timeout: OMIT, enable_recording: OMIT, enable_transcription: OMIT, apply_greenscreen: OMIT, language: OMIT, recording_s_3_bucket_name: OMIT, recording_s_3_bucket_region: OMIT, aws_assume_role_arn: OMIT, additional_properties: nil) ⇒ Vapi::TavusConversationProperties constructor
-
#to_json(*_args) ⇒ String
Serialize an instance of TavusConversationProperties to a JSON object.
Constructor Details
#initialize(max_call_duration: OMIT, participant_left_timeout: OMIT, participant_absent_timeout: OMIT, enable_recording: OMIT, enable_transcription: OMIT, apply_greenscreen: OMIT, language: OMIT, recording_s_3_bucket_name: OMIT, recording_s_3_bucket_region: OMIT, aws_assume_role_arn: OMIT, additional_properties: nil) ⇒ Vapi::TavusConversationProperties
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 |
# File 'lib/vapi_server_sdk/types/tavus_conversation_properties.rb', line 86 def initialize(max_call_duration: OMIT, participant_left_timeout: OMIT, participant_absent_timeout: OMIT, enable_recording: OMIT, enable_transcription: OMIT, apply_greenscreen: OMIT, language: OMIT, recording_s_3_bucket_name: OMIT, recording_s_3_bucket_region: OMIT, aws_assume_role_arn: OMIT, additional_properties: nil) @max_call_duration = max_call_duration if max_call_duration != OMIT @participant_left_timeout = participant_left_timeout if participant_left_timeout != OMIT @participant_absent_timeout = participant_absent_timeout if participant_absent_timeout != OMIT @enable_recording = enable_recording if enable_recording != OMIT @enable_transcription = enable_transcription if enable_transcription != OMIT @apply_greenscreen = apply_greenscreen if apply_greenscreen != OMIT @language = language if language != OMIT @recording_s_3_bucket_name = recording_s_3_bucket_name if recording_s_3_bucket_name != OMIT @recording_s_3_bucket_region = recording_s_3_bucket_region if recording_s_3_bucket_region != OMIT @aws_assume_role_arn = aws_assume_role_arn if aws_assume_role_arn != OMIT @additional_properties = additional_properties @_field_set = { "maxCallDuration": max_call_duration, "participantLeftTimeout": participant_left_timeout, "participantAbsentTimeout": participant_absent_timeout, "enableRecording": enable_recording, "enableTranscription": enable_transcription, "applyGreenscreen": apply_greenscreen, "language": language, "recordingS3BucketName": recording_s_3_bucket_name, "recordingS3BucketRegion": recording_s_3_bucket_region, "awsAssumeRoleArn": aws_assume_role_arn }.reject do |_k, v| v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
48 49 50 |
# File 'lib/vapi_server_sdk/types/tavus_conversation_properties.rb', line 48 def additional_properties @additional_properties end |
#apply_greenscreen ⇒ Boolean (readonly)
Returns If true, the background will be replaced with a greenscreen (RGB values: ‘[0, 255, 155]`). You can use WebGL on the frontend to make the greenscreen transparent or change its color.
31 32 33 |
# File 'lib/vapi_server_sdk/types/tavus_conversation_properties.rb', line 31 def apply_greenscreen @apply_greenscreen end |
#aws_assume_role_arn ⇒ String (readonly)
Returns The ARN of the role that will be assumed to access the S3 bucket.
46 47 48 |
# File 'lib/vapi_server_sdk/types/tavus_conversation_properties.rb', line 46 def aws_assume_role_arn @aws_assume_role_arn end |
#enable_recording ⇒ Boolean (readonly)
Returns If true, the user will be able to record the conversation.
21 22 23 |
# File 'lib/vapi_server_sdk/types/tavus_conversation_properties.rb', line 21 def enable_recording @enable_recording end |
#enable_transcription ⇒ Boolean (readonly)
Returns If true, the user will be able to transcribe the conversation. You can find more instructions on displaying transcriptions if you are using your custom DailyJS components here. You need to have an event listener on Daily that listens for ‘app-messages`.
26 27 28 |
# File 'lib/vapi_server_sdk/types/tavus_conversation_properties.rb', line 26 def enable_transcription @enable_transcription end |
#language ⇒ String (readonly)
Returns The language of the conversation. Please provide the **full language name**, not the two-letter code. If you are using your own TTS voice, please ensure it supports the language you provide. If you are using a stock replica or default persona, please note that only ElevenLabs and Cartesia supported languages are available. You can find a full list of supported languages for Cartesia here, for ElevenLabs here, and for PlayHT here.
40 41 42 |
# File 'lib/vapi_server_sdk/types/tavus_conversation_properties.rb', line 40 def language @language end |
#max_call_duration ⇒ Float (readonly)
Returns The maximum duration of the call in seconds. The default ‘maxCallDuration` is 3600 seconds (1 hour). Once the time limit specified by this parameter has been reached, the conversation will automatically shut down.
12 13 14 |
# File 'lib/vapi_server_sdk/types/tavus_conversation_properties.rb', line 12 def max_call_duration @max_call_duration end |
#participant_absent_timeout ⇒ Float (readonly)
Returns Starting from conversation creation, the duration in seconds after which the call will be automatically shut down if no participant joins the call. Default is 300 seconds (5 minutes).
19 20 21 |
# File 'lib/vapi_server_sdk/types/tavus_conversation_properties.rb', line 19 def participant_absent_timeout @participant_absent_timeout end |
#participant_left_timeout ⇒ Float (readonly)
Returns The duration in seconds after which the call will be automatically shut down once the last participant leaves.
15 16 17 |
# File 'lib/vapi_server_sdk/types/tavus_conversation_properties.rb', line 15 def participant_left_timeout @participant_left_timeout end |
#recording_s_3_bucket_name ⇒ String (readonly)
Returns The name of the S3 bucket where the recording will be stored.
42 43 44 |
# File 'lib/vapi_server_sdk/types/tavus_conversation_properties.rb', line 42 def recording_s_3_bucket_name @recording_s_3_bucket_name end |
#recording_s_3_bucket_region ⇒ String (readonly)
Returns The region of the S3 bucket where the recording will be stored.
44 45 46 |
# File 'lib/vapi_server_sdk/types/tavus_conversation_properties.rb', line 44 def recording_s_3_bucket_region @recording_s_3_bucket_region end |
Class Method Details
.from_json(json_object:) ⇒ Vapi::TavusConversationProperties
Deserialize a JSON object to an instance of TavusConversationProperties
119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 |
# File 'lib/vapi_server_sdk/types/tavus_conversation_properties.rb', line 119 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) max_call_duration = parsed_json["maxCallDuration"] participant_left_timeout = parsed_json["participantLeftTimeout"] participant_absent_timeout = parsed_json["participantAbsentTimeout"] enable_recording = parsed_json["enableRecording"] enable_transcription = parsed_json["enableTranscription"] apply_greenscreen = parsed_json["applyGreenscreen"] language = parsed_json["language"] recording_s_3_bucket_name = parsed_json["recordingS3BucketName"] recording_s_3_bucket_region = parsed_json["recordingS3BucketRegion"] aws_assume_role_arn = parsed_json["awsAssumeRoleArn"] new( max_call_duration: max_call_duration, participant_left_timeout: participant_left_timeout, participant_absent_timeout: participant_absent_timeout, enable_recording: enable_recording, enable_transcription: enable_transcription, apply_greenscreen: apply_greenscreen, language: language, recording_s_3_bucket_name: recording_s_3_bucket_name, recording_s_3_bucket_region: recording_s_3_bucket_region, aws_assume_role_arn: aws_assume_role_arn, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
Leveraged for Union-type generation, validate_raw attempts to parse the given
hash and check each fields type against the current object's property
definitions.
160 161 162 163 164 165 166 167 168 169 170 171 |
# File 'lib/vapi_server_sdk/types/tavus_conversation_properties.rb', line 160 def self.validate_raw(obj:) obj.max_call_duration&.is_a?(Float) != false || raise("Passed value for field obj.max_call_duration is not the expected type, validation failed.") obj.participant_left_timeout&.is_a?(Float) != false || raise("Passed value for field obj.participant_left_timeout is not the expected type, validation failed.") obj.participant_absent_timeout&.is_a?(Float) != false || raise("Passed value for field obj.participant_absent_timeout is not the expected type, validation failed.") obj.enable_recording&.is_a?(Boolean) != false || raise("Passed value for field obj.enable_recording is not the expected type, validation failed.") obj.enable_transcription&.is_a?(Boolean) != false || raise("Passed value for field obj.enable_transcription is not the expected type, validation failed.") obj.apply_greenscreen&.is_a?(Boolean) != false || raise("Passed value for field obj.apply_greenscreen is not the expected type, validation failed.") obj.language&.is_a?(String) != false || raise("Passed value for field obj.language is not the expected type, validation failed.") obj.recording_s_3_bucket_name&.is_a?(String) != false || raise("Passed value for field obj.recording_s_3_bucket_name is not the expected type, validation failed.") obj.recording_s_3_bucket_region&.is_a?(String) != false || raise("Passed value for field obj.recording_s_3_bucket_region is not the expected type, validation failed.") obj.aws_assume_role_arn&.is_a?(String) != false || raise("Passed value for field obj.aws_assume_role_arn is not the expected type, validation failed.") end |
Instance Method Details
#to_json(*_args) ⇒ String
Serialize an instance of TavusConversationProperties to a JSON object
150 151 152 |
# File 'lib/vapi_server_sdk/types/tavus_conversation_properties.rb', line 150 def to_json(*_args) @_field_set&.to_json end |