telnyx 6.2.0 → 6.4.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 +36 -0
- package/client.d.mts +2 -8
- package/client.d.mts.map +1 -1
- package/client.d.ts +2 -8
- package/client.d.ts.map +1 -1
- package/client.js +4 -10
- package/client.js.map +1 -1
- package/client.mjs +4 -10
- package/client.mjs.map +1 -1
- package/core/EventEmitter.d.mts +45 -0
- package/core/EventEmitter.d.mts.map +1 -0
- package/core/EventEmitter.d.ts +45 -0
- package/core/EventEmitter.d.ts.map +1 -0
- package/core/EventEmitter.js +79 -0
- package/core/EventEmitter.js.map +1 -0
- package/core/EventEmitter.mjs +75 -0
- package/core/EventEmitter.mjs.map +1 -0
- package/core/pagination.d.mts.map +1 -1
- package/core/pagination.d.ts.map +1 -1
- package/internal/detect-platform.js +1 -1
- package/internal/detect-platform.js.map +1 -1
- package/internal/detect-platform.mjs +1 -1
- package/internal/detect-platform.mjs.map +1 -1
- package/package.json +9 -1
- package/resources/ai/assistants/assistants.d.mts +4 -0
- package/resources/ai/assistants/assistants.d.mts.map +1 -1
- package/resources/ai/assistants/assistants.d.ts +4 -0
- package/resources/ai/assistants/assistants.d.ts.map +1 -1
- package/resources/ai/assistants/assistants.js +4 -0
- package/resources/ai/assistants/assistants.js.map +1 -1
- package/resources/ai/assistants/assistants.mjs +4 -0
- package/resources/ai/assistants/assistants.mjs.map +1 -1
- package/resources/ai/assistants/index.d.mts +1 -0
- package/resources/ai/assistants/index.d.mts.map +1 -1
- package/resources/ai/assistants/index.d.ts +1 -0
- package/resources/ai/assistants/index.d.ts.map +1 -1
- package/resources/ai/assistants/index.js +3 -1
- package/resources/ai/assistants/index.js.map +1 -1
- package/resources/ai/assistants/index.mjs +1 -0
- package/resources/ai/assistants/index.mjs.map +1 -1
- package/resources/ai/assistants/tags.d.mts +59 -0
- package/resources/ai/assistants/tags.d.mts.map +1 -0
- package/resources/ai/assistants/tags.d.ts +59 -0
- package/resources/ai/assistants/tags.d.ts.map +1 -0
- package/resources/ai/assistants/tags.js +52 -0
- package/resources/ai/assistants/tags.js.map +1 -0
- package/resources/ai/assistants/tags.mjs +48 -0
- package/resources/ai/assistants/tags.mjs.map +1 -0
- package/resources/ai/audio.d.mts +0 -3
- package/resources/ai/audio.d.mts.map +1 -1
- package/resources/ai/audio.d.ts +0 -3
- package/resources/ai/audio.d.ts.map +1 -1
- package/resources/ai/audio.js +0 -3
- package/resources/ai/audio.js.map +1 -1
- package/resources/ai/audio.mjs +0 -3
- package/resources/ai/audio.mjs.map +1 -1
- package/resources/index.d.mts +1 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +2 -4
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +0 -1
- package/resources/index.mjs.map +1 -1
- package/resources/inexplicit-number-orders.d.mts.map +1 -1
- package/resources/inexplicit-number-orders.d.ts.map +1 -1
- package/resources/messages/messages.d.mts +12 -0
- package/resources/messages/messages.d.mts.map +1 -1
- package/resources/messages/messages.d.ts +12 -0
- package/resources/messages/messages.d.ts.map +1 -1
- package/resources/messages/messages.js.map +1 -1
- package/resources/messages/messages.mjs.map +1 -1
- package/resources/messages/rcs.d.mts +6 -0
- package/resources/messages/rcs.d.mts.map +1 -1
- package/resources/messages/rcs.d.ts +6 -0
- package/resources/messages/rcs.d.ts.map +1 -1
- package/resources/networks/networks.d.mts.map +1 -1
- package/resources/networks/networks.d.ts.map +1 -1
- package/resources/networks/networks.js.map +1 -1
- package/resources/networks/networks.mjs.map +1 -1
- package/resources/text-to-speech/index.d.mts +2 -0
- package/resources/text-to-speech/index.d.mts.map +1 -0
- package/resources/text-to-speech/index.d.ts +2 -0
- package/resources/text-to-speech/index.d.ts.map +1 -0
- package/resources/text-to-speech/index.js +7 -0
- package/resources/text-to-speech/index.js.map +1 -0
- package/resources/text-to-speech/index.mjs +3 -0
- package/resources/text-to-speech/index.mjs.map +1 -0
- package/resources/text-to-speech/internal-base.d.mts +40 -0
- package/resources/text-to-speech/internal-base.d.mts.map +1 -0
- package/resources/text-to-speech/internal-base.d.ts +40 -0
- package/resources/text-to-speech/internal-base.d.ts.map +1 -0
- package/resources/text-to-speech/internal-base.js +52 -0
- package/resources/text-to-speech/internal-base.js.map +1 -0
- package/resources/text-to-speech/internal-base.mjs +46 -0
- package/resources/text-to-speech/internal-base.mjs.map +1 -0
- package/resources/text-to-speech/text-to-speech.d.mts +427 -0
- package/resources/text-to-speech/text-to-speech.d.mts.map +1 -0
- package/resources/text-to-speech/text-to-speech.d.ts +427 -0
- package/resources/text-to-speech/text-to-speech.d.ts.map +1 -0
- package/resources/text-to-speech/text-to-speech.js +41 -0
- package/resources/text-to-speech/text-to-speech.js.map +1 -0
- package/resources/text-to-speech/text-to-speech.mjs +37 -0
- package/resources/text-to-speech/text-to-speech.mjs.map +1 -0
- package/resources/text-to-speech/ws.d.mts +17 -0
- package/resources/text-to-speech/ws.d.mts.map +1 -0
- package/resources/text-to-speech/ws.d.ts +17 -0
- package/resources/text-to-speech/ws.d.ts.map +1 -0
- package/resources/text-to-speech/ws.js +69 -0
- package/resources/text-to-speech/ws.js.map +1 -0
- package/resources/text-to-speech/ws.mjs +64 -0
- package/resources/text-to-speech/ws.mjs.map +1 -0
- package/resources/text-to-speech.d.mts +1 -386
- package/resources/text-to-speech.d.mts.map +1 -1
- package/resources/text-to-speech.d.ts +1 -386
- package/resources/text-to-speech.d.ts.map +1 -1
- package/resources/text-to-speech.js +2 -67
- package/resources/text-to-speech.js.map +1 -1
- package/resources/text-to-speech.mjs +1 -65
- package/resources/text-to-speech.mjs.map +1 -1
- package/resources/virtual-cross-connects.d.mts.map +1 -1
- package/resources/virtual-cross-connects.d.ts.map +1 -1
- package/resources/wireguard-interfaces.d.mts.map +1 -1
- package/resources/wireguard-interfaces.d.ts.map +1 -1
- package/src/client.ts +14 -20
- package/src/core/EventEmitter.ts +98 -0
- package/src/core/pagination.ts +3 -3
- package/src/internal/detect-platform.ts +1 -1
- package/src/resources/ai/assistants/assistants.ts +20 -0
- package/src/resources/ai/assistants/index.ts +8 -0
- package/src/resources/ai/assistants/tags.ts +83 -0
- package/src/resources/ai/audio.ts +0 -3
- package/src/resources/index.ts +2 -2
- package/src/resources/inexplicit-number-orders.ts +1 -2
- package/src/resources/messages/messages.ts +14 -0
- package/src/resources/messages/rcs.ts +7 -0
- package/src/resources/networks/networks.ts +1 -2
- package/src/resources/text-to-speech/index.ts +11 -0
- package/src/resources/text-to-speech/internal-base.ts +93 -0
- package/src/resources/text-to-speech/text-to-speech.ts +518 -0
- package/src/resources/text-to-speech/ws.ts +74 -0
- package/src/resources/text-to-speech.ts +1 -475
- package/src/resources/virtual-cross-connects.ts +1 -2
- package/src/resources/wireguard-interfaces.ts +1 -2
- 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
- package/resources/speech-to-text.d.mts +0 -38
- package/resources/speech-to-text.d.mts.map +0 -1
- package/resources/speech-to-text.d.ts +0 -38
- package/resources/speech-to-text.d.ts.map +0 -1
- package/resources/speech-to-text.js +0 -23
- package/resources/speech-to-text.js.map +0 -1
- package/resources/speech-to-text.mjs +0 -19
- package/resources/speech-to-text.mjs.map +0 -1
- package/src/resources/speech-to-text.ts +0 -66
|
@@ -1,477 +1,3 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
import { APIPromise } from '../core/api-promise';
|
|
5
|
-
import { buildHeaders } from '../internal/headers';
|
|
6
|
-
import { RequestOptions } from '../internal/request-options';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Text to speech streaming command operations
|
|
10
|
-
*/
|
|
11
|
-
export class TextToSpeech extends APIResource {
|
|
12
|
-
/**
|
|
13
|
-
* Generate synthesized speech audio from text input. Returns audio in the
|
|
14
|
-
* requested format (binary audio stream, base64-encoded JSON, or an audio URL for
|
|
15
|
-
* later retrieval).
|
|
16
|
-
*
|
|
17
|
-
* Authentication is provided via the standard `Authorization: Bearer <API_KEY>`
|
|
18
|
-
* header.
|
|
19
|
-
*
|
|
20
|
-
* The `voice` parameter provides a convenient shorthand to specify provider,
|
|
21
|
-
* model, and voice in a single string (e.g. `telnyx.NaturalHD.Alloy`).
|
|
22
|
-
* Alternatively, specify `provider` explicitly along with provider-specific
|
|
23
|
-
* parameters.
|
|
24
|
-
*
|
|
25
|
-
* Supported providers: `aws`, `telnyx`, `azure`, `elevenlabs`, `minimax`, `rime`,
|
|
26
|
-
* `resemble`.
|
|
27
|
-
*/
|
|
28
|
-
generate(
|
|
29
|
-
body: TextToSpeechGenerateParams,
|
|
30
|
-
options?: RequestOptions,
|
|
31
|
-
): APIPromise<TextToSpeechGenerateResponse> {
|
|
32
|
-
return this._client.post('/text-to-speech/speech', { body, ...options });
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Retrieve a list of available voices from one or all TTS providers. When
|
|
37
|
-
* `provider` is specified, returns voices for that provider only. Otherwise,
|
|
38
|
-
* returns voices from all providers.
|
|
39
|
-
*
|
|
40
|
-
* Some providers (ElevenLabs, Resemble) require an API key to list voices.
|
|
41
|
-
*/
|
|
42
|
-
listVoices(
|
|
43
|
-
query: TextToSpeechListVoicesParams | null | undefined = {},
|
|
44
|
-
options?: RequestOptions,
|
|
45
|
-
): APIPromise<TextToSpeechListVoicesResponse> {
|
|
46
|
-
return this._client.get('/text-to-speech/voices', { query, ...options });
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Open a WebSocket connection to stream text and receive synthesized audio in real
|
|
51
|
-
* time. Authentication is provided via the standard
|
|
52
|
-
* `Authorization: Bearer <API_KEY>` header. Send JSON frames with text to
|
|
53
|
-
* synthesize; receive JSON frames containing base64-encoded audio chunks.
|
|
54
|
-
*
|
|
55
|
-
* Supported providers: `aws`, `telnyx`, `azure`, `murfai`, `minimax`, `rime`,
|
|
56
|
-
* `resemble`, `elevenlabs`.
|
|
57
|
-
*
|
|
58
|
-
* **Connection flow:**
|
|
59
|
-
*
|
|
60
|
-
* 1. Open WebSocket with query parameters specifying provider, voice, and model.
|
|
61
|
-
* 2. Send an initial handshake message `{"text": " "}` (single space) with
|
|
62
|
-
* optional `voice_settings` to initialize the session.
|
|
63
|
-
* 3. Send text messages as `{"text": "Hello world"}`.
|
|
64
|
-
* 4. Receive audio chunks as JSON frames with base64-encoded audio.
|
|
65
|
-
* 5. A final frame with `isFinal: true` indicates the end of audio for the current
|
|
66
|
-
* text.
|
|
67
|
-
*
|
|
68
|
-
* To interrupt and restart synthesis mid-stream, send `{"force": true}` — the
|
|
69
|
-
* current worker is stopped and a new one is started.
|
|
70
|
-
*/
|
|
71
|
-
stream(
|
|
72
|
-
query: TextToSpeechStreamParams | null | undefined = {},
|
|
73
|
-
options?: RequestOptions,
|
|
74
|
-
): APIPromise<void> {
|
|
75
|
-
return this._client.get('/text-to-speech/speech', {
|
|
76
|
-
query,
|
|
77
|
-
...options,
|
|
78
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* Response when `output_type` is `base64_output`.
|
|
85
|
-
*/
|
|
86
|
-
export interface TextToSpeechGenerateResponse {
|
|
87
|
-
/**
|
|
88
|
-
* Base64-encoded audio data.
|
|
89
|
-
*/
|
|
90
|
-
base64_audio?: string;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* List of available voices.
|
|
95
|
-
*/
|
|
96
|
-
export interface TextToSpeechListVoicesResponse {
|
|
97
|
-
voices?: Array<TextToSpeechListVoicesResponse.Voice>;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
export namespace TextToSpeechListVoicesResponse {
|
|
101
|
-
/**
|
|
102
|
-
* A voice available for text-to-speech synthesis.
|
|
103
|
-
*/
|
|
104
|
-
export interface Voice {
|
|
105
|
-
/**
|
|
106
|
-
* Voice gender.
|
|
107
|
-
*/
|
|
108
|
-
gender?: string;
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* Language code.
|
|
112
|
-
*/
|
|
113
|
-
language?: string;
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* Voice name.
|
|
117
|
-
*/
|
|
118
|
-
name?: string;
|
|
119
|
-
|
|
120
|
-
/**
|
|
121
|
-
* The TTS provider.
|
|
122
|
-
*/
|
|
123
|
-
provider?: string;
|
|
124
|
-
|
|
125
|
-
/**
|
|
126
|
-
* Voice identifier.
|
|
127
|
-
*/
|
|
128
|
-
voice_id?: string;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
export interface TextToSpeechGenerateParams {
|
|
133
|
-
/**
|
|
134
|
-
* AWS Polly provider-specific parameters.
|
|
135
|
-
*/
|
|
136
|
-
aws?: TextToSpeechGenerateParams.Aws;
|
|
137
|
-
|
|
138
|
-
/**
|
|
139
|
-
* Azure Cognitive Services provider-specific parameters.
|
|
140
|
-
*/
|
|
141
|
-
azure?: TextToSpeechGenerateParams.Azure;
|
|
142
|
-
|
|
143
|
-
/**
|
|
144
|
-
* When `true`, bypass the audio cache and generate fresh audio.
|
|
145
|
-
*/
|
|
146
|
-
disable_cache?: boolean;
|
|
147
|
-
|
|
148
|
-
/**
|
|
149
|
-
* ElevenLabs provider-specific parameters.
|
|
150
|
-
*/
|
|
151
|
-
elevenlabs?: TextToSpeechGenerateParams.Elevenlabs;
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* Language code (e.g. `en-US`). Usage varies by provider.
|
|
155
|
-
*/
|
|
156
|
-
language?: string;
|
|
157
|
-
|
|
158
|
-
/**
|
|
159
|
-
* Minimax provider-specific parameters.
|
|
160
|
-
*/
|
|
161
|
-
minimax?: TextToSpeechGenerateParams.Minimax;
|
|
162
|
-
|
|
163
|
-
/**
|
|
164
|
-
* Determines the response format. `binary_output` returns raw audio bytes,
|
|
165
|
-
* `base64_output` returns base64-encoded audio in JSON.
|
|
166
|
-
*/
|
|
167
|
-
output_type?: 'binary_output' | 'base64_output';
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
* TTS provider. Required unless `voice` is provided.
|
|
171
|
-
*/
|
|
172
|
-
provider?: 'aws' | 'telnyx' | 'azure' | 'elevenlabs' | 'minimax' | 'rime' | 'resemble';
|
|
173
|
-
|
|
174
|
-
/**
|
|
175
|
-
* Resemble AI provider-specific parameters.
|
|
176
|
-
*/
|
|
177
|
-
resemble?: TextToSpeechGenerateParams.Resemble;
|
|
178
|
-
|
|
179
|
-
/**
|
|
180
|
-
* Rime provider-specific parameters.
|
|
181
|
-
*/
|
|
182
|
-
rime?: TextToSpeechGenerateParams.Rime;
|
|
183
|
-
|
|
184
|
-
/**
|
|
185
|
-
* Telnyx provider-specific parameters.
|
|
186
|
-
*/
|
|
187
|
-
telnyx?: TextToSpeechGenerateParams.Telnyx;
|
|
188
|
-
|
|
189
|
-
/**
|
|
190
|
-
* The text to convert to speech.
|
|
191
|
-
*/
|
|
192
|
-
text?: string;
|
|
193
|
-
|
|
194
|
-
/**
|
|
195
|
-
* Text type. Use `ssml` for SSML-formatted input (supported by AWS and Azure).
|
|
196
|
-
*/
|
|
197
|
-
text_type?: 'text' | 'ssml';
|
|
198
|
-
|
|
199
|
-
/**
|
|
200
|
-
* Voice identifier in the format `provider.model_id.voice_id` or
|
|
201
|
-
* `provider.voice_id`. Examples: `telnyx.NaturalHD.Alloy`,
|
|
202
|
-
* `azure.en-US-AvaMultilingualNeural`, `aws.Polly.Generative.Lucia`. When
|
|
203
|
-
* provided, `provider`, `model_id`, and `voice_id` are extracted automatically and
|
|
204
|
-
* take precedence over individual parameters.
|
|
205
|
-
*/
|
|
206
|
-
voice?: string;
|
|
207
|
-
|
|
208
|
-
/**
|
|
209
|
-
* Provider-specific voice settings. Contents vary by provider — see
|
|
210
|
-
* provider-specific parameter objects below.
|
|
211
|
-
*/
|
|
212
|
-
voice_settings?: { [key: string]: unknown };
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
export namespace TextToSpeechGenerateParams {
|
|
216
|
-
/**
|
|
217
|
-
* AWS Polly provider-specific parameters.
|
|
218
|
-
*/
|
|
219
|
-
export interface Aws {
|
|
220
|
-
/**
|
|
221
|
-
* Language code (e.g. `en-US`, `es-ES`).
|
|
222
|
-
*/
|
|
223
|
-
language_code?: string;
|
|
224
|
-
|
|
225
|
-
/**
|
|
226
|
-
* List of lexicon names to apply.
|
|
227
|
-
*/
|
|
228
|
-
lexicon_names?: Array<string>;
|
|
229
|
-
|
|
230
|
-
/**
|
|
231
|
-
* Audio output format.
|
|
232
|
-
*/
|
|
233
|
-
output_format?: string;
|
|
234
|
-
|
|
235
|
-
/**
|
|
236
|
-
* Audio sample rate.
|
|
237
|
-
*/
|
|
238
|
-
sample_rate?: string;
|
|
239
|
-
|
|
240
|
-
/**
|
|
241
|
-
* Input text type.
|
|
242
|
-
*/
|
|
243
|
-
text_type?: 'text' | 'ssml';
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
/**
|
|
247
|
-
* Azure Cognitive Services provider-specific parameters.
|
|
248
|
-
*/
|
|
249
|
-
export interface Azure {
|
|
250
|
-
/**
|
|
251
|
-
* Custom Azure API key. If not provided, the default Telnyx key is used.
|
|
252
|
-
*/
|
|
253
|
-
api_key?: string;
|
|
254
|
-
|
|
255
|
-
/**
|
|
256
|
-
* Custom Azure deployment ID.
|
|
257
|
-
*/
|
|
258
|
-
deployment_id?: string;
|
|
259
|
-
|
|
260
|
-
/**
|
|
261
|
-
* Azure audio effect to apply.
|
|
262
|
-
*/
|
|
263
|
-
effect?: string;
|
|
264
|
-
|
|
265
|
-
/**
|
|
266
|
-
* Voice gender preference.
|
|
267
|
-
*/
|
|
268
|
-
gender?: string;
|
|
269
|
-
|
|
270
|
-
/**
|
|
271
|
-
* Language code (e.g. `en-US`).
|
|
272
|
-
*/
|
|
273
|
-
language_code?: string;
|
|
274
|
-
|
|
275
|
-
/**
|
|
276
|
-
* Azure audio output format.
|
|
277
|
-
*/
|
|
278
|
-
output_format?: string;
|
|
279
|
-
|
|
280
|
-
/**
|
|
281
|
-
* Azure region (e.g. `eastus`, `westeurope`).
|
|
282
|
-
*/
|
|
283
|
-
region?: string;
|
|
284
|
-
|
|
285
|
-
/**
|
|
286
|
-
* Input text type. Use `ssml` for SSML-formatted input.
|
|
287
|
-
*/
|
|
288
|
-
text_type?: 'text' | 'ssml';
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
/**
|
|
292
|
-
* ElevenLabs provider-specific parameters.
|
|
293
|
-
*/
|
|
294
|
-
export interface Elevenlabs {
|
|
295
|
-
/**
|
|
296
|
-
* Custom ElevenLabs API key. If not provided, the default Telnyx key is used.
|
|
297
|
-
*/
|
|
298
|
-
api_key?: string;
|
|
299
|
-
|
|
300
|
-
/**
|
|
301
|
-
* Language code.
|
|
302
|
-
*/
|
|
303
|
-
language_code?: string;
|
|
304
|
-
|
|
305
|
-
/**
|
|
306
|
-
* ElevenLabs voice settings (stability, similarity_boost, etc.).
|
|
307
|
-
*/
|
|
308
|
-
voice_settings?: { [key: string]: unknown };
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
/**
|
|
312
|
-
* Minimax provider-specific parameters.
|
|
313
|
-
*/
|
|
314
|
-
export interface Minimax {
|
|
315
|
-
/**
|
|
316
|
-
* Language code to boost pronunciation for.
|
|
317
|
-
*/
|
|
318
|
-
language_boost?: string;
|
|
319
|
-
|
|
320
|
-
/**
|
|
321
|
-
* Pitch adjustment.
|
|
322
|
-
*/
|
|
323
|
-
pitch?: number;
|
|
324
|
-
|
|
325
|
-
/**
|
|
326
|
-
* Audio output format.
|
|
327
|
-
*/
|
|
328
|
-
response_format?: string;
|
|
329
|
-
|
|
330
|
-
/**
|
|
331
|
-
* Speech speed multiplier.
|
|
332
|
-
*/
|
|
333
|
-
speed?: number;
|
|
334
|
-
|
|
335
|
-
/**
|
|
336
|
-
* Volume level.
|
|
337
|
-
*/
|
|
338
|
-
vol?: number;
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
/**
|
|
342
|
-
* Resemble AI provider-specific parameters.
|
|
343
|
-
*/
|
|
344
|
-
export interface Resemble {
|
|
345
|
-
/**
|
|
346
|
-
* Custom Resemble API key.
|
|
347
|
-
*/
|
|
348
|
-
api_key?: string;
|
|
349
|
-
|
|
350
|
-
/**
|
|
351
|
-
* Audio output format.
|
|
352
|
-
*/
|
|
353
|
-
format?: string;
|
|
354
|
-
|
|
355
|
-
/**
|
|
356
|
-
* Synthesis precision.
|
|
357
|
-
*/
|
|
358
|
-
precision?: string;
|
|
359
|
-
|
|
360
|
-
/**
|
|
361
|
-
* Audio sample rate.
|
|
362
|
-
*/
|
|
363
|
-
sample_rate?: string;
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
/**
|
|
367
|
-
* Rime provider-specific parameters.
|
|
368
|
-
*/
|
|
369
|
-
export interface Rime {
|
|
370
|
-
/**
|
|
371
|
-
* Audio output format.
|
|
372
|
-
*/
|
|
373
|
-
response_format?: string;
|
|
374
|
-
|
|
375
|
-
/**
|
|
376
|
-
* Audio sampling rate in Hz.
|
|
377
|
-
*/
|
|
378
|
-
sampling_rate?: number;
|
|
379
|
-
|
|
380
|
-
/**
|
|
381
|
-
* Voice speed multiplier.
|
|
382
|
-
*/
|
|
383
|
-
voice_speed?: number;
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
/**
|
|
387
|
-
* Telnyx provider-specific parameters.
|
|
388
|
-
*/
|
|
389
|
-
export interface Telnyx {
|
|
390
|
-
/**
|
|
391
|
-
* Audio response format.
|
|
392
|
-
*/
|
|
393
|
-
response_format?: string;
|
|
394
|
-
|
|
395
|
-
/**
|
|
396
|
-
* Audio sampling rate in Hz.
|
|
397
|
-
*/
|
|
398
|
-
sampling_rate?: number;
|
|
399
|
-
|
|
400
|
-
/**
|
|
401
|
-
* Sampling temperature.
|
|
402
|
-
*/
|
|
403
|
-
temperature?: number;
|
|
404
|
-
|
|
405
|
-
/**
|
|
406
|
-
* Voice speed multiplier.
|
|
407
|
-
*/
|
|
408
|
-
voice_speed?: number;
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
export interface TextToSpeechListVoicesParams {
|
|
413
|
-
/**
|
|
414
|
-
* API key for providers that require one to list voices (e.g. ElevenLabs).
|
|
415
|
-
*/
|
|
416
|
-
api_key?: string;
|
|
417
|
-
|
|
418
|
-
/**
|
|
419
|
-
* Filter voices by provider. If omitted, voices from all providers are returned.
|
|
420
|
-
*/
|
|
421
|
-
provider?: 'aws' | 'telnyx' | 'azure' | 'elevenlabs' | 'minimax' | 'rime' | 'resemble';
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
export interface TextToSpeechStreamParams {
|
|
425
|
-
/**
|
|
426
|
-
* Audio output format override. Supported for Telnyx `Natural`/`NaturalHD` models
|
|
427
|
-
* only. Accepted values: `pcm`, `wav`.
|
|
428
|
-
*/
|
|
429
|
-
audio_format?: 'pcm' | 'wav';
|
|
430
|
-
|
|
431
|
-
/**
|
|
432
|
-
* When `true`, bypass the audio cache and generate fresh audio.
|
|
433
|
-
*/
|
|
434
|
-
disable_cache?: boolean;
|
|
435
|
-
|
|
436
|
-
/**
|
|
437
|
-
* Model identifier for the chosen provider. Examples: `Natural`, `NaturalHD`
|
|
438
|
-
* (Telnyx); `Polly.Generative` (AWS).
|
|
439
|
-
*/
|
|
440
|
-
model_id?: string;
|
|
441
|
-
|
|
442
|
-
/**
|
|
443
|
-
* TTS provider. Defaults to `telnyx` if not specified. Ignored when `voice` is
|
|
444
|
-
* provided.
|
|
445
|
-
*/
|
|
446
|
-
provider?: 'aws' | 'telnyx' | 'azure' | 'elevenlabs' | 'minimax' | 'murfai' | 'rime' | 'resemble';
|
|
447
|
-
|
|
448
|
-
/**
|
|
449
|
-
* Client-provided socket identifier for tracking. If not provided, one is
|
|
450
|
-
* generated server-side.
|
|
451
|
-
*/
|
|
452
|
-
socket_id?: string;
|
|
453
|
-
|
|
454
|
-
/**
|
|
455
|
-
* Voice identifier in the format `provider.model_id.voice_id` or
|
|
456
|
-
* `provider.voice_id` (e.g. `telnyx.NaturalHD.Telnyx_Alloy` or
|
|
457
|
-
* `azure.en-US-AvaMultilingualNeural`). When provided, the `provider`, `model_id`,
|
|
458
|
-
* and `voice_id` are extracted automatically. Takes precedence over individual
|
|
459
|
-
* `provider`/`model_id`/`voice_id` parameters.
|
|
460
|
-
*/
|
|
461
|
-
voice?: string;
|
|
462
|
-
|
|
463
|
-
/**
|
|
464
|
-
* Voice identifier for the chosen provider.
|
|
465
|
-
*/
|
|
466
|
-
voice_id?: string;
|
|
467
|
-
}
|
|
468
|
-
|
|
469
|
-
export declare namespace TextToSpeech {
|
|
470
|
-
export {
|
|
471
|
-
type TextToSpeechGenerateResponse as TextToSpeechGenerateResponse,
|
|
472
|
-
type TextToSpeechListVoicesResponse as TextToSpeechListVoicesResponse,
|
|
473
|
-
type TextToSpeechGenerateParams as TextToSpeechGenerateParams,
|
|
474
|
-
type TextToSpeechListVoicesParams as TextToSpeechListVoicesParams,
|
|
475
|
-
type TextToSpeechStreamParams as TextToSpeechStreamParams,
|
|
476
|
-
};
|
|
477
|
-
}
|
|
3
|
+
export * from './text-to-speech/index';
|
|
@@ -522,8 +522,7 @@ export namespace VirtualCrossConnectUpdateResponse {
|
|
|
522
522
|
}
|
|
523
523
|
|
|
524
524
|
export interface VirtualCrossConnectListResponse
|
|
525
|
-
extends GlobalIPAssignmentsAPI.Record,
|
|
526
|
-
PublicInternetGatewaysAPI.NetworkInterface {
|
|
525
|
+
extends GlobalIPAssignmentsAPI.Record, PublicInternetGatewaysAPI.NetworkInterface {
|
|
527
526
|
/**
|
|
528
527
|
* The region interface is deployed to.
|
|
529
528
|
*/
|
|
@@ -186,8 +186,7 @@ export namespace WireguardInterfaceRetrieveResponse {
|
|
|
186
186
|
}
|
|
187
187
|
|
|
188
188
|
export interface WireguardInterfaceListResponse
|
|
189
|
-
extends GlobalIPAssignmentsAPI.Record,
|
|
190
|
-
PublicInternetGatewaysAPI.NetworkInterface {
|
|
189
|
+
extends GlobalIPAssignmentsAPI.Record, PublicInternetGatewaysAPI.NetworkInterface {
|
|
191
190
|
/**
|
|
192
191
|
* Enable SIP traffic forwarding over VPN interface.
|
|
193
192
|
*/
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '6.
|
|
1
|
+
export const VERSION = '6.4.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "6.
|
|
1
|
+
export declare const VERSION = "6.4.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "6.
|
|
1
|
+
export declare const VERSION = "6.4.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '6.
|
|
1
|
+
export const VERSION = '6.4.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { APIResource } from "../core/resource.mjs";
|
|
2
|
-
import { APIPromise } from "../core/api-promise.mjs";
|
|
3
|
-
import { RequestOptions } from "../internal/request-options.mjs";
|
|
4
|
-
/**
|
|
5
|
-
* Speech to text command operations
|
|
6
|
-
*/
|
|
7
|
-
export declare class SpeechToText extends APIResource {
|
|
8
|
-
/**
|
|
9
|
-
* Transcribe audio streams to text over WebSocket.
|
|
10
|
-
*/
|
|
11
|
-
transcribe(query: SpeechToTextTranscribeParams, options?: RequestOptions): APIPromise<void>;
|
|
12
|
-
}
|
|
13
|
-
export interface SpeechToTextTranscribeParams {
|
|
14
|
-
/**
|
|
15
|
-
* The format of input audio stream.
|
|
16
|
-
*/
|
|
17
|
-
input_format: 'mp3' | 'wav';
|
|
18
|
-
/**
|
|
19
|
-
* The transcription engine to use for processing the audio stream.
|
|
20
|
-
*/
|
|
21
|
-
transcription_engine: 'Azure' | 'Deepgram' | 'Google' | 'Telnyx';
|
|
22
|
-
/**
|
|
23
|
-
* Whether to receive interim transcription results.
|
|
24
|
-
*/
|
|
25
|
-
interim_results?: boolean;
|
|
26
|
-
/**
|
|
27
|
-
* The language spoken in the audio stream.
|
|
28
|
-
*/
|
|
29
|
-
language?: string;
|
|
30
|
-
/**
|
|
31
|
-
* The specific model to use within the selected transcription engine.
|
|
32
|
-
*/
|
|
33
|
-
model?: 'fast' | 'deepgram/nova-2' | 'deepgram/nova-3' | 'latest_long' | 'latest_short' | 'command_and_search' | 'phone_call' | 'video' | 'default' | 'medical_conversation' | 'medical_dictation' | 'openai/whisper-tiny' | 'openai/whisper-large-v3-turbo';
|
|
34
|
-
}
|
|
35
|
-
export declare namespace SpeechToText {
|
|
36
|
-
export { type SpeechToTextTranscribeParams as SpeechToTextTranscribeParams };
|
|
37
|
-
}
|
|
38
|
-
//# sourceMappingURL=speech-to-text.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"speech-to-text.d.mts","sourceRoot":"","sources":["../src/resources/speech-to-text.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAEzB;;GAEG;AACH,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;OAEG;IACH,UAAU,CAAC,KAAK,EAAE,4BAA4B,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;CAO5F;AAED,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,YAAY,EAAE,KAAK,GAAG,KAAK,CAAC;IAE5B;;OAEG;IACH,oBAAoB,EAAE,OAAO,GAAG,UAAU,GAAG,QAAQ,GAAG,QAAQ,CAAC;IAEjE;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,KAAK,CAAC,EACF,MAAM,GACN,iBAAiB,GACjB,iBAAiB,GACjB,aAAa,GACb,cAAc,GACd,oBAAoB,GACpB,YAAY,GACZ,OAAO,GACP,SAAS,GACT,sBAAsB,GACtB,mBAAmB,GACnB,qBAAqB,GACrB,+BAA+B,CAAC;CACrC;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EAAE,KAAK,4BAA4B,IAAI,4BAA4B,EAAE,CAAC;CAC9E"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { APIResource } from "../core/resource.js";
|
|
2
|
-
import { APIPromise } from "../core/api-promise.js";
|
|
3
|
-
import { RequestOptions } from "../internal/request-options.js";
|
|
4
|
-
/**
|
|
5
|
-
* Speech to text command operations
|
|
6
|
-
*/
|
|
7
|
-
export declare class SpeechToText extends APIResource {
|
|
8
|
-
/**
|
|
9
|
-
* Transcribe audio streams to text over WebSocket.
|
|
10
|
-
*/
|
|
11
|
-
transcribe(query: SpeechToTextTranscribeParams, options?: RequestOptions): APIPromise<void>;
|
|
12
|
-
}
|
|
13
|
-
export interface SpeechToTextTranscribeParams {
|
|
14
|
-
/**
|
|
15
|
-
* The format of input audio stream.
|
|
16
|
-
*/
|
|
17
|
-
input_format: 'mp3' | 'wav';
|
|
18
|
-
/**
|
|
19
|
-
* The transcription engine to use for processing the audio stream.
|
|
20
|
-
*/
|
|
21
|
-
transcription_engine: 'Azure' | 'Deepgram' | 'Google' | 'Telnyx';
|
|
22
|
-
/**
|
|
23
|
-
* Whether to receive interim transcription results.
|
|
24
|
-
*/
|
|
25
|
-
interim_results?: boolean;
|
|
26
|
-
/**
|
|
27
|
-
* The language spoken in the audio stream.
|
|
28
|
-
*/
|
|
29
|
-
language?: string;
|
|
30
|
-
/**
|
|
31
|
-
* The specific model to use within the selected transcription engine.
|
|
32
|
-
*/
|
|
33
|
-
model?: 'fast' | 'deepgram/nova-2' | 'deepgram/nova-3' | 'latest_long' | 'latest_short' | 'command_and_search' | 'phone_call' | 'video' | 'default' | 'medical_conversation' | 'medical_dictation' | 'openai/whisper-tiny' | 'openai/whisper-large-v3-turbo';
|
|
34
|
-
}
|
|
35
|
-
export declare namespace SpeechToText {
|
|
36
|
-
export { type SpeechToTextTranscribeParams as SpeechToTextTranscribeParams };
|
|
37
|
-
}
|
|
38
|
-
//# sourceMappingURL=speech-to-text.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"speech-to-text.d.ts","sourceRoot":"","sources":["../src/resources/speech-to-text.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAEzB;;GAEG;AACH,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;OAEG;IACH,UAAU,CAAC,KAAK,EAAE,4BAA4B,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;CAO5F;AAED,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,YAAY,EAAE,KAAK,GAAG,KAAK,CAAC;IAE5B;;OAEG;IACH,oBAAoB,EAAE,OAAO,GAAG,UAAU,GAAG,QAAQ,GAAG,QAAQ,CAAC;IAEjE;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,KAAK,CAAC,EACF,MAAM,GACN,iBAAiB,GACjB,iBAAiB,GACjB,aAAa,GACb,cAAc,GACd,oBAAoB,GACpB,YAAY,GACZ,OAAO,GACP,SAAS,GACT,sBAAsB,GACtB,mBAAmB,GACnB,qBAAqB,GACrB,+BAA+B,CAAC;CACrC;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EAAE,KAAK,4BAA4B,IAAI,4BAA4B,EAAE,CAAC;CAC9E"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.SpeechToText = void 0;
|
|
5
|
-
const resource_1 = require("../core/resource.js");
|
|
6
|
-
const headers_1 = require("../internal/headers.js");
|
|
7
|
-
/**
|
|
8
|
-
* Speech to text command operations
|
|
9
|
-
*/
|
|
10
|
-
class SpeechToText extends resource_1.APIResource {
|
|
11
|
-
/**
|
|
12
|
-
* Transcribe audio streams to text over WebSocket.
|
|
13
|
-
*/
|
|
14
|
-
transcribe(query, options) {
|
|
15
|
-
return this._client.get('/speech-to-text/transcription', {
|
|
16
|
-
query,
|
|
17
|
-
...options,
|
|
18
|
-
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
exports.SpeechToText = SpeechToText;
|
|
23
|
-
//# sourceMappingURL=speech-to-text.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"speech-to-text.js","sourceRoot":"","sources":["../src/resources/speech-to-text.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,oDAAmD;AAGnD;;GAEG;AACH,MAAa,YAAa,SAAQ,sBAAW;IAC3C;;OAEG;IACH,UAAU,CAAC,KAAmC,EAAE,OAAwB;QACtE,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,+BAA+B,EAAE;YACvD,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;CACF;AAXD,oCAWC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
import { APIResource } from "../core/resource.mjs";
|
|
3
|
-
import { buildHeaders } from "../internal/headers.mjs";
|
|
4
|
-
/**
|
|
5
|
-
* Speech to text command operations
|
|
6
|
-
*/
|
|
7
|
-
export class SpeechToText extends APIResource {
|
|
8
|
-
/**
|
|
9
|
-
* Transcribe audio streams to text over WebSocket.
|
|
10
|
-
*/
|
|
11
|
-
transcribe(query, options) {
|
|
12
|
-
return this._client.get('/speech-to-text/transcription', {
|
|
13
|
-
query,
|
|
14
|
-
...options,
|
|
15
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=speech-to-text.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"speech-to-text.mjs","sourceRoot":"","sources":["../src/resources/speech-to-text.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,YAAY,EAAE;AAGvB;;GAEG;AACH,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C;;OAEG;IACH,UAAU,CAAC,KAAmC,EAAE,OAAwB;QACtE,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,+BAA+B,EAAE;YACvD,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;CACF"}
|