syllable-sdk 1.0.8-rc.1 → 1.0.8-rc.2

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 (66) hide show
  1. package/bin/mcp-server.js +6 -6
  2. package/bin/mcp-server.js.map +4 -4
  3. package/examples/package-lock.json +1 -1
  4. package/jsr.json +1 -1
  5. package/lib/config.d.ts +3 -3
  6. package/lib/config.js +3 -3
  7. package/mcp-server/mcp-server.js +1 -1
  8. package/mcp-server/server.js +1 -1
  9. package/openapi.json +33 -33
  10. package/package.json +1 -1
  11. package/src/lib/config.ts +3 -3
  12. package/src/mcp-server/mcp-server.ts +1 -1
  13. package/src/mcp-server/server.ts +1 -1
  14. package/.devcontainer/README.md +0 -35
  15. package/api-reference/sdks/agents/README.md +0 -224
  16. package/api-reference/sdks/availabletargets/README.md +0 -49
  17. package/api-reference/sdks/channels/README.md +0 -92
  18. package/api-reference/sdks/chats/README.md +0 -55
  19. package/api-reference/sdks/conversations/README.md +0 -91
  20. package/api-reference/sdks/dashboards/README.md +0 -321
  21. package/api-reference/sdks/events/README.md +0 -50
  22. package/api-reference/sdks/greetings/README.md +0 -223
  23. package/api-reference/sdks/organizations/README.md +0 -48
  24. package/api-reference/sdks/prompts/README.md +0 -225
  25. package/api-reference/sdks/sessions/README.md +0 -50
  26. package/api-reference/sdks/syllable/README.md +0 -22
  27. package/api-reference/sdks/targets/README.md +0 -194
  28. package/api-reference/sdks/tools/README.md +0 -92
  29. package/docs/sdks/agents/README.md +0 -589
  30. package/docs/sdks/batches/README.md +0 -742
  31. package/docs/sdks/campaigns/README.md +0 -526
  32. package/docs/sdks/channels/README.md +0 -401
  33. package/docs/sdks/conversations/README.md +0 -100
  34. package/docs/sdks/custommessages/README.md +0 -496
  35. package/docs/sdks/dashboards/README.md +0 -481
  36. package/docs/sdks/datasources/README.md +0 -458
  37. package/docs/sdks/directory/README.md +0 -727
  38. package/docs/sdks/events/README.md +0 -100
  39. package/docs/sdks/folders/README.md +0 -675
  40. package/docs/sdks/fullsummary/README.md +0 -82
  41. package/docs/sdks/incidents/README.md +0 -501
  42. package/docs/sdks/insights/README.md +0 -100
  43. package/docs/sdks/languagegroups/README.md +0 -565
  44. package/docs/sdks/latency/README.md +0 -82
  45. package/docs/sdks/numbers/README.md +0 -250
  46. package/docs/sdks/organizations/README.md +0 -317
  47. package/docs/sdks/permissions/README.md +0 -78
  48. package/docs/sdks/prompts/README.md +0 -592
  49. package/docs/sdks/pronunciations/README.md +0 -360
  50. package/docs/sdks/roles/README.md +0 -430
  51. package/docs/sdks/services/README.md +0 -430
  52. package/docs/sdks/sessiondebug/README.md +0 -236
  53. package/docs/sdks/sessionlabels/README.md +0 -262
  54. package/docs/sdks/sessions/README.md +0 -325
  55. package/docs/sdks/syllablesdktools/README.md +0 -578
  56. package/docs/sdks/takeouts/README.md +0 -228
  57. package/docs/sdks/targets/README.md +0 -454
  58. package/docs/sdks/test/README.md +0 -92
  59. package/docs/sdks/tools/README.md +0 -518
  60. package/docs/sdks/transcript/README.md +0 -82
  61. package/docs/sdks/twilio/README.md +0 -246
  62. package/docs/sdks/users/README.md +0 -561
  63. package/docs/sdks/v1/README.md +0 -561
  64. package/docs/sdks/voicegroups/README.md +0 -551
  65. package/docs/sdks/workflows/README.md +0 -781
  66. package/examples/README.md +0 -31
@@ -1,551 +0,0 @@
1
- # VoiceGroups
2
- (*voiceGroups*)
3
-
4
- ## Overview
5
-
6
- ### Available Operations
7
-
8
- * [list](#list) - List Voice Groups
9
- * [create](#create) - Create Voice Group
10
- * [update](#update) - Update Voice Group
11
- * [getById](#getbyid) - Get Voice Group
12
- * [delete](#delete) - Delete Voice Group
13
- * [voiceGroupsCreateVoiceSample](#voicegroupscreatevoicesample) - Create Voice Sample
14
-
15
- ## list
16
-
17
- Fetch voice groups.
18
-
19
- ### Example Usage
20
-
21
- <!-- UsageSnippet language="typescript" operationID="voice_groups_list" method="get" path="/api/v1/voice_groups/" -->
22
- ```typescript
23
- import { SyllableSDK } from "syllable-sdk";
24
-
25
- const syllableSDK = new SyllableSDK({
26
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
27
- });
28
-
29
- async function run() {
30
- const result = await syllableSDK.voiceGroups.list({
31
- page: 0,
32
- searchFields: [
33
- "name",
34
- ],
35
- searchFieldValues: [
36
- "Some Object Name",
37
- ],
38
- startDatetime: "2023-01-01T00:00:00Z",
39
- endDatetime: "2024-01-01T00:00:00Z",
40
- });
41
-
42
- console.log(result);
43
- }
44
-
45
- run();
46
- ```
47
-
48
- ### Standalone function
49
-
50
- The standalone function version of this method:
51
-
52
- ```typescript
53
- import { SyllableSDKCore } from "syllable-sdk/core.js";
54
- import { voiceGroupsList } from "syllable-sdk/funcs/voiceGroupsList.js";
55
-
56
- // Use `SyllableSDKCore` for best tree-shaking performance.
57
- // You can create one instance of it to use across an application.
58
- const syllableSDK = new SyllableSDKCore({
59
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
60
- });
61
-
62
- async function run() {
63
- const res = await voiceGroupsList(syllableSDK, {
64
- page: 0,
65
- searchFields: [
66
- "name",
67
- ],
68
- searchFieldValues: [
69
- "Some Object Name",
70
- ],
71
- startDatetime: "2023-01-01T00:00:00Z",
72
- endDatetime: "2024-01-01T00:00:00Z",
73
- });
74
- if (res.ok) {
75
- const { value: result } = res;
76
- console.log(result);
77
- } else {
78
- console.log("voiceGroupsList failed:", res.error);
79
- }
80
- }
81
-
82
- run();
83
- ```
84
-
85
- ### Parameters
86
-
87
- | Parameter | Type | Required | Description |
88
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
89
- | `request` | [operations.VoiceGroupsListRequest](../../models/operations/voicegroupslistrequest.md) | :heavy_check_mark: | The request object to use for the request. |
90
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
91
- | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
92
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
93
-
94
- ### Response
95
-
96
- **Promise\<[components.ListResponseVoiceGroupResponse](../../models/components/listresponsevoicegroupresponse.md)\>**
97
-
98
- ### Errors
99
-
100
- | Error Type | Status Code | Content Type |
101
- | -------------------------- | -------------------------- | -------------------------- |
102
- | errors.HTTPValidationError | 422 | application/json |
103
- | errors.SDKError | 4XX, 5XX | \*/\* |
104
-
105
- ## create
106
-
107
- Create a new voice group.
108
-
109
- ### Example Usage
110
-
111
- <!-- UsageSnippet language="typescript" operationID="voice_groups_create" method="post" path="/api/v1/voice_groups/" -->
112
- ```typescript
113
- import { SyllableSDK } from "syllable-sdk";
114
-
115
- const syllableSDK = new SyllableSDK({
116
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
117
- });
118
-
119
- async function run() {
120
- const result = await syllableSDK.voiceGroups.create({
121
- name: "Call Center 1 Languages",
122
- description: "Languages spoken by operators at Call Center 1",
123
- languageConfigs: [
124
- {
125
- languageCode: "en-US",
126
- voiceProvider: "OpenAI",
127
- voiceDisplayName: "Alloy",
128
- dtmfCode: 1,
129
- },
130
- {
131
- languageCode: "es-US",
132
- voiceProvider: "Google",
133
- voiceDisplayName: "es-US-Neural2-B",
134
- dtmfCode: 2,
135
- },
136
- ],
137
- skipCurrentLanguageInMessage: true,
138
- });
139
-
140
- console.log(result);
141
- }
142
-
143
- run();
144
- ```
145
-
146
- ### Standalone function
147
-
148
- The standalone function version of this method:
149
-
150
- ```typescript
151
- import { SyllableSDKCore } from "syllable-sdk/core.js";
152
- import { voiceGroupsCreate } from "syllable-sdk/funcs/voiceGroupsCreate.js";
153
-
154
- // Use `SyllableSDKCore` for best tree-shaking performance.
155
- // You can create one instance of it to use across an application.
156
- const syllableSDK = new SyllableSDKCore({
157
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
158
- });
159
-
160
- async function run() {
161
- const res = await voiceGroupsCreate(syllableSDK, {
162
- name: "Call Center 1 Languages",
163
- description: "Languages spoken by operators at Call Center 1",
164
- languageConfigs: [
165
- {
166
- languageCode: "en-US",
167
- voiceProvider: "OpenAI",
168
- voiceDisplayName: "Alloy",
169
- dtmfCode: 1,
170
- },
171
- {
172
- languageCode: "es-US",
173
- voiceProvider: "Google",
174
- voiceDisplayName: "es-US-Neural2-B",
175
- dtmfCode: 2,
176
- },
177
- ],
178
- skipCurrentLanguageInMessage: true,
179
- });
180
- if (res.ok) {
181
- const { value: result } = res;
182
- console.log(result);
183
- } else {
184
- console.log("voiceGroupsCreate failed:", res.error);
185
- }
186
- }
187
-
188
- run();
189
- ```
190
-
191
- ### Parameters
192
-
193
- | Parameter | Type | Required | Description |
194
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
195
- | `request` | [components.VoiceGroupCreateRequest](../../models/components/voicegroupcreaterequest.md) | :heavy_check_mark: | The request object to use for the request. |
196
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
197
- | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
198
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
199
-
200
- ### Response
201
-
202
- **Promise\<[components.VoiceGroupResponse](../../models/components/voicegroupresponse.md)\>**
203
-
204
- ### Errors
205
-
206
- | Error Type | Status Code | Content Type |
207
- | -------------------------- | -------------------------- | -------------------------- |
208
- | errors.HTTPValidationError | 422 | application/json |
209
- | errors.SDKError | 4XX, 5XX | \*/\* |
210
-
211
- ## update
212
-
213
- Update an existing voice group
214
-
215
- ### Example Usage
216
-
217
- <!-- UsageSnippet language="typescript" operationID="voice_groups_update" method="put" path="/api/v1/voice_groups/" -->
218
- ```typescript
219
- import { SyllableSDK } from "syllable-sdk";
220
-
221
- const syllableSDK = new SyllableSDK({
222
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
223
- });
224
-
225
- async function run() {
226
- const result = await syllableSDK.voiceGroups.update({
227
- name: "Call Center 1 Languages",
228
- description: "Languages spoken by operators at Call Center 1",
229
- languageConfigs: [
230
- {
231
- languageCode: "en-US",
232
- voiceProvider: "OpenAI",
233
- voiceDisplayName: "Alloy",
234
- dtmfCode: 1,
235
- },
236
- {
237
- languageCode: "es-US",
238
- voiceProvider: "Google",
239
- voiceDisplayName: "es-US-Neural2-B",
240
- dtmfCode: 2,
241
- },
242
- ],
243
- skipCurrentLanguageInMessage: true,
244
- id: 1,
245
- editComments: "Added Spanish support.",
246
- });
247
-
248
- console.log(result);
249
- }
250
-
251
- run();
252
- ```
253
-
254
- ### Standalone function
255
-
256
- The standalone function version of this method:
257
-
258
- ```typescript
259
- import { SyllableSDKCore } from "syllable-sdk/core.js";
260
- import { voiceGroupsUpdate } from "syllable-sdk/funcs/voiceGroupsUpdate.js";
261
-
262
- // Use `SyllableSDKCore` for best tree-shaking performance.
263
- // You can create one instance of it to use across an application.
264
- const syllableSDK = new SyllableSDKCore({
265
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
266
- });
267
-
268
- async function run() {
269
- const res = await voiceGroupsUpdate(syllableSDK, {
270
- name: "Call Center 1 Languages",
271
- description: "Languages spoken by operators at Call Center 1",
272
- languageConfigs: [
273
- {
274
- languageCode: "en-US",
275
- voiceProvider: "OpenAI",
276
- voiceDisplayName: "Alloy",
277
- dtmfCode: 1,
278
- },
279
- {
280
- languageCode: "es-US",
281
- voiceProvider: "Google",
282
- voiceDisplayName: "es-US-Neural2-B",
283
- dtmfCode: 2,
284
- },
285
- ],
286
- skipCurrentLanguageInMessage: true,
287
- id: 1,
288
- editComments: "Added Spanish support.",
289
- });
290
- if (res.ok) {
291
- const { value: result } = res;
292
- console.log(result);
293
- } else {
294
- console.log("voiceGroupsUpdate failed:", res.error);
295
- }
296
- }
297
-
298
- run();
299
- ```
300
-
301
- ### Parameters
302
-
303
- | Parameter | Type | Required | Description |
304
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
305
- | `request` | [components.VoiceGroupUpdateRequest](../../models/components/voicegroupupdaterequest.md) | :heavy_check_mark: | The request object to use for the request. |
306
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
307
- | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
308
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
309
-
310
- ### Response
311
-
312
- **Promise\<[components.VoiceGroupResponse](../../models/components/voicegroupresponse.md)\>**
313
-
314
- ### Errors
315
-
316
- | Error Type | Status Code | Content Type |
317
- | -------------------------- | -------------------------- | -------------------------- |
318
- | errors.HTTPValidationError | 422 | application/json |
319
- | errors.SDKError | 4XX, 5XX | \*/\* |
320
-
321
- ## getById
322
-
323
- Fetch a given voice group.
324
-
325
- ### Example Usage
326
-
327
- <!-- UsageSnippet language="typescript" operationID="voice_groups_get_by_id" method="get" path="/api/v1/voice_groups/{voice_group_id}" -->
328
- ```typescript
329
- import { SyllableSDK } from "syllable-sdk";
330
-
331
- const syllableSDK = new SyllableSDK({
332
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
333
- });
334
-
335
- async function run() {
336
- const result = await syllableSDK.voiceGroups.getById({
337
- voiceGroupId: 431245,
338
- });
339
-
340
- console.log(result);
341
- }
342
-
343
- run();
344
- ```
345
-
346
- ### Standalone function
347
-
348
- The standalone function version of this method:
349
-
350
- ```typescript
351
- import { SyllableSDKCore } from "syllable-sdk/core.js";
352
- import { voiceGroupsGetById } from "syllable-sdk/funcs/voiceGroupsGetById.js";
353
-
354
- // Use `SyllableSDKCore` for best tree-shaking performance.
355
- // You can create one instance of it to use across an application.
356
- const syllableSDK = new SyllableSDKCore({
357
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
358
- });
359
-
360
- async function run() {
361
- const res = await voiceGroupsGetById(syllableSDK, {
362
- voiceGroupId: 431245,
363
- });
364
- if (res.ok) {
365
- const { value: result } = res;
366
- console.log(result);
367
- } else {
368
- console.log("voiceGroupsGetById failed:", res.error);
369
- }
370
- }
371
-
372
- run();
373
- ```
374
-
375
- ### Parameters
376
-
377
- | Parameter | Type | Required | Description |
378
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
379
- | `request` | [operations.VoiceGroupsGetByIdRequest](../../models/operations/voicegroupsgetbyidrequest.md) | :heavy_check_mark: | The request object to use for the request. |
380
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
381
- | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
382
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
383
-
384
- ### Response
385
-
386
- **Promise\<[components.VoiceGroupResponse](../../models/components/voicegroupresponse.md)\>**
387
-
388
- ### Errors
389
-
390
- | Error Type | Status Code | Content Type |
391
- | -------------------------- | -------------------------- | -------------------------- |
392
- | errors.HTTPValidationError | 422 | application/json |
393
- | errors.SDKError | 4XX, 5XX | \*/\* |
394
-
395
- ## delete
396
-
397
- Delete a voice group.
398
-
399
- ### Example Usage
400
-
401
- <!-- UsageSnippet language="typescript" operationID="voice_groups_delete" method="delete" path="/api/v1/voice_groups/{voice_group_id}" -->
402
- ```typescript
403
- import { SyllableSDK } from "syllable-sdk";
404
-
405
- const syllableSDK = new SyllableSDK({
406
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
407
- });
408
-
409
- async function run() {
410
- const result = await syllableSDK.voiceGroups.delete({
411
- voiceGroupId: 225046,
412
- reason: "<value>",
413
- });
414
-
415
- console.log(result);
416
- }
417
-
418
- run();
419
- ```
420
-
421
- ### Standalone function
422
-
423
- The standalone function version of this method:
424
-
425
- ```typescript
426
- import { SyllableSDKCore } from "syllable-sdk/core.js";
427
- import { voiceGroupsDelete } from "syllable-sdk/funcs/voiceGroupsDelete.js";
428
-
429
- // Use `SyllableSDKCore` for best tree-shaking performance.
430
- // You can create one instance of it to use across an application.
431
- const syllableSDK = new SyllableSDKCore({
432
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
433
- });
434
-
435
- async function run() {
436
- const res = await voiceGroupsDelete(syllableSDK, {
437
- voiceGroupId: 225046,
438
- reason: "<value>",
439
- });
440
- if (res.ok) {
441
- const { value: result } = res;
442
- console.log(result);
443
- } else {
444
- console.log("voiceGroupsDelete failed:", res.error);
445
- }
446
- }
447
-
448
- run();
449
- ```
450
-
451
- ### Parameters
452
-
453
- | Parameter | Type | Required | Description |
454
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
455
- | `request` | [operations.VoiceGroupsDeleteRequest](../../models/operations/voicegroupsdeleterequest.md) | :heavy_check_mark: | The request object to use for the request. |
456
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
457
- | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
458
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
459
-
460
- ### Response
461
-
462
- **Promise\<[any](../../models/.md)\>**
463
-
464
- ### Errors
465
-
466
- | Error Type | Status Code | Content Type |
467
- | -------------------------- | -------------------------- | -------------------------- |
468
- | errors.HTTPValidationError | 422 | application/json |
469
- | errors.SDKError | 4XX, 5XX | \*/\* |
470
-
471
- ## voiceGroupsCreateVoiceSample
472
-
473
- Generate voice sample.
474
-
475
- ### Example Usage
476
-
477
- <!-- UsageSnippet language="typescript" operationID="voice_groups_create_voice_sample" method="post" path="/api/v1/voice_groups/voices/sample" -->
478
- ```typescript
479
- import { SyllableSDK } from "syllable-sdk";
480
-
481
- const syllableSDK = new SyllableSDK({
482
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
483
- });
484
-
485
- async function run() {
486
- const result = await syllableSDK.voiceGroups.voiceGroupsCreateVoiceSample({
487
- languageCode: "fa-IR",
488
- voiceProvider: "Google",
489
- voiceDisplayName: "Vindemiatrix (English)",
490
- voiceSpeed: 1,
491
- voicePitch: 0,
492
- });
493
-
494
- console.log(result);
495
- }
496
-
497
- run();
498
- ```
499
-
500
- ### Standalone function
501
-
502
- The standalone function version of this method:
503
-
504
- ```typescript
505
- import { SyllableSDKCore } from "syllable-sdk/core.js";
506
- import { voiceGroupsVoiceGroupsCreateVoiceSample } from "syllable-sdk/funcs/voiceGroupsVoiceGroupsCreateVoiceSample.js";
507
-
508
- // Use `SyllableSDKCore` for best tree-shaking performance.
509
- // You can create one instance of it to use across an application.
510
- const syllableSDK = new SyllableSDKCore({
511
- apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
512
- });
513
-
514
- async function run() {
515
- const res = await voiceGroupsVoiceGroupsCreateVoiceSample(syllableSDK, {
516
- languageCode: "fa-IR",
517
- voiceProvider: "Google",
518
- voiceDisplayName: "Vindemiatrix (English)",
519
- voiceSpeed: 1,
520
- voicePitch: 0,
521
- });
522
- if (res.ok) {
523
- const { value: result } = res;
524
- console.log(result);
525
- } else {
526
- console.log("voiceGroupsVoiceGroupsCreateVoiceSample failed:", res.error);
527
- }
528
- }
529
-
530
- run();
531
- ```
532
-
533
- ### Parameters
534
-
535
- | Parameter | Type | Required | Description |
536
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
537
- | `request` | [components.VoiceSampleCreateRequest](../../models/components/voicesamplecreaterequest.md) | :heavy_check_mark: | The request object to use for the request. |
538
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
539
- | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
540
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
541
-
542
- ### Response
543
-
544
- **Promise\<[ReadableStream<Uint8Array>](../../models/.md)\>**
545
-
546
- ### Errors
547
-
548
- | Error Type | Status Code | Content Type |
549
- | -------------------------- | -------------------------- | -------------------------- |
550
- | errors.HTTPValidationError | 422 | application/json |
551
- | errors.SDKError | 4XX, 5XX | \*/\* |