telnyx 5.114.0 → 5.115.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.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/README.md +1 -1
  4. data/lib/telnyx/models/ai/openai_create_response_params.rb +3 -3
  5. data/lib/telnyx/models/ai/transcription_settings.rb +8 -1
  6. data/lib/telnyx/models/ai/transcription_settings_config.rb +29 -1
  7. data/lib/telnyx/models/ai_create_response_params.rb +4 -4
  8. data/lib/telnyx/models/calls/transcription_config.rb +8 -1
  9. data/lib/telnyx/models/calls/transcription_start_request.rb +175 -4
  10. data/lib/telnyx/models/texml/accounts/call_calls_params.rb +0 -2
  11. data/lib/telnyx/resources/ai/openai.rb +1 -1
  12. data/lib/telnyx/resources/ai.rb +3 -3
  13. data/lib/telnyx/resources/calls/actions.rb +1 -1
  14. data/lib/telnyx/version.rb +1 -1
  15. data/lib/telnyx.rb +0 -1
  16. data/rbi/telnyx/models/ai/openai_create_response_params.rbi +4 -4
  17. data/rbi/telnyx/models/ai/transcription_settings.rbi +17 -2
  18. data/rbi/telnyx/models/ai/transcription_settings_config.rbi +41 -0
  19. data/rbi/telnyx/models/ai_create_response_params.rbi +4 -4
  20. data/rbi/telnyx/models/calls/transcription_config.rbi +17 -2
  21. data/rbi/telnyx/models/calls/transcription_start_request.rbi +438 -5
  22. data/rbi/telnyx/resources/ai/openai.rbi +1 -1
  23. data/rbi/telnyx/resources/ai.rbi +2 -2
  24. data/rbi/telnyx/resources/calls/actions.rbi +2 -1
  25. data/sig/telnyx/models/ai/openai_create_response_params.rbs +5 -5
  26. data/sig/telnyx/models/ai/transcription_settings.rbs +2 -0
  27. data/sig/telnyx/models/ai/transcription_settings_config.rbs +21 -0
  28. data/sig/telnyx/models/ai_create_response_params.rbs +4 -5
  29. data/sig/telnyx/models/calls/transcription_config.rbs +2 -0
  30. data/sig/telnyx/models/calls/transcription_start_request.rbs +177 -1
  31. data/sig/telnyx/resources/ai/openai.rbs +1 -1
  32. data/sig/telnyx/resources/ai.rbs +1 -1
  33. metadata +1 -4
  34. data/lib/telnyx/models/calls/transcription_engine_speechmatics_config.rb +0 -100
  35. data/rbi/telnyx/models/calls/transcription_engine_speechmatics_config.rbi +0 -289
  36. data/sig/telnyx/models/calls/transcription_engine_speechmatics_config.rbs +0 -114
@@ -21,6 +21,14 @@ module Telnyx
21
21
  sig { params(eager_eot_threshold: Float).void }
22
22
  attr_writer :eager_eot_threshold
23
23
 
24
+ # Available only for soniox/stt-rt-v4. When true, Soniox emits end-of-utterance
25
+ # events at the cadence configured by `max_endpoint_delay_ms`.
26
+ sig { returns(T.nilable(T::Boolean)) }
27
+ attr_reader :enable_endpoint_detection
28
+
29
+ sig { params(enable_endpoint_detection: T::Boolean).void }
30
+ attr_writer :enable_endpoint_detection
31
+
24
32
  # Available only for assemblyai/universal-streaming. Confidence level required to
25
33
  # trigger an end of turn. Higher values require more certainty before ending a
26
34
  # turn.
@@ -46,6 +54,14 @@ module Telnyx
46
54
  sig { params(eot_timeout_ms: Integer).void }
47
55
  attr_writer :eot_timeout_ms
48
56
 
57
+ # Available only for soniox/stt-rt-v4. When true, Soniox streams interim
58
+ # (non-final) results in addition to finalized transcripts.
59
+ sig { returns(T.nilable(T::Boolean)) }
60
+ attr_reader :interim_results
61
+
62
+ sig { params(interim_results: T::Boolean).void }
63
+ attr_writer :interim_results
64
+
49
65
  # Available only for deepgram/nova-3 and deepgram/flux. A comma-separated list of
50
66
  # key terms to boost for recognition during transcription. Helps improve accuracy
51
67
  # for domain-specific terminology, proper nouns, or uncommon words. This field may
@@ -59,6 +75,15 @@ module Telnyx
59
75
  sig { params(keyterm: String).void }
60
76
  attr_writer :keyterm
61
77
 
78
+ # Available only for soniox/stt-rt-v4. Maximum silence (in milliseconds) before
79
+ # Soniox emits an end-of-utterance event. Only honored when
80
+ # `enable_endpoint_detection` is true.
81
+ sig { returns(T.nilable(Integer)) }
82
+ attr_reader :max_endpoint_delay_ms
83
+
84
+ sig { params(max_endpoint_delay_ms: Integer).void }
85
+ attr_writer :max_endpoint_delay_ms
86
+
62
87
  # Available only for assemblyai/universal-streaming. Maximum duration of silence
63
88
  # in milliseconds before forcing an end of turn.
64
89
  sig { returns(T.nilable(Integer)) }
@@ -91,10 +116,13 @@ module Telnyx
91
116
  sig do
92
117
  params(
93
118
  eager_eot_threshold: Float,
119
+ enable_endpoint_detection: T::Boolean,
94
120
  end_of_turn_confidence_threshold: Float,
95
121
  eot_threshold: Float,
96
122
  eot_timeout_ms: Integer,
123
+ interim_results: T::Boolean,
97
124
  keyterm: String,
125
+ max_endpoint_delay_ms: Integer,
98
126
  max_turn_silence: Integer,
99
127
  min_turn_silence: Integer,
100
128
  numerals: T::Boolean,
@@ -106,6 +134,9 @@ module Telnyx
106
134
  # detection. Must be lower than or equal to eot_threshold. Setting this equal to
107
135
  # eot_threshold effectively disables eager end of turn.
108
136
  eager_eot_threshold: nil,
137
+ # Available only for soniox/stt-rt-v4. When true, Soniox emits end-of-utterance
138
+ # events at the cadence configured by `max_endpoint_delay_ms`.
139
+ enable_endpoint_detection: nil,
109
140
  # Available only for assemblyai/universal-streaming. Confidence level required to
110
141
  # trigger an end of turn. Higher values require more certainty before ending a
111
142
  # turn.
@@ -116,6 +147,9 @@ module Telnyx
116
147
  # Available only for deepgram/flux. Maximum milliseconds of silence before forcing
117
148
  # an end of turn, regardless of confidence.
118
149
  eot_timeout_ms: nil,
150
+ # Available only for soniox/stt-rt-v4. When true, Soniox streams interim
151
+ # (non-final) results in addition to finalized transcripts.
152
+ interim_results: nil,
119
153
  # Available only for deepgram/nova-3 and deepgram/flux. A comma-separated list of
120
154
  # key terms to boost for recognition during transcription. Helps improve accuracy
121
155
  # for domain-specific terminology, proper nouns, or uncommon words. This field may
@@ -124,6 +158,10 @@ module Telnyx
124
158
  # using mustache syntax (e.g. `Telnyx,{{customer_name}},VoIP`). Variables are
125
159
  # resolved at call time before the value is sent to the speech-to-text engine.
126
160
  keyterm: nil,
161
+ # Available only for soniox/stt-rt-v4. Maximum silence (in milliseconds) before
162
+ # Soniox emits an end-of-utterance event. Only honored when
163
+ # `enable_endpoint_detection` is true.
164
+ max_endpoint_delay_ms: nil,
127
165
  # Available only for assemblyai/universal-streaming. Maximum duration of silence
128
166
  # in milliseconds before forcing an end of turn.
129
167
  max_turn_silence: nil,
@@ -140,10 +178,13 @@ module Telnyx
140
178
  override.returns(
141
179
  {
142
180
  eager_eot_threshold: Float,
181
+ enable_endpoint_detection: T::Boolean,
143
182
  end_of_turn_confidence_threshold: Float,
144
183
  eot_threshold: Float,
145
184
  eot_timeout_ms: Integer,
185
+ interim_results: T::Boolean,
146
186
  keyterm: String,
187
+ max_endpoint_delay_ms: Integer,
147
188
  max_turn_silence: Integer,
148
189
  min_turn_silence: Integer,
149
190
  numerals: T::Boolean,
@@ -12,21 +12,21 @@ module Telnyx
12
12
  end
13
13
 
14
14
  sig { returns(T::Hash[Symbol, T.anything]) }
15
- attr_accessor :params
15
+ attr_accessor :body
16
16
 
17
17
  sig do
18
18
  params(
19
- params: T::Hash[Symbol, T.anything],
19
+ body: T::Hash[Symbol, T.anything],
20
20
  request_options: Telnyx::RequestOptions::OrHash
21
21
  ).returns(T.attached_class)
22
22
  end
23
- def self.new(params:, request_options: {})
23
+ def self.new(body:, request_options: {})
24
24
  end
25
25
 
26
26
  sig do
27
27
  override.returns(
28
28
  {
29
- params: T::Hash[Symbol, T.anything],
29
+ body: T::Hash[Symbol, T.anything],
30
30
  request_options: Telnyx::RequestOptions
31
31
  }
32
32
  )
@@ -14,7 +14,9 @@ module Telnyx
14
14
  # meaningful values depend on the selected transcription `model`. For
15
15
  # `deepgram/flux`, supported values are: `auto` (Telnyx language detection
16
16
  # controls the language hint), `multi` (no language hint), and language-specific
17
- # hints `en`, `es`, `fr`, `de`, `hi`, `ru`, `pt`, `ja`, `it`, and `nl`.
17
+ # hints `en`, `es`, `fr`, `de`, `hi`, `ru`, `pt`, `ja`, `it`, and `nl`. For
18
+ # `soniox/stt-rt-v4`, `auto` omits the language hint and lets Soniox auto-detect;
19
+ # ISO 639-1 codes (e.g. `en`, `es`) bias detection toward that language.
18
20
  sig { returns(T.nilable(String)) }
19
21
  attr_reader :language
20
22
 
@@ -30,6 +32,8 @@ module Telnyx
30
32
  # transcription.
31
33
  # - `assemblyai/universal-streaming` for live streaming transcription.
32
34
  # - `xai/grok-stt` for live streaming transcription.
35
+ # - `soniox/stt-rt-v4` for live streaming multilingual transcription with
36
+ # automatic language detection.
33
37
  # - `azure/fast` and `azure/realtime`; Azure models require `region`, and
34
38
  # unsupported regions require `api_key_ref`.
35
39
  # - `google/latest_long` for non-streaming multilingual transcription.
@@ -67,7 +71,9 @@ module Telnyx
67
71
  # meaningful values depend on the selected transcription `model`. For
68
72
  # `deepgram/flux`, supported values are: `auto` (Telnyx language detection
69
73
  # controls the language hint), `multi` (no language hint), and language-specific
70
- # hints `en`, `es`, `fr`, `de`, `hi`, `ru`, `pt`, `ja`, `it`, and `nl`.
74
+ # hints `en`, `es`, `fr`, `de`, `hi`, `ru`, `pt`, `ja`, `it`, and `nl`. For
75
+ # `soniox/stt-rt-v4`, `auto` omits the language hint and lets Soniox auto-detect;
76
+ # ISO 639-1 codes (e.g. `en`, `es`) bias detection toward that language.
71
77
  language: nil,
72
78
  # The speech to text model to be used by the voice assistant. Supported models
73
79
  # include:
@@ -78,6 +84,8 @@ module Telnyx
78
84
  # transcription.
79
85
  # - `assemblyai/universal-streaming` for live streaming transcription.
80
86
  # - `xai/grok-stt` for live streaming transcription.
87
+ # - `soniox/stt-rt-v4` for live streaming multilingual transcription with
88
+ # automatic language detection.
81
89
  # - `azure/fast` and `azure/realtime`; Azure models require `region`, and
82
90
  # unsupported regions require `api_key_ref`.
83
91
  # - `google/latest_long` for non-streaming multilingual transcription.
@@ -109,6 +117,8 @@ module Telnyx
109
117
  # transcription.
110
118
  # - `assemblyai/universal-streaming` for live streaming transcription.
111
119
  # - `xai/grok-stt` for live streaming transcription.
120
+ # - `soniox/stt-rt-v4` for live streaming multilingual transcription with
121
+ # automatic language detection.
112
122
  # - `azure/fast` and `azure/realtime`; Azure models require `region`, and
113
123
  # unsupported regions require `api_key_ref`.
114
124
  # - `google/latest_long` for non-streaming multilingual transcription.
@@ -165,6 +175,11 @@ module Telnyx
165
175
  :"xai/grok-stt",
166
176
  Telnyx::Calls::TranscriptionConfig::Model::TaggedSymbol
167
177
  )
178
+ SONIOX_STT_RT_V4 =
179
+ T.let(
180
+ :"soniox/stt-rt-v4",
181
+ Telnyx::Calls::TranscriptionConfig::Model::TaggedSymbol
182
+ )
168
183
  AZURE_FAST =
169
184
  T.let(
170
185
  :"azure/fast",
@@ -56,7 +56,8 @@ module Telnyx
56
56
  Telnyx::Calls::TranscriptionEngineAzureConfig,
57
57
  Telnyx::Calls::TranscriptionEngineXaiConfig,
58
58
  Telnyx::Calls::TranscriptionEngineAssemblyaiConfig,
59
- Telnyx::Calls::TranscriptionEngineSpeechmaticsConfig,
59
+ Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::Speechmatics,
60
+ Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::Soniox,
60
61
  Telnyx::Calls::TranscriptionEngineAConfig,
61
62
  Telnyx::Calls::TranscriptionEngineBConfig,
62
63
  Telnyx::Calls::DeepgramNova2Config,
@@ -76,7 +77,8 @@ module Telnyx
76
77
  Telnyx::Calls::TranscriptionEngineAzureConfig::OrHash,
77
78
  Telnyx::Calls::TranscriptionEngineXaiConfig::OrHash,
78
79
  Telnyx::Calls::TranscriptionEngineAssemblyaiConfig::OrHash,
79
- Telnyx::Calls::TranscriptionEngineSpeechmaticsConfig::OrHash,
80
+ Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::Speechmatics::OrHash,
81
+ Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::Soniox::OrHash,
80
82
  Telnyx::Calls::TranscriptionEngineAConfig::OrHash,
81
83
  Telnyx::Calls::TranscriptionEngineBConfig::OrHash,
82
84
  Telnyx::Calls::DeepgramNova2Config::OrHash,
@@ -108,7 +110,8 @@ module Telnyx
108
110
  Telnyx::Calls::TranscriptionEngineAzureConfig::OrHash,
109
111
  Telnyx::Calls::TranscriptionEngineXaiConfig::OrHash,
110
112
  Telnyx::Calls::TranscriptionEngineAssemblyaiConfig::OrHash,
111
- Telnyx::Calls::TranscriptionEngineSpeechmaticsConfig::OrHash,
113
+ Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::Speechmatics::OrHash,
114
+ Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::Soniox::OrHash,
112
115
  Telnyx::Calls::TranscriptionEngineAConfig::OrHash,
113
116
  Telnyx::Calls::TranscriptionEngineBConfig::OrHash,
114
117
  Telnyx::Calls::DeepgramNova2Config::OrHash,
@@ -149,7 +152,8 @@ module Telnyx
149
152
  Telnyx::Calls::TranscriptionEngineAzureConfig,
150
153
  Telnyx::Calls::TranscriptionEngineXaiConfig,
151
154
  Telnyx::Calls::TranscriptionEngineAssemblyaiConfig,
152
- Telnyx::Calls::TranscriptionEngineSpeechmaticsConfig,
155
+ Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::Speechmatics,
156
+ Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::Soniox,
153
157
  Telnyx::Calls::TranscriptionEngineAConfig,
154
158
  Telnyx::Calls::TranscriptionEngineBConfig,
155
159
  Telnyx::Calls::DeepgramNova2Config,
@@ -211,6 +215,11 @@ module Telnyx
211
215
  :Speechmatics,
212
216
  Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngine::TaggedSymbol
213
217
  )
218
+ SONIOX =
219
+ T.let(
220
+ :Soniox,
221
+ Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngine::TaggedSymbol
222
+ )
214
223
  A =
215
224
  T.let(
216
225
  :A,
@@ -244,7 +253,8 @@ module Telnyx
244
253
  Telnyx::Calls::TranscriptionEngineAzureConfig,
245
254
  Telnyx::Calls::TranscriptionEngineXaiConfig,
246
255
  Telnyx::Calls::TranscriptionEngineAssemblyaiConfig,
247
- Telnyx::Calls::TranscriptionEngineSpeechmaticsConfig,
256
+ Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::Speechmatics,
257
+ Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::Soniox,
248
258
  Telnyx::Calls::TranscriptionEngineAConfig,
249
259
  Telnyx::Calls::TranscriptionEngineBConfig,
250
260
  Telnyx::Calls::DeepgramNova2Config,
@@ -252,6 +262,429 @@ module Telnyx
252
262
  )
253
263
  end
254
264
 
265
+ class Speechmatics < Telnyx::Internal::Type::BaseModel
266
+ OrHash =
267
+ T.type_alias do
268
+ T.any(
269
+ Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::Speechmatics,
270
+ Telnyx::Internal::AnyHash
271
+ )
272
+ end
273
+
274
+ # Whether to send also interim results. If set to false, only final results will
275
+ # be sent.
276
+ sig { returns(T.nilable(T::Boolean)) }
277
+ attr_reader :interim_results
278
+
279
+ sig { params(interim_results: T::Boolean).void }
280
+ attr_writer :interim_results
281
+
282
+ # Language to use for speech recognition
283
+ sig do
284
+ returns(
285
+ T.nilable(
286
+ Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::Speechmatics::Language::OrSymbol
287
+ )
288
+ )
289
+ end
290
+ attr_reader :language
291
+
292
+ sig do
293
+ params(
294
+ language:
295
+ Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::Speechmatics::Language::OrSymbol
296
+ ).void
297
+ end
298
+ attr_writer :language
299
+
300
+ # Engine identifier for Speechmatics transcription service
301
+ sig do
302
+ returns(
303
+ T.nilable(
304
+ Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::Speechmatics::TranscriptionEngine::OrSymbol
305
+ )
306
+ )
307
+ end
308
+ attr_reader :transcription_engine
309
+
310
+ sig do
311
+ params(
312
+ transcription_engine:
313
+ Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::Speechmatics::TranscriptionEngine::OrSymbol
314
+ ).void
315
+ end
316
+ attr_writer :transcription_engine
317
+
318
+ # The model to use for transcription.
319
+ sig do
320
+ returns(
321
+ T.nilable(
322
+ Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::Speechmatics::TranscriptionModel::OrSymbol
323
+ )
324
+ )
325
+ end
326
+ attr_reader :transcription_model
327
+
328
+ sig do
329
+ params(
330
+ transcription_model:
331
+ Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::Speechmatics::TranscriptionModel::OrSymbol
332
+ ).void
333
+ end
334
+ attr_writer :transcription_model
335
+
336
+ sig do
337
+ params(
338
+ interim_results: T::Boolean,
339
+ language:
340
+ Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::Speechmatics::Language::OrSymbol,
341
+ transcription_engine:
342
+ Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::Speechmatics::TranscriptionEngine::OrSymbol,
343
+ transcription_model:
344
+ Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::Speechmatics::TranscriptionModel::OrSymbol
345
+ ).returns(T.attached_class)
346
+ end
347
+ def self.new(
348
+ # Whether to send also interim results. If set to false, only final results will
349
+ # be sent.
350
+ interim_results: nil,
351
+ # Language to use for speech recognition
352
+ language: nil,
353
+ # Engine identifier for Speechmatics transcription service
354
+ transcription_engine: nil,
355
+ # The model to use for transcription.
356
+ transcription_model: nil
357
+ )
358
+ end
359
+
360
+ sig do
361
+ override.returns(
362
+ {
363
+ interim_results: T::Boolean,
364
+ language:
365
+ Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::Speechmatics::Language::OrSymbol,
366
+ transcription_engine:
367
+ Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::Speechmatics::TranscriptionEngine::OrSymbol,
368
+ transcription_model:
369
+ Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::Speechmatics::TranscriptionModel::OrSymbol
370
+ }
371
+ )
372
+ end
373
+ def to_hash
374
+ end
375
+
376
+ # Language to use for speech recognition
377
+ module Language
378
+ extend Telnyx::Internal::Type::Enum
379
+
380
+ TaggedSymbol =
381
+ T.type_alias do
382
+ T.all(
383
+ Symbol,
384
+ Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::Speechmatics::Language
385
+ )
386
+ end
387
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
388
+
389
+ EN =
390
+ T.let(
391
+ :en,
392
+ Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::Speechmatics::Language::TaggedSymbol
393
+ )
394
+ BA =
395
+ T.let(
396
+ :ba,
397
+ Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::Speechmatics::Language::TaggedSymbol
398
+ )
399
+ EU =
400
+ T.let(
401
+ :eu,
402
+ Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::Speechmatics::Language::TaggedSymbol
403
+ )
404
+ GL =
405
+ T.let(
406
+ :gl,
407
+ Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::Speechmatics::Language::TaggedSymbol
408
+ )
409
+ GA =
410
+ T.let(
411
+ :ga,
412
+ Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::Speechmatics::Language::TaggedSymbol
413
+ )
414
+ MT =
415
+ T.let(
416
+ :mt,
417
+ Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::Speechmatics::Language::TaggedSymbol
418
+ )
419
+ MN =
420
+ T.let(
421
+ :mn,
422
+ Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::Speechmatics::Language::TaggedSymbol
423
+ )
424
+ SW =
425
+ T.let(
426
+ :sw,
427
+ Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::Speechmatics::Language::TaggedSymbol
428
+ )
429
+ UG =
430
+ T.let(
431
+ :ug,
432
+ Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::Speechmatics::Language::TaggedSymbol
433
+ )
434
+ CY =
435
+ T.let(
436
+ :cy,
437
+ Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::Speechmatics::Language::TaggedSymbol
438
+ )
439
+ AR_EN =
440
+ T.let(
441
+ :ar_en,
442
+ Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::Speechmatics::Language::TaggedSymbol
443
+ )
444
+ CMN_EN =
445
+ T.let(
446
+ :cmn_en,
447
+ Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::Speechmatics::Language::TaggedSymbol
448
+ )
449
+ EN_MS =
450
+ T.let(
451
+ :en_ms,
452
+ Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::Speechmatics::Language::TaggedSymbol
453
+ )
454
+ EN_TA =
455
+ T.let(
456
+ :en_ta,
457
+ Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::Speechmatics::Language::TaggedSymbol
458
+ )
459
+ TL =
460
+ T.let(
461
+ :tl,
462
+ Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::Speechmatics::Language::TaggedSymbol
463
+ )
464
+ ES_BILINGUAL_EN =
465
+ T.let(
466
+ :"es-bilingual-en",
467
+ Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::Speechmatics::Language::TaggedSymbol
468
+ )
469
+ CMN_EN_MS_TA =
470
+ T.let(
471
+ :cmn_en_ms_ta,
472
+ Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::Speechmatics::Language::TaggedSymbol
473
+ )
474
+
475
+ sig do
476
+ override.returns(
477
+ T::Array[
478
+ Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::Speechmatics::Language::TaggedSymbol
479
+ ]
480
+ )
481
+ end
482
+ def self.values
483
+ end
484
+ end
485
+
486
+ # Engine identifier for Speechmatics transcription service
487
+ module TranscriptionEngine
488
+ extend Telnyx::Internal::Type::Enum
489
+
490
+ TaggedSymbol =
491
+ T.type_alias do
492
+ T.all(
493
+ Symbol,
494
+ Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::Speechmatics::TranscriptionEngine
495
+ )
496
+ end
497
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
498
+
499
+ SPEECHMATICS =
500
+ T.let(
501
+ :Speechmatics,
502
+ Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::Speechmatics::TranscriptionEngine::TaggedSymbol
503
+ )
504
+
505
+ sig do
506
+ override.returns(
507
+ T::Array[
508
+ Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::Speechmatics::TranscriptionEngine::TaggedSymbol
509
+ ]
510
+ )
511
+ end
512
+ def self.values
513
+ end
514
+ end
515
+
516
+ # The model to use for transcription.
517
+ module TranscriptionModel
518
+ extend Telnyx::Internal::Type::Enum
519
+
520
+ TaggedSymbol =
521
+ T.type_alias do
522
+ T.all(
523
+ Symbol,
524
+ Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::Speechmatics::TranscriptionModel
525
+ )
526
+ end
527
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
528
+
529
+ SPEECHMATICS_STANDARD =
530
+ T.let(
531
+ :"speechmatics/standard",
532
+ Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::Speechmatics::TranscriptionModel::TaggedSymbol
533
+ )
534
+
535
+ sig do
536
+ override.returns(
537
+ T::Array[
538
+ Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::Speechmatics::TranscriptionModel::TaggedSymbol
539
+ ]
540
+ )
541
+ end
542
+ def self.values
543
+ end
544
+ end
545
+ end
546
+
547
+ class Soniox < Telnyx::Internal::Type::BaseModel
548
+ OrHash =
549
+ T.type_alias do
550
+ T.any(
551
+ Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::Soniox,
552
+ Telnyx::Internal::AnyHash
553
+ )
554
+ end
555
+
556
+ # Engine identifier for Soniox transcription service
557
+ sig { returns(Symbol) }
558
+ attr_accessor :transcription_engine
559
+
560
+ # When true, Soniox emits end-of-utterance events at the cadence configured by
561
+ # `max_endpoint_delay_ms`.
562
+ sig { returns(T.nilable(T::Boolean)) }
563
+ attr_reader :enable_endpoint_detection
564
+
565
+ sig { params(enable_endpoint_detection: T::Boolean).void }
566
+ attr_writer :enable_endpoint_detection
567
+
568
+ # Whether to send also interim results. If set to false, only final results will
569
+ # be sent.
570
+ sig { returns(T.nilable(T::Boolean)) }
571
+ attr_reader :interim_results
572
+
573
+ sig { params(interim_results: T::Boolean).void }
574
+ attr_writer :interim_results
575
+
576
+ # ISO 639-1 language hint (e.g. `en`, `es`), or `auto` to omit the hint and let
577
+ # Soniox auto-detect supported languages multilingually.
578
+ sig { returns(T.nilable(String)) }
579
+ attr_reader :language
580
+
581
+ sig { params(language: String).void }
582
+ attr_writer :language
583
+
584
+ # Maximum silence (in milliseconds) before Soniox emits an end-of-utterance event.
585
+ # Only honored when `enable_endpoint_detection` is true. Range: 500-3000 ms.
586
+ sig { returns(T.nilable(Integer)) }
587
+ attr_reader :max_endpoint_delay_ms
588
+
589
+ sig { params(max_endpoint_delay_ms: Integer).void }
590
+ attr_writer :max_endpoint_delay_ms
591
+
592
+ # The model to use for transcription.
593
+ sig do
594
+ returns(
595
+ T.nilable(
596
+ Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::Soniox::TranscriptionModel::OrSymbol
597
+ )
598
+ )
599
+ end
600
+ attr_reader :transcription_model
601
+
602
+ sig do
603
+ params(
604
+ transcription_model:
605
+ Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::Soniox::TranscriptionModel::OrSymbol
606
+ ).void
607
+ end
608
+ attr_writer :transcription_model
609
+
610
+ sig do
611
+ params(
612
+ enable_endpoint_detection: T::Boolean,
613
+ interim_results: T::Boolean,
614
+ language: String,
615
+ max_endpoint_delay_ms: Integer,
616
+ transcription_model:
617
+ Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::Soniox::TranscriptionModel::OrSymbol,
618
+ transcription_engine: Symbol
619
+ ).returns(T.attached_class)
620
+ end
621
+ def self.new(
622
+ # When true, Soniox emits end-of-utterance events at the cadence configured by
623
+ # `max_endpoint_delay_ms`.
624
+ enable_endpoint_detection: nil,
625
+ # Whether to send also interim results. If set to false, only final results will
626
+ # be sent.
627
+ interim_results: nil,
628
+ # ISO 639-1 language hint (e.g. `en`, `es`), or `auto` to omit the hint and let
629
+ # Soniox auto-detect supported languages multilingually.
630
+ language: nil,
631
+ # Maximum silence (in milliseconds) before Soniox emits an end-of-utterance event.
632
+ # Only honored when `enable_endpoint_detection` is true. Range: 500-3000 ms.
633
+ max_endpoint_delay_ms: nil,
634
+ # The model to use for transcription.
635
+ transcription_model: nil,
636
+ # Engine identifier for Soniox transcription service
637
+ transcription_engine: :Soniox
638
+ )
639
+ end
640
+
641
+ sig do
642
+ override.returns(
643
+ {
644
+ transcription_engine: Symbol,
645
+ enable_endpoint_detection: T::Boolean,
646
+ interim_results: T::Boolean,
647
+ language: String,
648
+ max_endpoint_delay_ms: Integer,
649
+ transcription_model:
650
+ Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::Soniox::TranscriptionModel::OrSymbol
651
+ }
652
+ )
653
+ end
654
+ def to_hash
655
+ end
656
+
657
+ # The model to use for transcription.
658
+ module TranscriptionModel
659
+ extend Telnyx::Internal::Type::Enum
660
+
661
+ TaggedSymbol =
662
+ T.type_alias do
663
+ T.all(
664
+ Symbol,
665
+ Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::Soniox::TranscriptionModel
666
+ )
667
+ end
668
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
669
+
670
+ SONIOX_STT_RT_V4 =
671
+ T.let(
672
+ :"soniox/stt-rt-v4",
673
+ Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::Soniox::TranscriptionModel::TaggedSymbol
674
+ )
675
+
676
+ sig do
677
+ override.returns(
678
+ T::Array[
679
+ Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::Soniox::TranscriptionModel::TaggedSymbol
680
+ ]
681
+ )
682
+ end
683
+ def self.values
684
+ end
685
+ end
686
+ end
687
+
255
688
  sig do
256
689
  override.returns(
257
690
  T::Array[
@@ -42,7 +42,7 @@ module Telnyx
42
42
  sig do
43
43
  params(
44
44
  conversation: String,
45
- input: T::Hash[Symbol, T.anything],
45
+ input: T.anything,
46
46
  instructions: String,
47
47
  model: String,
48
48
  stream: T::Boolean,