telnyx 5.85.0 → 5.87.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.
@@ -17,6 +17,18 @@ module Telnyx
17
17
  # @return [Telnyx::Models::VerifyProfileCreateParams::Call, nil]
18
18
  optional :call, -> { Telnyx::VerifyProfileCreateParams::Call }
19
19
 
20
+ # @!attribute daily_spend_limit
21
+ # The maximum daily spend allowed on this verify profile, in USD.
22
+ #
23
+ # @return [Float, nil]
24
+ optional :daily_spend_limit, Float
25
+
26
+ # @!attribute daily_spend_limit_enabled
27
+ # Whether the daily spend limit is enforced for this verify profile.
28
+ #
29
+ # @return [Boolean, nil]
30
+ optional :daily_spend_limit_enabled, Telnyx::Internal::Type::Boolean
31
+
20
32
  # @!attribute flashcall
21
33
  #
22
34
  # @return [Telnyx::Models::VerifyProfileCreateParams::Flashcall, nil]
@@ -27,11 +39,6 @@ module Telnyx
27
39
  # @return [String, nil]
28
40
  optional :language, String
29
41
 
30
- # @!attribute rcs
31
- #
32
- # @return [Telnyx::Models::VerifyProfileCreateParams::Rcs, nil]
33
- optional :rcs, -> { Telnyx::VerifyProfileCreateParams::Rcs }
34
-
35
42
  # @!attribute sms
36
43
  #
37
44
  # @return [Telnyx::Models::VerifyProfileCreateParams::SMS, nil]
@@ -52,16 +59,27 @@ module Telnyx
52
59
  # @return [Telnyx::Models::VerifyProfileCreateParams::Whatsapp, nil]
53
60
  optional :whatsapp, -> { Telnyx::VerifyProfileCreateParams::Whatsapp }
54
61
 
55
- # @!method initialize(name:, call: nil, flashcall: nil, language: nil, rcs: nil, sms: nil, webhook_failover_url: nil, webhook_url: nil, whatsapp: nil, request_options: {})
62
+ # @!method initialize(name:, call: nil, daily_spend_limit: nil, daily_spend_limit_enabled: nil, flashcall: nil, language: nil, sms: nil, webhook_failover_url: nil, webhook_url: nil, whatsapp: nil, request_options: {})
56
63
  # @param name [String]
64
+ #
57
65
  # @param call [Telnyx::Models::VerifyProfileCreateParams::Call]
66
+ #
67
+ # @param daily_spend_limit [Float] The maximum daily spend allowed on this verify profile, in USD.
68
+ #
69
+ # @param daily_spend_limit_enabled [Boolean] Whether the daily spend limit is enforced for this verify profile.
70
+ #
58
71
  # @param flashcall [Telnyx::Models::VerifyProfileCreateParams::Flashcall]
72
+ #
59
73
  # @param language [String]
60
- # @param rcs [Telnyx::Models::VerifyProfileCreateParams::Rcs]
74
+ #
61
75
  # @param sms [Telnyx::Models::VerifyProfileCreateParams::SMS]
76
+ #
62
77
  # @param webhook_failover_url [String]
78
+ #
63
79
  # @param webhook_url [String]
80
+ #
64
81
  # @param whatsapp [Telnyx::Models::VerifyProfileCreateParams::Whatsapp]
82
+ #
65
83
  # @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}]
66
84
 
67
85
  class Call < Telnyx::Internal::Type::BaseModel
@@ -156,68 +174,6 @@ module Telnyx
156
174
  # @param whitelisted_destinations [Array<String>] Enabled country destinations to send verification codes. The elements in the lis
157
175
  end
158
176
 
159
- class Rcs < Telnyx::Internal::Type::BaseModel
160
- # @!attribute app_name
161
- # The name that identifies the application requesting 2fa in the verification
162
- # message.
163
- #
164
- # @return [String, nil]
165
- optional :app_name, String
166
-
167
- # @!attribute code_length
168
- # The length of the verify code to generate.
169
- #
170
- # @return [Integer, nil]
171
- optional :code_length, Integer
172
-
173
- # @!attribute default_verification_timeout_secs
174
- # For every request that is initiated via this Verify profile, this sets the
175
- # number of seconds before a verification request code expires. Once the
176
- # verification request expires, the user cannot use the code to verify their
177
- # identity.
178
- #
179
- # @return [Integer, nil]
180
- optional :default_verification_timeout_secs, Integer
181
-
182
- # @!attribute messaging_template_id
183
- # The message template identifier selected from /verify_profiles/templates
184
- #
185
- # @return [String, nil]
186
- optional :messaging_template_id, String
187
-
188
- # @!attribute sms_fallback
189
- # Enable SMS fallback when RCS delivery fails.
190
- #
191
- # @return [Boolean, nil]
192
- optional :sms_fallback, Telnyx::Internal::Type::Boolean
193
-
194
- # @!attribute whitelisted_destinations
195
- # Enabled country destinations to send verification codes. The elements in the
196
- # list must be valid ISO 3166-1 alpha-2 country codes. If set to `["*"]`, all
197
- # destinations will be allowed. **Conditionally required:** this field must be
198
- # provided when your organization is configured to require explicit whitelisted
199
- # destinations; otherwise it is optional.
200
- #
201
- # @return [Array<String>, nil]
202
- optional :whitelisted_destinations, Telnyx::Internal::Type::ArrayOf[String]
203
-
204
- # @!method initialize(app_name: nil, code_length: nil, default_verification_timeout_secs: nil, messaging_template_id: nil, sms_fallback: nil, whitelisted_destinations: nil)
205
- # Some parameter documentations has been truncated, see
206
- # {Telnyx::Models::VerifyProfileCreateParams::Rcs} for more details.
207
- #
208
- # @param app_name [String] The name that identifies the application requesting 2fa in the verification mess
209
- #
210
- # @param code_length [Integer] The length of the verify code to generate.
211
- #
212
- # @param default_verification_timeout_secs [Integer] For every request that is initiated via this Verify profile, this sets the numbe
213
- #
214
- # @param messaging_template_id [String] The message template identifier selected from /verify_profiles/templates
215
- #
216
- # @param sms_fallback [Boolean] Enable SMS fallback when RCS delivery fails.
217
- #
218
- # @param whitelisted_destinations [Array<String>] Enabled country destinations to send verification codes. The elements in the lis
219
- end
220
-
221
177
  class SMS < Telnyx::Internal::Type::BaseModel
222
178
  # @!attribute alpha_sender
223
179
  # The alphanumeric sender ID to use when sending to destinations that require an
@@ -17,10 +17,17 @@ module Telnyx
17
17
  # @return [Telnyx::Models::VerifyProfileUpdateParams::Call, nil]
18
18
  optional :call, -> { Telnyx::VerifyProfileUpdateParams::Call }
19
19
 
20
- # @!attribute flashcall
20
+ # @!attribute daily_spend_limit
21
+ # The maximum daily spend allowed on this verify profile, in USD.
21
22
  #
22
- # @return [Telnyx::Models::VerifyProfileUpdateParams::Flashcall, nil]
23
- optional :flashcall, -> { Telnyx::VerifyProfileUpdateParams::Flashcall }
23
+ # @return [Float, nil]
24
+ optional :daily_spend_limit, Float
25
+
26
+ # @!attribute daily_spend_limit_enabled
27
+ # Whether the daily spend limit is enforced for this verify profile.
28
+ #
29
+ # @return [Boolean, nil]
30
+ optional :daily_spend_limit_enabled, Telnyx::Internal::Type::Boolean
24
31
 
25
32
  # @!attribute language
26
33
  #
@@ -32,11 +39,6 @@ module Telnyx
32
39
  # @return [String, nil]
33
40
  optional :name, String
34
41
 
35
- # @!attribute rcs
36
- #
37
- # @return [Telnyx::Models::VerifyProfileUpdateParams::Rcs, nil]
38
- optional :rcs, -> { Telnyx::VerifyProfileUpdateParams::Rcs }
39
-
40
42
  # @!attribute sms
41
43
  #
42
44
  # @return [Telnyx::Models::VerifyProfileUpdateParams::SMS, nil]
@@ -57,17 +59,27 @@ module Telnyx
57
59
  # @return [Telnyx::Models::VerifyProfileUpdateParams::Whatsapp, nil]
58
60
  optional :whatsapp, -> { Telnyx::VerifyProfileUpdateParams::Whatsapp }
59
61
 
60
- # @!method initialize(verify_profile_id:, call: nil, flashcall: nil, language: nil, name: nil, rcs: nil, sms: nil, webhook_failover_url: nil, webhook_url: nil, whatsapp: nil, request_options: {})
62
+ # @!method initialize(verify_profile_id:, call: nil, daily_spend_limit: nil, daily_spend_limit_enabled: nil, language: nil, name: nil, sms: nil, webhook_failover_url: nil, webhook_url: nil, whatsapp: nil, request_options: {})
61
63
  # @param verify_profile_id [String]
64
+ #
62
65
  # @param call [Telnyx::Models::VerifyProfileUpdateParams::Call]
63
- # @param flashcall [Telnyx::Models::VerifyProfileUpdateParams::Flashcall]
66
+ #
67
+ # @param daily_spend_limit [Float] The maximum daily spend allowed on this verify profile, in USD.
68
+ #
69
+ # @param daily_spend_limit_enabled [Boolean] Whether the daily spend limit is enforced for this verify profile.
70
+ #
64
71
  # @param language [String]
72
+ #
65
73
  # @param name [String]
66
- # @param rcs [Telnyx::Models::VerifyProfileUpdateParams::Rcs]
74
+ #
67
75
  # @param sms [Telnyx::Models::VerifyProfileUpdateParams::SMS]
76
+ #
68
77
  # @param webhook_failover_url [String]
78
+ #
69
79
  # @param webhook_url [String]
80
+ #
70
81
  # @param whatsapp [Telnyx::Models::VerifyProfileUpdateParams::Whatsapp]
82
+ #
71
83
  # @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}]
72
84
 
73
85
  class Call < Telnyx::Internal::Type::BaseModel
@@ -124,106 +136,6 @@ module Telnyx
124
136
  # @param whitelisted_destinations [Array<String>] Enabled country destinations to send verification codes. The elements in the lis
125
137
  end
126
138
 
127
- class Flashcall < Telnyx::Internal::Type::BaseModel
128
- # @!attribute app_name
129
- # The name that identifies the application requesting 2fa in the verification
130
- # message.
131
- #
132
- # @return [String, nil]
133
- optional :app_name, String
134
-
135
- # @!attribute default_verification_timeout_secs
136
- # For every request that is initiated via this Verify profile, this sets the
137
- # number of seconds before a verification request code expires. Once the
138
- # verification request expires, the user cannot use the code to verify their
139
- # identity.
140
- #
141
- # @return [Integer, nil]
142
- optional :default_verification_timeout_secs, Integer
143
-
144
- # @!attribute whitelisted_destinations
145
- # Enabled country destinations to send verification codes. The elements in the
146
- # list must be valid ISO 3166-1 alpha-2 country codes. If set to `["*"]`, all
147
- # destinations will be allowed. **Conditionally required:** this field must be
148
- # provided when your organization is configured to require explicit whitelisted
149
- # destinations; otherwise it is optional.
150
- #
151
- # @return [Array<String>, nil]
152
- optional :whitelisted_destinations, Telnyx::Internal::Type::ArrayOf[String]
153
-
154
- # @!method initialize(app_name: nil, default_verification_timeout_secs: nil, whitelisted_destinations: nil)
155
- # Some parameter documentations has been truncated, see
156
- # {Telnyx::Models::VerifyProfileUpdateParams::Flashcall} for more details.
157
- #
158
- # @param app_name [String] The name that identifies the application requesting 2fa in the verification mess
159
- #
160
- # @param default_verification_timeout_secs [Integer] For every request that is initiated via this Verify profile, this sets the numbe
161
- #
162
- # @param whitelisted_destinations [Array<String>] Enabled country destinations to send verification codes. The elements in the lis
163
- end
164
-
165
- class Rcs < Telnyx::Internal::Type::BaseModel
166
- # @!attribute app_name
167
- # The name that identifies the application requesting 2fa in the verification
168
- # message.
169
- #
170
- # @return [String, nil]
171
- optional :app_name, String
172
-
173
- # @!attribute code_length
174
- # The length of the verify code to generate.
175
- #
176
- # @return [Integer, nil]
177
- optional :code_length, Integer
178
-
179
- # @!attribute default_verification_timeout_secs
180
- # For every request that is initiated via this Verify profile, this sets the
181
- # number of seconds before a verification request code expires. Once the
182
- # verification request expires, the user cannot use the code to verify their
183
- # identity.
184
- #
185
- # @return [Integer, nil]
186
- optional :default_verification_timeout_secs, Integer
187
-
188
- # @!attribute messaging_template_id
189
- # The message template identifier selected from /verify_profiles/templates
190
- #
191
- # @return [String, nil]
192
- optional :messaging_template_id, String
193
-
194
- # @!attribute sms_fallback
195
- # Enable SMS fallback when RCS delivery fails.
196
- #
197
- # @return [Boolean, nil]
198
- optional :sms_fallback, Telnyx::Internal::Type::Boolean
199
-
200
- # @!attribute whitelisted_destinations
201
- # Enabled country destinations to send verification codes. The elements in the
202
- # list must be valid ISO 3166-1 alpha-2 country codes. If set to `["*"]`, all
203
- # destinations will be allowed. **Conditionally required:** this field must be
204
- # provided when your organization is configured to require explicit whitelisted
205
- # destinations; otherwise it is optional.
206
- #
207
- # @return [Array<String>, nil]
208
- optional :whitelisted_destinations, Telnyx::Internal::Type::ArrayOf[String]
209
-
210
- # @!method initialize(app_name: nil, code_length: nil, default_verification_timeout_secs: nil, messaging_template_id: nil, sms_fallback: nil, whitelisted_destinations: nil)
211
- # Some parameter documentations has been truncated, see
212
- # {Telnyx::Models::VerifyProfileUpdateParams::Rcs} for more details.
213
- #
214
- # @param app_name [String] The name that identifies the application requesting 2fa in the verification mess
215
- #
216
- # @param code_length [Integer] The length of the verify code to generate.
217
- #
218
- # @param default_verification_timeout_secs [Integer] For every request that is initiated via this Verify profile, this sets the numbe
219
- #
220
- # @param messaging_template_id [String] The message template identifier selected from /verify_profiles/templates
221
- #
222
- # @param sms_fallback [Boolean] Enable SMS fallback when RCS delivery fails.
223
- #
224
- # @param whitelisted_destinations [Array<String>] Enabled country destinations to send verification codes. The elements in the lis
225
- end
226
-
227
139
  class SMS < Telnyx::Internal::Type::BaseModel
228
140
  # @!attribute alpha_sender
229
141
  # The alphanumeric sender ID to use when sending to destinations that require an
@@ -6,17 +6,28 @@ module Telnyx
6
6
  class VerifyProfiles
7
7
  # Creates a new Verify profile to associate verifications with.
8
8
  #
9
- # @overload create(name:, call: nil, flashcall: nil, language: nil, rcs: nil, sms: nil, webhook_failover_url: nil, webhook_url: nil, whatsapp: nil, request_options: {})
9
+ # @overload create(name:, call: nil, daily_spend_limit: nil, daily_spend_limit_enabled: nil, flashcall: nil, language: nil, sms: nil, webhook_failover_url: nil, webhook_url: nil, whatsapp: nil, request_options: {})
10
10
  #
11
11
  # @param name [String]
12
+ #
12
13
  # @param call [Telnyx::Models::VerifyProfileCreateParams::Call]
14
+ #
15
+ # @param daily_spend_limit [Float] The maximum daily spend allowed on this verify profile, in USD.
16
+ #
17
+ # @param daily_spend_limit_enabled [Boolean] Whether the daily spend limit is enforced for this verify profile.
18
+ #
13
19
  # @param flashcall [Telnyx::Models::VerifyProfileCreateParams::Flashcall]
20
+ #
14
21
  # @param language [String]
15
- # @param rcs [Telnyx::Models::VerifyProfileCreateParams::Rcs]
22
+ #
16
23
  # @param sms [Telnyx::Models::VerifyProfileCreateParams::SMS]
24
+ #
17
25
  # @param webhook_failover_url [String]
26
+ #
18
27
  # @param webhook_url [String]
28
+ #
19
29
  # @param whatsapp [Telnyx::Models::VerifyProfileCreateParams::Whatsapp]
30
+ #
20
31
  # @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}, nil]
21
32
  #
22
33
  # @return [Telnyx::Models::VerifyProfileData]
@@ -55,20 +66,20 @@ module Telnyx
55
66
 
56
67
  # Update Verify profile
57
68
  #
58
- # @overload update(verify_profile_id, call: nil, flashcall: nil, language: nil, name: nil, rcs: nil, sms: nil, webhook_failover_url: nil, webhook_url: nil, whatsapp: nil, request_options: {})
69
+ # @overload update(verify_profile_id, call: nil, daily_spend_limit: nil, daily_spend_limit_enabled: nil, language: nil, name: nil, sms: nil, webhook_failover_url: nil, webhook_url: nil, whatsapp: nil, request_options: {})
59
70
  #
60
71
  # @param verify_profile_id [String] The identifier of the Verify profile to update.
61
72
  #
62
73
  # @param call [Telnyx::Models::VerifyProfileUpdateParams::Call]
63
74
  #
64
- # @param flashcall [Telnyx::Models::VerifyProfileUpdateParams::Flashcall]
75
+ # @param daily_spend_limit [Float] The maximum daily spend allowed on this verify profile, in USD.
76
+ #
77
+ # @param daily_spend_limit_enabled [Boolean] Whether the daily spend limit is enforced for this verify profile.
65
78
  #
66
79
  # @param language [String]
67
80
  #
68
81
  # @param name [String]
69
82
  #
70
- # @param rcs [Telnyx::Models::VerifyProfileUpdateParams::Rcs]
71
- #
72
83
  # @param sms [Telnyx::Models::VerifyProfileUpdateParams::SMS]
73
84
  #
74
85
  # @param webhook_failover_url [String]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Telnyx
4
- VERSION = "5.85.0"
4
+ VERSION = "5.87.0"
5
5
  end
@@ -9,7 +9,15 @@ module Telnyx
9
9
  T.any(Telnyx::AI::TranscriptionSettings, Telnyx::Internal::AnyHash)
10
10
  end
11
11
 
12
- # The language of the audio to be transcribed. If not set, of if set to `auto`,
12
+ # Integration secret identifier for the transcription provider API key. Currently
13
+ # used for Azure transcription regions that require a customer-provided API key.
14
+ sig { returns(T.nilable(String)) }
15
+ attr_reader :api_key_ref
16
+
17
+ sig { params(api_key_ref: String).void }
18
+ attr_writer :api_key_ref
19
+
20
+ # The language of the audio to be transcribed. If not set, or if set to `auto`,
13
21
  # the model will automatically detect the language.
14
22
  sig { returns(T.nilable(String)) }
15
23
  attr_reader :language
@@ -17,12 +25,16 @@ module Telnyx
17
25
  sig { params(language: String).void }
18
26
  attr_writer :language
19
27
 
20
- # The speech to text model to be used by the voice assistant. All the deepgram
21
- # models are run on-premise.
28
+ # The speech to text model to be used by the voice assistant. All Deepgram models
29
+ # are run on-premise.
22
30
  #
23
31
  # - `deepgram/flux` is optimized for turn-taking but is English-only.
24
- # - `deepgram/nova-3` is multi-lingual with automatic language detection but
25
- # slightly higher latency.
32
+ # - `deepgram/nova-3` is multilingual with automatic language detection.
33
+ # - `deepgram/nova-2` is Deepgram's previous-generation multilingual model.
34
+ # - `azure/fast` is a multilingual Azure transcription model.
35
+ # - `assemblyai/universal-streaming` is a multilingual streaming model with
36
+ # configurable turn detection.
37
+ # - `xai/grok-stt` is a multilingual Grok STT model.
26
38
  sig do
27
39
  returns(T.nilable(Telnyx::AI::TranscriptionSettings::Model::OrSymbol))
28
40
  end
@@ -34,7 +46,7 @@ module Telnyx
34
46
  attr_writer :model
35
47
 
36
48
  # Region on third party cloud providers (currently Azure) if using one of their
37
- # models
49
+ # models. Some regions require `api_key_ref`.
38
50
  sig { returns(T.nilable(String)) }
39
51
  attr_reader :region
40
52
 
@@ -51,6 +63,7 @@ module Telnyx
51
63
 
52
64
  sig do
53
65
  params(
66
+ api_key_ref: String,
54
67
  language: String,
55
68
  model: Telnyx::AI::TranscriptionSettings::Model::OrSymbol,
56
69
  region: String,
@@ -58,18 +71,25 @@ module Telnyx
58
71
  ).returns(T.attached_class)
59
72
  end
60
73
  def self.new(
61
- # The language of the audio to be transcribed. If not set, of if set to `auto`,
74
+ # Integration secret identifier for the transcription provider API key. Currently
75
+ # used for Azure transcription regions that require a customer-provided API key.
76
+ api_key_ref: nil,
77
+ # The language of the audio to be transcribed. If not set, or if set to `auto`,
62
78
  # the model will automatically detect the language.
63
79
  language: nil,
64
- # The speech to text model to be used by the voice assistant. All the deepgram
65
- # models are run on-premise.
80
+ # The speech to text model to be used by the voice assistant. All Deepgram models
81
+ # are run on-premise.
66
82
  #
67
83
  # - `deepgram/flux` is optimized for turn-taking but is English-only.
68
- # - `deepgram/nova-3` is multi-lingual with automatic language detection but
69
- # slightly higher latency.
84
+ # - `deepgram/nova-3` is multilingual with automatic language detection.
85
+ # - `deepgram/nova-2` is Deepgram's previous-generation multilingual model.
86
+ # - `azure/fast` is a multilingual Azure transcription model.
87
+ # - `assemblyai/universal-streaming` is a multilingual streaming model with
88
+ # configurable turn detection.
89
+ # - `xai/grok-stt` is a multilingual Grok STT model.
70
90
  model: nil,
71
91
  # Region on third party cloud providers (currently Azure) if using one of their
72
- # models
92
+ # models. Some regions require `api_key_ref`.
73
93
  region: nil,
74
94
  settings: nil
75
95
  )
@@ -78,6 +98,7 @@ module Telnyx
78
98
  sig do
79
99
  override.returns(
80
100
  {
101
+ api_key_ref: String,
81
102
  language: String,
82
103
  model: Telnyx::AI::TranscriptionSettings::Model::OrSymbol,
83
104
  region: String,
@@ -88,12 +109,16 @@ module Telnyx
88
109
  def to_hash
89
110
  end
90
111
 
91
- # The speech to text model to be used by the voice assistant. All the deepgram
92
- # models are run on-premise.
112
+ # The speech to text model to be used by the voice assistant. All Deepgram models
113
+ # are run on-premise.
93
114
  #
94
115
  # - `deepgram/flux` is optimized for turn-taking but is English-only.
95
- # - `deepgram/nova-3` is multi-lingual with automatic language detection but
96
- # slightly higher latency.
116
+ # - `deepgram/nova-3` is multilingual with automatic language detection.
117
+ # - `deepgram/nova-2` is Deepgram's previous-generation multilingual model.
118
+ # - `azure/fast` is a multilingual Azure transcription model.
119
+ # - `assemblyai/universal-streaming` is a multilingual streaming model with
120
+ # configurable turn detection.
121
+ # - `xai/grok-stt` is a multilingual Grok STT model.
97
122
  module Model
98
123
  extend Telnyx::Internal::Type::Enum
99
124
 
@@ -123,6 +148,16 @@ module Telnyx
123
148
  :"azure/fast",
124
149
  Telnyx::AI::TranscriptionSettings::Model::TaggedSymbol
125
150
  )
151
+ ASSEMBLYAI_UNIVERSAL_STREAMING =
152
+ T.let(
153
+ :"assemblyai/universal-streaming",
154
+ Telnyx::AI::TranscriptionSettings::Model::TaggedSymbol
155
+ )
156
+ XAI_GROK_STT =
157
+ T.let(
158
+ :"xai/grok-stt",
159
+ Telnyx::AI::TranscriptionSettings::Model::TaggedSymbol
160
+ )
126
161
  DISTIL_WHISPER_DISTIL_LARGE_V2 =
127
162
  T.let(
128
163
  :"distil-whisper/distil-large-v2",
@@ -21,6 +21,15 @@ module Telnyx
21
21
  sig { params(eager_eot_threshold: Float).void }
22
22
  attr_writer :eager_eot_threshold
23
23
 
24
+ # Available only for assemblyai/universal-streaming. Confidence level required to
25
+ # trigger an end of turn. Higher values require more certainty before ending a
26
+ # turn.
27
+ sig { returns(T.nilable(Float)) }
28
+ attr_reader :end_of_turn_confidence_threshold
29
+
30
+ sig { params(end_of_turn_confidence_threshold: Float).void }
31
+ attr_writer :end_of_turn_confidence_threshold
32
+
24
33
  # Available only for deepgram/flux. Confidence required to trigger an end of turn.
25
34
  # Higher values = more reliable turn detection but slightly increased latency.
26
35
  sig { returns(T.nilable(Float)) }
@@ -46,6 +55,23 @@ module Telnyx
46
55
  sig { params(keyterm: String).void }
47
56
  attr_writer :keyterm
48
57
 
58
+ # Available only for assemblyai/universal-streaming. Maximum duration of silence
59
+ # in milliseconds before forcing an end of turn.
60
+ sig { returns(T.nilable(Integer)) }
61
+ attr_reader :max_turn_silence
62
+
63
+ sig { params(max_turn_silence: Integer).void }
64
+ attr_writer :max_turn_silence
65
+
66
+ # Available only for assemblyai/universal-streaming. Minimum duration of silence
67
+ # in milliseconds before a turn can end. Must be less than or equal to
68
+ # max_turn_silence.
69
+ sig { returns(T.nilable(Integer)) }
70
+ attr_reader :min_turn_silence
71
+
72
+ sig { params(min_turn_silence: Integer).void }
73
+ attr_writer :min_turn_silence
74
+
49
75
  sig { returns(T.nilable(T::Boolean)) }
50
76
  attr_reader :numerals
51
77
 
@@ -61,9 +87,12 @@ module Telnyx
61
87
  sig do
62
88
  params(
63
89
  eager_eot_threshold: Float,
90
+ end_of_turn_confidence_threshold: Float,
64
91
  eot_threshold: Float,
65
92
  eot_timeout_ms: Integer,
66
93
  keyterm: String,
94
+ max_turn_silence: Integer,
95
+ min_turn_silence: Integer,
67
96
  numerals: T::Boolean,
68
97
  smart_format: T::Boolean
69
98
  ).returns(T.attached_class)
@@ -73,6 +102,10 @@ module Telnyx
73
102
  # detection. Must be lower than or equal to eot_threshold. Setting this equal to
74
103
  # eot_threshold effectively disables eager end of turn.
75
104
  eager_eot_threshold: nil,
105
+ # Available only for assemblyai/universal-streaming. Confidence level required to
106
+ # trigger an end of turn. Higher values require more certainty before ending a
107
+ # turn.
108
+ end_of_turn_confidence_threshold: nil,
76
109
  # Available only for deepgram/flux. Confidence required to trigger an end of turn.
77
110
  # Higher values = more reliable turn detection but slightly increased latency.
78
111
  eot_threshold: nil,
@@ -83,6 +116,13 @@ module Telnyx
83
116
  # key terms to boost for recognition during transcription. Helps improve accuracy
84
117
  # for domain-specific terminology, proper nouns, or uncommon words.
85
118
  keyterm: nil,
119
+ # Available only for assemblyai/universal-streaming. Maximum duration of silence
120
+ # in milliseconds before forcing an end of turn.
121
+ max_turn_silence: nil,
122
+ # Available only for assemblyai/universal-streaming. Minimum duration of silence
123
+ # in milliseconds before a turn can end. Must be less than or equal to
124
+ # max_turn_silence.
125
+ min_turn_silence: nil,
86
126
  numerals: nil,
87
127
  smart_format: nil
88
128
  )
@@ -92,9 +132,12 @@ module Telnyx
92
132
  override.returns(
93
133
  {
94
134
  eager_eot_threshold: Float,
135
+ end_of_turn_confidence_threshold: Float,
95
136
  eot_threshold: Float,
96
137
  eot_timeout_ms: Integer,
97
138
  keyterm: String,
139
+ max_turn_silence: Integer,
140
+ min_turn_silence: Integer,
98
141
  numerals: T::Boolean,
99
142
  smart_format: T::Boolean
100
143
  }