telnyx 5.113.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/README.md +1 -1
- data/lib/telnyx/models/ai/openai_create_response_params.rb +3 -3
- data/lib/telnyx/models/ai/transcription_settings.rb +8 -1
- data/lib/telnyx/models/ai/transcription_settings_config.rb +29 -1
- data/lib/telnyx/models/ai/voice_settings.rb +14 -1
- data/lib/telnyx/models/ai_create_response_params.rb +4 -4
- data/lib/telnyx/models/calls/transcription_config.rb +8 -1
- data/lib/telnyx/models/calls/transcription_start_request.rb +175 -4
- data/lib/telnyx/models/texml/accounts/call_calls_params.rb +0 -2
- data/lib/telnyx/resources/ai/openai.rb +1 -1
- data/lib/telnyx/resources/ai.rb +3 -3
- data/lib/telnyx/resources/calls/actions.rb +1 -1
- data/lib/telnyx/version.rb +1 -1
- data/lib/telnyx.rb +0 -1
- data/rbi/telnyx/models/ai/openai_create_response_params.rbi +4 -4
- data/rbi/telnyx/models/ai/transcription_settings.rbi +17 -2
- data/rbi/telnyx/models/ai/transcription_settings_config.rbi +41 -0
- data/rbi/telnyx/models/ai/voice_settings.rbi +14 -1
- data/rbi/telnyx/models/ai_create_response_params.rbi +4 -4
- data/rbi/telnyx/models/calls/transcription_config.rbi +17 -2
- data/rbi/telnyx/models/calls/transcription_start_request.rbi +438 -5
- data/rbi/telnyx/resources/ai/openai.rbi +1 -1
- data/rbi/telnyx/resources/ai.rbi +2 -2
- data/rbi/telnyx/resources/calls/actions.rbi +2 -1
- data/sig/telnyx/models/ai/openai_create_response_params.rbs +5 -5
- data/sig/telnyx/models/ai/transcription_settings.rbs +2 -0
- data/sig/telnyx/models/ai/transcription_settings_config.rbs +21 -0
- data/sig/telnyx/models/ai/voice_settings.rbs +9 -2
- data/sig/telnyx/models/ai_create_response_params.rbs +4 -5
- data/sig/telnyx/models/calls/transcription_config.rbs +2 -0
- data/sig/telnyx/models/calls/transcription_start_request.rbs +177 -1
- data/sig/telnyx/resources/ai/openai.rbs +1 -1
- data/sig/telnyx/resources/ai.rbs +1 -1
- metadata +2 -5
- data/lib/telnyx/models/calls/transcription_engine_speechmatics_config.rb +0 -100
- data/rbi/telnyx/models/calls/transcription_engine_speechmatics_config.rbi +0 -289
- data/sig/telnyx/models/calls/transcription_engine_speechmatics_config.rbs +0 -114
|
@@ -56,7 +56,8 @@ module Telnyx
|
|
|
56
56
|
Telnyx::Calls::TranscriptionEngineAzureConfig,
|
|
57
57
|
Telnyx::Calls::TranscriptionEngineXaiConfig,
|
|
58
58
|
Telnyx::Calls::TranscriptionEngineAssemblyaiConfig,
|
|
59
|
-
Telnyx::Calls::
|
|
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::
|
|
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::
|
|
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::
|
|
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::
|
|
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[
|
data/rbi/telnyx/resources/ai.rbi
CHANGED
|
@@ -54,11 +54,11 @@ module Telnyx
|
|
|
54
54
|
# Conversation ID to leverage persistent conversations.
|
|
55
55
|
sig do
|
|
56
56
|
params(
|
|
57
|
-
|
|
57
|
+
body: T::Hash[Symbol, T.anything],
|
|
58
58
|
request_options: Telnyx::RequestOptions::OrHash
|
|
59
59
|
).returns(T::Hash[Symbol, T.anything])
|
|
60
60
|
end
|
|
61
|
-
def create_response(
|
|
61
|
+
def create_response(body:, request_options: {})
|
|
62
62
|
end
|
|
63
63
|
|
|
64
64
|
# **Deprecated**: Use `GET /v2/ai/openai/models` instead.
|
|
@@ -1787,7 +1787,8 @@ module Telnyx
|
|
|
1787
1787
|
Telnyx::Calls::TranscriptionEngineAzureConfig::OrHash,
|
|
1788
1788
|
Telnyx::Calls::TranscriptionEngineXaiConfig::OrHash,
|
|
1789
1789
|
Telnyx::Calls::TranscriptionEngineAssemblyaiConfig::OrHash,
|
|
1790
|
-
Telnyx::Calls::
|
|
1790
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::Speechmatics::OrHash,
|
|
1791
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::Soniox::OrHash,
|
|
1791
1792
|
Telnyx::Calls::TranscriptionEngineAConfig::OrHash,
|
|
1792
1793
|
Telnyx::Calls::TranscriptionEngineBConfig::OrHash,
|
|
1793
1794
|
Telnyx::Calls::DeepgramNova2Config::OrHash,
|
|
@@ -4,7 +4,7 @@ module Telnyx
|
|
|
4
4
|
type openai_create_response_params =
|
|
5
5
|
{
|
|
6
6
|
conversation: String,
|
|
7
|
-
input:
|
|
7
|
+
input: top,
|
|
8
8
|
instructions: String,
|
|
9
9
|
model: String,
|
|
10
10
|
stream: bool
|
|
@@ -19,9 +19,9 @@ module Telnyx
|
|
|
19
19
|
|
|
20
20
|
def conversation=: (String) -> String
|
|
21
21
|
|
|
22
|
-
attr_reader input:
|
|
22
|
+
attr_reader input: top?
|
|
23
23
|
|
|
24
|
-
def input=: (
|
|
24
|
+
def input=: (top) -> top
|
|
25
25
|
|
|
26
26
|
attr_reader instructions: String?
|
|
27
27
|
|
|
@@ -37,7 +37,7 @@ module Telnyx
|
|
|
37
37
|
|
|
38
38
|
def initialize: (
|
|
39
39
|
?conversation: String,
|
|
40
|
-
?input:
|
|
40
|
+
?input: top,
|
|
41
41
|
?instructions: String,
|
|
42
42
|
?model: String,
|
|
43
43
|
?stream: bool,
|
|
@@ -46,7 +46,7 @@ module Telnyx
|
|
|
46
46
|
|
|
47
47
|
def to_hash: -> {
|
|
48
48
|
conversation: String,
|
|
49
|
-
input:
|
|
49
|
+
input: top,
|
|
50
50
|
instructions: String,
|
|
51
51
|
model: String,
|
|
52
52
|
stream: bool,
|
|
@@ -58,6 +58,7 @@ module Telnyx
|
|
|
58
58
|
| :"azure/fast"
|
|
59
59
|
| :"assemblyai/universal-streaming"
|
|
60
60
|
| :"xai/grok-stt"
|
|
61
|
+
| :"soniox/stt-rt-v4"
|
|
61
62
|
| :"distil-whisper/distil-large-v2"
|
|
62
63
|
| :"openai/whisper-large-v3-turbo"
|
|
63
64
|
|
|
@@ -70,6 +71,7 @@ module Telnyx
|
|
|
70
71
|
AZURE_FAST: :"azure/fast"
|
|
71
72
|
ASSEMBLYAI_UNIVERSAL_STREAMING: :"assemblyai/universal-streaming"
|
|
72
73
|
XAI_GROK_STT: :"xai/grok-stt"
|
|
74
|
+
SONIOX_STT_RT_V4: :"soniox/stt-rt-v4"
|
|
73
75
|
DISTIL_WHISPER_DISTIL_LARGE_V2: :"distil-whisper/distil-large-v2"
|
|
74
76
|
OPENAI_WHISPER_LARGE_V3_TURBO: :"openai/whisper-large-v3-turbo"
|
|
75
77
|
|
|
@@ -4,10 +4,13 @@ module Telnyx
|
|
|
4
4
|
type transcription_settings_config =
|
|
5
5
|
{
|
|
6
6
|
eager_eot_threshold: Float,
|
|
7
|
+
enable_endpoint_detection: bool,
|
|
7
8
|
end_of_turn_confidence_threshold: Float,
|
|
8
9
|
eot_threshold: Float,
|
|
9
10
|
eot_timeout_ms: Integer,
|
|
11
|
+
interim_results: bool,
|
|
10
12
|
keyterm: String,
|
|
13
|
+
max_endpoint_delay_ms: Integer,
|
|
11
14
|
max_turn_silence: Integer,
|
|
12
15
|
min_turn_silence: Integer,
|
|
13
16
|
numerals: bool,
|
|
@@ -19,6 +22,10 @@ module Telnyx
|
|
|
19
22
|
|
|
20
23
|
def eager_eot_threshold=: (Float) -> Float
|
|
21
24
|
|
|
25
|
+
attr_reader enable_endpoint_detection: bool?
|
|
26
|
+
|
|
27
|
+
def enable_endpoint_detection=: (bool) -> bool
|
|
28
|
+
|
|
22
29
|
attr_reader end_of_turn_confidence_threshold: Float?
|
|
23
30
|
|
|
24
31
|
def end_of_turn_confidence_threshold=: (Float) -> Float
|
|
@@ -31,10 +38,18 @@ module Telnyx
|
|
|
31
38
|
|
|
32
39
|
def eot_timeout_ms=: (Integer) -> Integer
|
|
33
40
|
|
|
41
|
+
attr_reader interim_results: bool?
|
|
42
|
+
|
|
43
|
+
def interim_results=: (bool) -> bool
|
|
44
|
+
|
|
34
45
|
attr_reader keyterm: String?
|
|
35
46
|
|
|
36
47
|
def keyterm=: (String) -> String
|
|
37
48
|
|
|
49
|
+
attr_reader max_endpoint_delay_ms: Integer?
|
|
50
|
+
|
|
51
|
+
def max_endpoint_delay_ms=: (Integer) -> Integer
|
|
52
|
+
|
|
38
53
|
attr_reader max_turn_silence: Integer?
|
|
39
54
|
|
|
40
55
|
def max_turn_silence=: (Integer) -> Integer
|
|
@@ -53,10 +68,13 @@ module Telnyx
|
|
|
53
68
|
|
|
54
69
|
def initialize: (
|
|
55
70
|
?eager_eot_threshold: Float,
|
|
71
|
+
?enable_endpoint_detection: bool,
|
|
56
72
|
?end_of_turn_confidence_threshold: Float,
|
|
57
73
|
?eot_threshold: Float,
|
|
58
74
|
?eot_timeout_ms: Integer,
|
|
75
|
+
?interim_results: bool,
|
|
59
76
|
?keyterm: String,
|
|
77
|
+
?max_endpoint_delay_ms: Integer,
|
|
60
78
|
?max_turn_silence: Integer,
|
|
61
79
|
?min_turn_silence: Integer,
|
|
62
80
|
?numerals: bool,
|
|
@@ -65,10 +83,13 @@ module Telnyx
|
|
|
65
83
|
|
|
66
84
|
def to_hash: -> {
|
|
67
85
|
eager_eot_threshold: Float,
|
|
86
|
+
enable_endpoint_detection: bool,
|
|
68
87
|
end_of_turn_confidence_threshold: Float,
|
|
69
88
|
eot_threshold: Float,
|
|
70
89
|
eot_timeout_ms: Integer,
|
|
90
|
+
interim_results: bool,
|
|
71
91
|
keyterm: String,
|
|
92
|
+
max_endpoint_delay_ms: Integer,
|
|
72
93
|
max_turn_silence: Integer,
|
|
73
94
|
min_turn_silence: Integer,
|
|
74
95
|
numerals: bool,
|
|
@@ -98,7 +98,8 @@ module Telnyx
|
|
|
98
98
|
type predefined_media =
|
|
99
99
|
{
|
|
100
100
|
type: :predefined_media,
|
|
101
|
-
value: Telnyx::Models::AI::VoiceSettings::BackgroundAudio::PredefinedMedia::value
|
|
101
|
+
value: Telnyx::Models::AI::VoiceSettings::BackgroundAudio::PredefinedMedia::value,
|
|
102
|
+
volume: Float
|
|
102
103
|
}
|
|
103
104
|
|
|
104
105
|
class PredefinedMedia < Telnyx::Internal::Type::BaseModel
|
|
@@ -106,14 +107,20 @@ module Telnyx
|
|
|
106
107
|
|
|
107
108
|
attr_accessor value: Telnyx::Models::AI::VoiceSettings::BackgroundAudio::PredefinedMedia::value
|
|
108
109
|
|
|
110
|
+
attr_reader volume: Float?
|
|
111
|
+
|
|
112
|
+
def volume=: (Float) -> Float
|
|
113
|
+
|
|
109
114
|
def initialize: (
|
|
110
115
|
value: Telnyx::Models::AI::VoiceSettings::BackgroundAudio::PredefinedMedia::value,
|
|
116
|
+
?volume: Float,
|
|
111
117
|
?type: :predefined_media
|
|
112
118
|
) -> void
|
|
113
119
|
|
|
114
120
|
def to_hash: -> {
|
|
115
121
|
type: :predefined_media,
|
|
116
|
-
value: Telnyx::Models::AI::VoiceSettings::BackgroundAudio::PredefinedMedia::value
|
|
122
|
+
value: Telnyx::Models::AI::VoiceSettings::BackgroundAudio::PredefinedMedia::value,
|
|
123
|
+
volume: Float
|
|
117
124
|
}
|
|
118
125
|
|
|
119
126
|
type value = :silence | :office
|