telnyx 6.70.0 → 6.71.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.
- package/CHANGELOG.md +11 -0
- package/client.d.mts +11 -4
- package/client.d.mts.map +1 -1
- package/client.d.ts +11 -4
- package/client.d.ts.map +1 -1
- package/client.js +6 -0
- package/client.js.map +1 -1
- package/client.mjs +6 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/calls/actions.d.mts +260 -247
- package/resources/calls/actions.d.mts.map +1 -1
- package/resources/calls/actions.d.ts +260 -247
- package/resources/calls/actions.d.ts.map +1 -1
- package/resources/calls/actions.js.map +1 -1
- package/resources/calls/actions.mjs.map +1 -1
- package/resources/calls/calls.d.mts +210 -3
- package/resources/calls/calls.d.mts.map +1 -1
- package/resources/calls/calls.d.ts +210 -3
- package/resources/calls/calls.d.ts.map +1 -1
- package/resources/calls/calls.js.map +1 -1
- package/resources/calls/calls.mjs.map +1 -1
- package/resources/calls/index.d.mts +2 -2
- package/resources/calls/index.d.mts.map +1 -1
- package/resources/calls/index.d.ts +2 -2
- package/resources/calls/index.d.ts.map +1 -1
- package/resources/calls/index.js.map +1 -1
- package/resources/calls/index.mjs.map +1 -1
- package/resources/conferences/actions.d.mts +1 -9
- package/resources/conferences/actions.d.mts.map +1 -1
- package/resources/conferences/actions.d.ts +1 -9
- package/resources/conferences/actions.d.ts.map +1 -1
- package/resources/index.d.mts +3 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +3 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +4 -2
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/shared.d.mts +6 -0
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +6 -0
- package/resources/shared.d.ts.map +1 -1
- package/resources/speech-to-text.d.mts +81 -0
- package/resources/speech-to-text.d.mts.map +1 -0
- package/resources/speech-to-text.d.ts +81 -0
- package/resources/speech-to-text.d.ts.map +1 -0
- package/resources/speech-to-text.js +36 -0
- package/resources/speech-to-text.js.map +1 -0
- package/resources/speech-to-text.mjs +32 -0
- package/resources/speech-to-text.mjs.map +1 -0
- package/resources/voice-sdk-call-reports.d.mts +30 -105
- package/resources/voice-sdk-call-reports.d.mts.map +1 -1
- package/resources/voice-sdk-call-reports.d.ts +30 -105
- package/resources/voice-sdk-call-reports.d.ts.map +1 -1
- package/resources/voice-sdk-call-reports.js.map +1 -1
- package/resources/voice-sdk-call-reports.mjs.map +1 -1
- package/resources/whatsapp/index.d.mts +1 -1
- package/resources/whatsapp/index.d.mts.map +1 -1
- package/resources/whatsapp/index.d.ts +1 -1
- package/resources/whatsapp/index.d.ts.map +1 -1
- package/resources/whatsapp/index.js.map +1 -1
- package/resources/whatsapp/index.mjs.map +1 -1
- package/resources/whatsapp/user-data.d.mts +16 -33
- package/resources/whatsapp/user-data.d.mts.map +1 -1
- package/resources/whatsapp/user-data.d.ts +16 -33
- package/resources/whatsapp/user-data.d.ts.map +1 -1
- package/resources/whatsapp/whatsapp.d.mts +2 -2
- package/resources/whatsapp/whatsapp.d.mts.map +1 -1
- package/resources/whatsapp/whatsapp.d.ts +2 -2
- package/resources/whatsapp/whatsapp.d.ts.map +1 -1
- package/resources/whatsapp/whatsapp.js.map +1 -1
- package/resources/whatsapp/whatsapp.mjs.map +1 -1
- package/src/client.ts +23 -0
- package/src/resources/calls/actions.ts +331 -320
- package/src/resources/calls/calls.ts +272 -0
- package/src/resources/calls/index.ts +4 -0
- package/src/resources/conferences/actions.ts +1 -10
- package/src/resources/index.ts +8 -0
- package/src/resources/shared.ts +7 -0
- package/src/resources/speech-to-text.ts +114 -0
- package/src/resources/voice-sdk-call-reports.ts +33 -116
- package/src/resources/whatsapp/index.ts +1 -0
- package/src/resources/whatsapp/user-data.ts +17 -38
- package/src/resources/whatsapp/whatsapp.ts +2 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../core/resource';
|
|
4
|
+
import * as CallsAPI from './calls';
|
|
4
5
|
import * as Shared from '../shared';
|
|
5
6
|
import * as ActionsAPI from './actions';
|
|
6
7
|
import {
|
|
@@ -104,6 +105,8 @@ import {
|
|
|
104
105
|
TranscriptionEngineBConfig,
|
|
105
106
|
TranscriptionEngineDeepgramConfig,
|
|
106
107
|
TranscriptionEngineGoogleConfig,
|
|
108
|
+
TranscriptionEngineSonioxConfig,
|
|
109
|
+
TranscriptionEngineSpeechmaticsConfig,
|
|
107
110
|
TranscriptionEngineTelnyxConfig,
|
|
108
111
|
TranscriptionEngineXaiConfig,
|
|
109
112
|
TranscriptionStartRequest,
|
|
@@ -385,6 +388,112 @@ export namespace CallAssistantRequest {
|
|
|
385
388
|
}
|
|
386
389
|
}
|
|
387
390
|
|
|
391
|
+
/**
|
|
392
|
+
* Settings for handling caller interruptions during Conversation Relay speech.
|
|
393
|
+
*/
|
|
394
|
+
export interface ConversationRelayInterruptionSettings {
|
|
395
|
+
/**
|
|
396
|
+
* Legacy boolean form. `true` is equivalent to `interruptible=any`; `false` is
|
|
397
|
+
* equivalent to `interruptible=none`.
|
|
398
|
+
*/
|
|
399
|
+
enable?: boolean;
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* Controls when caller input can interrupt assistant speech. `any` allows speech
|
|
403
|
+
* or DTMF interruptions; `none` disables interruptions; `speech` allows speech
|
|
404
|
+
* only; `dtmf` allows DTMF only.
|
|
405
|
+
*/
|
|
406
|
+
interruptible?: 'none' | 'any' | 'speech' | 'dtmf';
|
|
407
|
+
|
|
408
|
+
/**
|
|
409
|
+
* Controls when caller input can interrupt assistant speech. `any` allows speech
|
|
410
|
+
* or DTMF interruptions; `none` disables interruptions; `speech` allows speech
|
|
411
|
+
* only; `dtmf` allows DTMF only.
|
|
412
|
+
*/
|
|
413
|
+
interruptible_greeting?: 'none' | 'any' | 'speech' | 'dtmf';
|
|
414
|
+
|
|
415
|
+
/**
|
|
416
|
+
* Controls when caller input can interrupt assistant speech. `any` allows speech
|
|
417
|
+
* or DTMF interruptions; `none` disables interruptions; `speech` allows speech
|
|
418
|
+
* only; `dtmf` allows DTMF only.
|
|
419
|
+
*/
|
|
420
|
+
welcome_greeting_interruptible?: 'none' | 'any' | 'speech' | 'dtmf';
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
/**
|
|
424
|
+
* Language-specific TTS and transcription settings for Conversation Relay.
|
|
425
|
+
*/
|
|
426
|
+
export interface ConversationRelayLanguage {
|
|
427
|
+
/**
|
|
428
|
+
* BCP 47 language tag for this language configuration.
|
|
429
|
+
*/
|
|
430
|
+
language: string;
|
|
431
|
+
|
|
432
|
+
/**
|
|
433
|
+
* Conversation Relay speech model. Prefer
|
|
434
|
+
* `transcription_engine_config.transcription_model` when configuring
|
|
435
|
+
* speech-to-text.
|
|
436
|
+
*/
|
|
437
|
+
speech_model?: string;
|
|
438
|
+
|
|
439
|
+
/**
|
|
440
|
+
* Engine to use for speech recognition. Legacy values `A` - `Google`, `B` -
|
|
441
|
+
* `Telnyx` are supported for backward compatibility. When provided in a
|
|
442
|
+
* Conversation Relay language entry, Telnyx derives `transcription_provider` and
|
|
443
|
+
* `speech_model` for that language.
|
|
444
|
+
*/
|
|
445
|
+
transcription_engine?:
|
|
446
|
+
| 'Google'
|
|
447
|
+
| 'Telnyx'
|
|
448
|
+
| 'Deepgram'
|
|
449
|
+
| 'Azure'
|
|
450
|
+
| 'xAI'
|
|
451
|
+
| 'AssemblyAI'
|
|
452
|
+
| 'Speechmatics'
|
|
453
|
+
| 'Soniox'
|
|
454
|
+
| 'A'
|
|
455
|
+
| 'B';
|
|
456
|
+
|
|
457
|
+
/**
|
|
458
|
+
* Engine-specific transcription settings for Conversation Relay. This accepts the
|
|
459
|
+
* same provider-specific options used by the Call Transcription Start command,
|
|
460
|
+
* such as `transcription_model`, without requiring the engine discriminator to be
|
|
461
|
+
* repeated inside this object.
|
|
462
|
+
*/
|
|
463
|
+
transcription_engine_config?: { [key: string]: unknown };
|
|
464
|
+
|
|
465
|
+
/**
|
|
466
|
+
* Conversation Relay transcription provider name. Prefer `transcription_engine`
|
|
467
|
+
* when configuring speech-to-text.
|
|
468
|
+
*/
|
|
469
|
+
transcription_provider?: string;
|
|
470
|
+
|
|
471
|
+
/**
|
|
472
|
+
* Text-to-speech provider for this language. If omitted and `voice` is provided,
|
|
473
|
+
* Telnyx derives the provider from the voice identifier.
|
|
474
|
+
*/
|
|
475
|
+
tts_provider?: string;
|
|
476
|
+
|
|
477
|
+
/**
|
|
478
|
+
* Voice identifier for this language.
|
|
479
|
+
*/
|
|
480
|
+
voice?: string;
|
|
481
|
+
|
|
482
|
+
/**
|
|
483
|
+
* The settings associated with the voice selected
|
|
484
|
+
*/
|
|
485
|
+
voice_settings?:
|
|
486
|
+
| ActionsAPI.ElevenLabsVoiceSettings
|
|
487
|
+
| ActionsAPI.TelnyxVoiceSettings
|
|
488
|
+
| ActionsAPI.AwsVoiceSettings
|
|
489
|
+
| Shared.MinimaxVoiceSettings
|
|
490
|
+
| Shared.AzureVoiceSettings
|
|
491
|
+
| Shared.RimeVoiceSettings
|
|
492
|
+
| Shared.ResembleVoiceSettings
|
|
493
|
+
| Shared.InworldVoiceSettings
|
|
494
|
+
| Shared.XaiVoiceSettings;
|
|
495
|
+
}
|
|
496
|
+
|
|
388
497
|
export interface CustomSipHeader {
|
|
389
498
|
/**
|
|
390
499
|
* The name of the header to add.
|
|
@@ -701,6 +810,16 @@ export interface CallDialParams {
|
|
|
701
810
|
*/
|
|
702
811
|
conference_config?: CallDialParams.ConferenceConfig;
|
|
703
812
|
|
|
813
|
+
/**
|
|
814
|
+
* Starts a Conversation Relay session automatically when the answered/dialed call
|
|
815
|
+
* is answered. This embedded shape is supported on `answer` and `dial`. It uses
|
|
816
|
+
* public field names (`url`, `dtmf_detection`, `greeting`, `voice`, `language`,
|
|
817
|
+
* etc.) and maps them to the underlying Conversation Relay action. `client_state`,
|
|
818
|
+
* `tts_language`, and `transcription_language` inside this object are ignored; use
|
|
819
|
+
* the parent command's `client_state` and `command_id` fields instead.
|
|
820
|
+
*/
|
|
821
|
+
conversation_relay_config?: CallDialParams.ConversationRelayConfig;
|
|
822
|
+
|
|
704
823
|
/**
|
|
705
824
|
* Custom headers to be added to the SIP INVITE.
|
|
706
825
|
*/
|
|
@@ -1160,6 +1279,155 @@ export namespace CallDialParams {
|
|
|
1160
1279
|
whisper_call_control_ids?: Array<string>;
|
|
1161
1280
|
}
|
|
1162
1281
|
|
|
1282
|
+
/**
|
|
1283
|
+
* Starts a Conversation Relay session automatically when the answered/dialed call
|
|
1284
|
+
* is answered. This embedded shape is supported on `answer` and `dial`. It uses
|
|
1285
|
+
* public field names (`url`, `dtmf_detection`, `greeting`, `voice`, `language`,
|
|
1286
|
+
* etc.) and maps them to the underlying Conversation Relay action. `client_state`,
|
|
1287
|
+
* `tts_language`, and `transcription_language` inside this object are ignored; use
|
|
1288
|
+
* the parent command's `client_state` and `command_id` fields instead.
|
|
1289
|
+
*/
|
|
1290
|
+
export interface ConversationRelayConfig {
|
|
1291
|
+
/**
|
|
1292
|
+
* WebSocket URL for your Conversation Relay server. Must start with `ws://` or
|
|
1293
|
+
* `wss://`.
|
|
1294
|
+
*/
|
|
1295
|
+
url: string;
|
|
1296
|
+
|
|
1297
|
+
/**
|
|
1298
|
+
* Custom key-value parameters forwarded to the relay session as assistant dynamic
|
|
1299
|
+
* variables.
|
|
1300
|
+
*/
|
|
1301
|
+
custom_parameters?: { [key: string]: unknown };
|
|
1302
|
+
|
|
1303
|
+
/**
|
|
1304
|
+
* Enable DTMF detection for the relay session.
|
|
1305
|
+
*/
|
|
1306
|
+
dtmf_detection?: boolean;
|
|
1307
|
+
|
|
1308
|
+
/**
|
|
1309
|
+
* Text played when the relay session starts.
|
|
1310
|
+
*/
|
|
1311
|
+
greeting?: string;
|
|
1312
|
+
|
|
1313
|
+
/**
|
|
1314
|
+
* Controls when caller input can interrupt assistant speech. `any` allows speech
|
|
1315
|
+
* or DTMF interruptions; `none` disables interruptions; `speech` allows speech
|
|
1316
|
+
* only; `dtmf` allows DTMF only.
|
|
1317
|
+
*/
|
|
1318
|
+
interruptible?: 'none' | 'any' | 'speech' | 'dtmf';
|
|
1319
|
+
|
|
1320
|
+
/**
|
|
1321
|
+
* Controls when caller input can interrupt assistant speech. `any` allows speech
|
|
1322
|
+
* or DTMF interruptions; `none` disables interruptions; `speech` allows speech
|
|
1323
|
+
* only; `dtmf` allows DTMF only.
|
|
1324
|
+
*/
|
|
1325
|
+
interruptible_greeting?: 'none' | 'any' | 'speech' | 'dtmf';
|
|
1326
|
+
|
|
1327
|
+
/**
|
|
1328
|
+
* Settings for handling caller interruptions during Conversation Relay speech.
|
|
1329
|
+
*/
|
|
1330
|
+
interruption_settings?: CallsAPI.ConversationRelayInterruptionSettings;
|
|
1331
|
+
|
|
1332
|
+
/**
|
|
1333
|
+
* Default language for both text-to-speech and speech recognition.
|
|
1334
|
+
*/
|
|
1335
|
+
language?: string;
|
|
1336
|
+
|
|
1337
|
+
/**
|
|
1338
|
+
* Per-language TTS and transcription settings.
|
|
1339
|
+
*/
|
|
1340
|
+
languages?: Array<CallsAPI.ConversationRelayLanguage>;
|
|
1341
|
+
|
|
1342
|
+
/**
|
|
1343
|
+
* Structured voice provider. Must be supplied together with `structured_provider`.
|
|
1344
|
+
*/
|
|
1345
|
+
provider?: string;
|
|
1346
|
+
|
|
1347
|
+
/**
|
|
1348
|
+
* Provider-specific structured voice settings. Must be supplied together with
|
|
1349
|
+
* `provider`; Telnyx sends the value as the nested provider configuration for
|
|
1350
|
+
* Conversation Relay.
|
|
1351
|
+
*/
|
|
1352
|
+
structured_provider?: { [key: string]: unknown };
|
|
1353
|
+
|
|
1354
|
+
/**
|
|
1355
|
+
* Engine to use for speech recognition. Legacy values `A` - `Google`, `B` -
|
|
1356
|
+
* `Telnyx` are supported for backward compatibility. For Conversation Relay, use
|
|
1357
|
+
* this field with `transcription_engine_config`; the `transcription` object is not
|
|
1358
|
+
* supported.
|
|
1359
|
+
*/
|
|
1360
|
+
transcription_engine?:
|
|
1361
|
+
| 'Google'
|
|
1362
|
+
| 'Telnyx'
|
|
1363
|
+
| 'Deepgram'
|
|
1364
|
+
| 'Azure'
|
|
1365
|
+
| 'xAI'
|
|
1366
|
+
| 'AssemblyAI'
|
|
1367
|
+
| 'Speechmatics'
|
|
1368
|
+
| 'Soniox'
|
|
1369
|
+
| 'A'
|
|
1370
|
+
| 'B';
|
|
1371
|
+
|
|
1372
|
+
/**
|
|
1373
|
+
* Engine-specific transcription settings for Conversation Relay. This accepts the
|
|
1374
|
+
* same provider-specific options used by the Call Transcription Start command,
|
|
1375
|
+
* such as `transcription_model`, without requiring the engine discriminator to be
|
|
1376
|
+
* repeated inside this object.
|
|
1377
|
+
*/
|
|
1378
|
+
transcription_engine_config?: { [key: string]: unknown };
|
|
1379
|
+
|
|
1380
|
+
/**
|
|
1381
|
+
* Text-to-speech provider. If omitted, Telnyx derives it from `voice` or
|
|
1382
|
+
* `provider`.
|
|
1383
|
+
*/
|
|
1384
|
+
tts_provider?: string;
|
|
1385
|
+
|
|
1386
|
+
/**
|
|
1387
|
+
* The voice to be used by the voice assistant. Currently we support ElevenLabs,
|
|
1388
|
+
* Telnyx and AWS voices.
|
|
1389
|
+
*
|
|
1390
|
+
* **Supported Providers:**
|
|
1391
|
+
*
|
|
1392
|
+
* - **AWS:** Use `AWS.Polly.<VoiceId>` (e.g., `AWS.Polly.Joanna`). For neural
|
|
1393
|
+
* voices, which provide more realistic, human-like speech, append `-Neural` to
|
|
1394
|
+
* the `VoiceId` (e.g., `AWS.Polly.Joanna-Neural`). Check the
|
|
1395
|
+
* [available voices](https://docs.aws.amazon.com/polly/latest/dg/available-voices.html)
|
|
1396
|
+
* for compatibility.
|
|
1397
|
+
* - **Azure:** Use `Azure.<VoiceId>. (e.g. Azure.en-CA-ClaraNeural,
|
|
1398
|
+
* Azure.en-CA-LiamNeural, Azure.en-US-BrianMultilingualNeural,
|
|
1399
|
+
* Azure.en-US-Ava:DragonHDLatestNeural. For a complete list of voices, go to
|
|
1400
|
+
* [Azure Voice Gallery](https://speech.microsoft.com/portal/voicegallery).)
|
|
1401
|
+
* - **ElevenLabs:** Use `ElevenLabs.<ModelId>.<VoiceId>` (e.g.,
|
|
1402
|
+
* `ElevenLabs.BaseModel.John`). The `ModelId` part is optional. To use
|
|
1403
|
+
* ElevenLabs, you must provide your ElevenLabs API key as an integration secret
|
|
1404
|
+
* under `"voice_settings": {"api_key_ref": "<secret_id>"}`. See
|
|
1405
|
+
* [integration secrets documentation](https://developers.telnyx.com/api/secrets-manager/integration-secrets/create-integration-secret)
|
|
1406
|
+
* for details. Check
|
|
1407
|
+
* [available voices](https://elevenlabs.io/docs/api-reference/get-voices).
|
|
1408
|
+
* - **Telnyx:** Use `Telnyx.<model_id>.<voice_id>`
|
|
1409
|
+
* - **Inworld:** Use `Inworld.<ModelId>.<VoiceId>` (e.g., `Inworld.Mini.Loretta`,
|
|
1410
|
+
* `Inworld.Max.Oliver`). Supported models: `Mini`, `Max`.
|
|
1411
|
+
* - **xAI:** Use `xAI.<VoiceId>` (e.g., `xAI.eve`). Available voices: `eve`,
|
|
1412
|
+
* `ara`, `rex`, `sal`, `leo`.
|
|
1413
|
+
*/
|
|
1414
|
+
voice?: string;
|
|
1415
|
+
|
|
1416
|
+
/**
|
|
1417
|
+
* The settings associated with the voice selected
|
|
1418
|
+
*/
|
|
1419
|
+
voice_settings?:
|
|
1420
|
+
| ActionsAPI.ElevenLabsVoiceSettings
|
|
1421
|
+
| ActionsAPI.TelnyxVoiceSettings
|
|
1422
|
+
| ActionsAPI.AwsVoiceSettings
|
|
1423
|
+
| Shared.MinimaxVoiceSettings
|
|
1424
|
+
| Shared.AzureVoiceSettings
|
|
1425
|
+
| Shared.RimeVoiceSettings
|
|
1426
|
+
| Shared.ResembleVoiceSettings
|
|
1427
|
+
| Shared.InworldVoiceSettings
|
|
1428
|
+
| Shared.XaiVoiceSettings;
|
|
1429
|
+
}
|
|
1430
|
+
|
|
1163
1431
|
/**
|
|
1164
1432
|
* Enables deepfake detection on the call. When enabled, audio from the remote
|
|
1165
1433
|
* party is streamed to a detection service that analyzes whether the voice is
|
|
@@ -1198,6 +1466,8 @@ Calls.Actions = Actions;
|
|
|
1198
1466
|
export declare namespace Calls {
|
|
1199
1467
|
export {
|
|
1200
1468
|
type CallAssistantRequest as CallAssistantRequest,
|
|
1469
|
+
type ConversationRelayInterruptionSettings as ConversationRelayInterruptionSettings,
|
|
1470
|
+
type ConversationRelayLanguage as ConversationRelayLanguage,
|
|
1201
1471
|
type CustomSipHeader as CustomSipHeader,
|
|
1202
1472
|
type DialogflowConfig as DialogflowConfig,
|
|
1203
1473
|
type SipHeader as SipHeader,
|
|
@@ -1233,6 +1503,8 @@ export declare namespace Calls {
|
|
|
1233
1503
|
type TranscriptionEngineBConfig as TranscriptionEngineBConfig,
|
|
1234
1504
|
type TranscriptionEngineDeepgramConfig as TranscriptionEngineDeepgramConfig,
|
|
1235
1505
|
type TranscriptionEngineGoogleConfig as TranscriptionEngineGoogleConfig,
|
|
1506
|
+
type TranscriptionEngineSonioxConfig as TranscriptionEngineSonioxConfig,
|
|
1507
|
+
type TranscriptionEngineSpeechmaticsConfig as TranscriptionEngineSpeechmaticsConfig,
|
|
1236
1508
|
type TranscriptionEngineTelnyxConfig as TranscriptionEngineTelnyxConfig,
|
|
1237
1509
|
type TranscriptionEngineXaiConfig as TranscriptionEngineXaiConfig,
|
|
1238
1510
|
type TranscriptionStartRequest as TranscriptionStartRequest,
|
|
@@ -21,6 +21,8 @@ export {
|
|
|
21
21
|
type TranscriptionEngineBConfig,
|
|
22
22
|
type TranscriptionEngineDeepgramConfig,
|
|
23
23
|
type TranscriptionEngineGoogleConfig,
|
|
24
|
+
type TranscriptionEngineSonioxConfig,
|
|
25
|
+
type TranscriptionEngineSpeechmaticsConfig,
|
|
24
26
|
type TranscriptionEngineTelnyxConfig,
|
|
25
27
|
type TranscriptionEngineXaiConfig,
|
|
26
28
|
type TranscriptionStartRequest,
|
|
@@ -108,6 +110,8 @@ export {
|
|
|
108
110
|
export {
|
|
109
111
|
Calls,
|
|
110
112
|
type CallAssistantRequest,
|
|
113
|
+
type ConversationRelayInterruptionSettings,
|
|
114
|
+
type ConversationRelayLanguage,
|
|
111
115
|
type CustomSipHeader,
|
|
112
116
|
type DialogflowConfig,
|
|
113
117
|
type SipHeader,
|
|
@@ -1019,19 +1019,10 @@ export interface ActionSpeakParams {
|
|
|
1019
1019
|
| Shared.AzureVoiceSettings
|
|
1020
1020
|
| Shared.RimeVoiceSettings
|
|
1021
1021
|
| Shared.ResembleVoiceSettings
|
|
1022
|
-
|
|
|
1022
|
+
| Shared.InworldVoiceSettings
|
|
1023
1023
|
| Shared.XaiVoiceSettings;
|
|
1024
1024
|
}
|
|
1025
1025
|
|
|
1026
|
-
export namespace ActionSpeakParams {
|
|
1027
|
-
export interface InworldVoiceSettings {
|
|
1028
|
-
/**
|
|
1029
|
-
* Voice settings provider type
|
|
1030
|
-
*/
|
|
1031
|
-
type: 'inworld';
|
|
1032
|
-
}
|
|
1033
|
-
}
|
|
1034
|
-
|
|
1035
1026
|
export interface ActionStopParams {
|
|
1036
1027
|
/**
|
|
1037
1028
|
* List of call control ids identifying participants the audio file should stop be
|
package/src/resources/index.ts
CHANGED
|
@@ -132,6 +132,8 @@ export {
|
|
|
132
132
|
export {
|
|
133
133
|
Calls,
|
|
134
134
|
type CallAssistantRequest,
|
|
135
|
+
type ConversationRelayInterruptionSettings,
|
|
136
|
+
type ConversationRelayLanguage,
|
|
135
137
|
type CustomSipHeader,
|
|
136
138
|
type DialogflowConfig,
|
|
137
139
|
type SipHeader,
|
|
@@ -1169,6 +1171,11 @@ export {
|
|
|
1169
1171
|
type SiprecConnectorCreateParams,
|
|
1170
1172
|
type SiprecConnectorUpdateParams,
|
|
1171
1173
|
} from './siprec-connectors';
|
|
1174
|
+
export {
|
|
1175
|
+
SpeechToText,
|
|
1176
|
+
type SpeechToTextListProvidersResponse,
|
|
1177
|
+
type SpeechToTextListProvidersParams,
|
|
1178
|
+
} from './speech-to-text';
|
|
1172
1179
|
export { Storage, type StorageListMigrationSourceCoverageResponse } from './storage/storage';
|
|
1173
1180
|
export {
|
|
1174
1181
|
SubNumberOrders,
|
|
@@ -1364,6 +1371,7 @@ export {
|
|
|
1364
1371
|
} from './voice-designs';
|
|
1365
1372
|
export {
|
|
1366
1373
|
VoiceSDKCallReports,
|
|
1374
|
+
type VoiceSDKCallReportLogEntry,
|
|
1367
1375
|
type VoiceSDKCallReportRetrieveResponse,
|
|
1368
1376
|
type VoiceSDKCallReportListResponse,
|
|
1369
1377
|
type VoiceSDKCallReportListParams,
|
package/src/resources/shared.ts
CHANGED
|
@@ -630,6 +630,13 @@ export namespace InboundMessagePayload {
|
|
|
630
630
|
}
|
|
631
631
|
}
|
|
632
632
|
|
|
633
|
+
export interface InworldVoiceSettings {
|
|
634
|
+
/**
|
|
635
|
+
* Voice settings provider type
|
|
636
|
+
*/
|
|
637
|
+
type: 'inworld';
|
|
638
|
+
}
|
|
639
|
+
|
|
633
640
|
/**
|
|
634
641
|
* The set of features available for a specific messaging use case (SMS or MMS).
|
|
635
642
|
* Features can vary depending on the characteristics the phone number, as well as
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../internal/request-options';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Discover available speech-to-text providers, models, and supported languages.
|
|
9
|
+
*/
|
|
10
|
+
export class SpeechToText extends APIResource {
|
|
11
|
+
/**
|
|
12
|
+
* Retrieve the canonical list of supported speech-to-text providers, models,
|
|
13
|
+
* accepted language codes, and the service types each model supports.
|
|
14
|
+
*
|
|
15
|
+
* Service types:
|
|
16
|
+
*
|
|
17
|
+
* - `streaming` — standalone WebSocket transcription via
|
|
18
|
+
* `/speech-to-text/transcription`.
|
|
19
|
+
* - `file_transcription` — file-based transcription via
|
|
20
|
+
* `/ai/audio/transcriptions`.
|
|
21
|
+
* - `in_call_transcription` — live call transcription via Call Control
|
|
22
|
+
* `transcription_start`.
|
|
23
|
+
*
|
|
24
|
+
* Use this endpoint to discover which (provider, model) combinations are available
|
|
25
|
+
* for the surface you need, and which language codes each accepts. `auto` in a
|
|
26
|
+
* `languages` array indicates the provider performs language detection.
|
|
27
|
+
*/
|
|
28
|
+
listProviders(
|
|
29
|
+
query: SpeechToTextListProvidersParams | null | undefined = {},
|
|
30
|
+
options?: RequestOptions,
|
|
31
|
+
): APIPromise<SpeechToTextListProvidersResponse> {
|
|
32
|
+
return this._client.get('/speech-to-text/providers', {
|
|
33
|
+
query,
|
|
34
|
+
defaultBaseURL: 'https://api.telnyx.com/v2',
|
|
35
|
+
...options,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* List of supported STT providers and models.
|
|
42
|
+
*/
|
|
43
|
+
export interface SpeechToTextListProvidersResponse {
|
|
44
|
+
data: Array<SpeechToTextListProvidersResponse.Data>;
|
|
45
|
+
|
|
46
|
+
meta: SpeechToTextListProvidersResponse.Meta;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export namespace SpeechToTextListProvidersResponse {
|
|
50
|
+
/**
|
|
51
|
+
* A (provider, model) tuple along with its supported service types and languages.
|
|
52
|
+
*/
|
|
53
|
+
export interface Data {
|
|
54
|
+
/**
|
|
55
|
+
* Languages this (provider, model) accepts, in the provider's native code format.
|
|
56
|
+
* `auto` indicates the provider performs language detection.
|
|
57
|
+
*/
|
|
58
|
+
languages: Array<string>;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Provider-scoped model name.
|
|
62
|
+
*/
|
|
63
|
+
model: string;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* STT provider name.
|
|
67
|
+
*/
|
|
68
|
+
provider: string;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Service surfaces this (provider, model) supports.
|
|
72
|
+
*/
|
|
73
|
+
service_types: Array<'streaming' | 'file_transcription' | 'in_call_transcription'>;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export interface Meta {
|
|
77
|
+
/**
|
|
78
|
+
* Total number of entries returned.
|
|
79
|
+
*/
|
|
80
|
+
total: number;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export interface SpeechToTextListProvidersParams {
|
|
85
|
+
/**
|
|
86
|
+
* Filter to entries for a specific STT provider. The enum mirrors the providers
|
|
87
|
+
* advertised across the speech-to-text spec (including `google` and `telnyx`,
|
|
88
|
+
* which are accepted as WebSocket transcription engines). A provider that has no
|
|
89
|
+
* models currently registered for any service type will return an empty `data`
|
|
90
|
+
* array rather than an error.
|
|
91
|
+
*/
|
|
92
|
+
provider?:
|
|
93
|
+
| 'deepgram'
|
|
94
|
+
| 'speechmatics'
|
|
95
|
+
| 'assemblyai'
|
|
96
|
+
| 'xai'
|
|
97
|
+
| 'soniox'
|
|
98
|
+
| 'azure'
|
|
99
|
+
| 'openai'
|
|
100
|
+
| 'google'
|
|
101
|
+
| 'telnyx';
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Filter to entries that support the given service type.
|
|
105
|
+
*/
|
|
106
|
+
service_type?: 'streaming' | 'file_transcription' | 'in_call_transcription';
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export declare namespace SpeechToText {
|
|
110
|
+
export {
|
|
111
|
+
type SpeechToTextListProvidersResponse as SpeechToTextListProvidersResponse,
|
|
112
|
+
type SpeechToTextListProvidersParams as SpeechToTextListProvidersParams,
|
|
113
|
+
};
|
|
114
|
+
}
|