@cartesia/cartesia-js 3.0.0-b3 → 3.0.0-b4
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 +9 -0
- package/README.md +21 -21
- package/client.d.mts +2 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +2 -2
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/access-token.d.mts +5 -0
- package/resources/access-token.d.mts.map +1 -1
- package/resources/access-token.d.ts +5 -0
- package/resources/access-token.d.ts.map +1 -1
- package/resources/agents/agents.js +1 -1
- package/resources/agents/agents.js.map +1 -1
- package/resources/agents/agents.mjs +1 -1
- package/resources/agents/agents.mjs.map +1 -1
- package/resources/agents/metrics/index.d.mts +1 -1
- package/resources/agents/metrics/index.d.mts.map +1 -1
- package/resources/agents/metrics/index.d.ts +1 -1
- package/resources/agents/metrics/index.d.ts.map +1 -1
- package/resources/agents/metrics/index.js.map +1 -1
- package/resources/agents/metrics/index.mjs.map +1 -1
- package/resources/agents/metrics/metrics.d.mts +2 -2
- package/resources/agents/metrics/metrics.d.mts.map +1 -1
- package/resources/agents/metrics/metrics.d.ts +2 -2
- package/resources/agents/metrics/metrics.d.ts.map +1 -1
- package/resources/agents/metrics/metrics.js.map +1 -1
- package/resources/agents/metrics/metrics.mjs.map +1 -1
- package/resources/agents/metrics/results.d.mts +23 -22
- package/resources/agents/metrics/results.d.mts.map +1 -1
- package/resources/agents/metrics/results.d.ts +23 -22
- package/resources/agents/metrics/results.d.ts.map +1 -1
- package/resources/agents/metrics/results.js +4 -5
- package/resources/agents/metrics/results.js.map +1 -1
- package/resources/agents/metrics/results.mjs +4 -5
- package/resources/agents/metrics/results.mjs.map +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/infill.d.mts +3 -4
- package/resources/infill.d.mts.map +1 -1
- package/resources/infill.d.ts +3 -4
- package/resources/infill.d.ts.map +1 -1
- package/resources/infill.js +0 -2
- package/resources/infill.js.map +1 -1
- package/resources/infill.mjs +0 -2
- package/resources/infill.mjs.map +1 -1
- package/resources/pronunciation-dicts.d.mts +0 -8
- package/resources/pronunciation-dicts.d.mts.map +1 -1
- package/resources/pronunciation-dicts.d.ts +0 -8
- package/resources/pronunciation-dicts.d.ts.map +1 -1
- package/resources/pronunciation-dicts.js +0 -18
- package/resources/pronunciation-dicts.js.map +1 -1
- package/resources/pronunciation-dicts.mjs +0 -18
- package/resources/pronunciation-dicts.mjs.map +1 -1
- package/resources/stt.d.mts +1 -104
- package/resources/stt.d.mts.map +1 -1
- package/resources/stt.d.ts +1 -104
- package/resources/stt.d.ts.map +1 -1
- package/resources/tts/tts.d.mts +79 -115
- package/resources/tts/tts.d.mts.map +1 -1
- package/resources/tts/tts.d.ts +79 -115
- package/resources/tts/tts.d.ts.map +1 -1
- package/resources/voice-changer.d.mts +2 -2
- package/resources/voice-changer.d.mts.map +1 -1
- package/resources/voice-changer.d.ts +2 -2
- package/resources/voice-changer.d.ts.map +1 -1
- package/resources/voices.d.mts +70 -34
- package/resources/voices.d.mts.map +1 -1
- package/resources/voices.d.ts +70 -34
- package/resources/voices.d.ts.map +1 -1
- package/resources/voices.js +45 -3
- package/resources/voices.js.map +1 -1
- package/resources/voices.mjs +45 -3
- package/resources/voices.mjs.map +1 -1
- package/src/client.ts +2 -0
- package/src/resources/access-token.ts +6 -0
- package/src/resources/agents/agents.ts +1 -1
- package/src/resources/agents/metrics/index.ts +1 -0
- package/src/resources/agents/metrics/metrics.ts +2 -0
- package/src/resources/agents/metrics/results.ts +27 -23
- package/src/resources/index.ts +1 -0
- package/src/resources/infill.ts +3 -4
- package/src/resources/pronunciation-dicts.ts +0 -20
- package/src/resources/stt.ts +102 -104
- package/src/resources/tts/tts.ts +146 -128
- package/src/resources/voice-changer.ts +2 -2
- package/src/resources/voices.ts +105 -38
- 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/voices.d.ts
CHANGED
|
@@ -8,42 +8,81 @@ export declare class Voices extends APIResource {
|
|
|
8
8
|
* Update the name, description, and gender of a voice. To set the gender back to
|
|
9
9
|
* the default, set the gender to `null`. If gender is not specified, the gender
|
|
10
10
|
* will not be updated.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const voice = await client.voices.update('id', {
|
|
15
|
+
* description: 'description',
|
|
16
|
+
* name: 'name',
|
|
17
|
+
* });
|
|
18
|
+
* ```
|
|
11
19
|
*/
|
|
12
20
|
update(id: string, body: VoiceUpdateParams, options?: RequestOptions): APIPromise<Voice>;
|
|
13
21
|
/**
|
|
14
22
|
* List Voices
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* // Automatically fetches more pages as needed.
|
|
27
|
+
* for await (const voice of client.voices.list()) {
|
|
28
|
+
* // ...
|
|
29
|
+
* }
|
|
30
|
+
* ```
|
|
15
31
|
*/
|
|
16
32
|
list(query?: VoiceListParams | null | undefined, options?: RequestOptions): PagePromise<VoicesCursorIDPage, Voice>;
|
|
17
33
|
/**
|
|
18
34
|
* Delete Voice
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```ts
|
|
38
|
+
* await client.voices.delete('id');
|
|
39
|
+
* ```
|
|
19
40
|
*/
|
|
20
41
|
delete(id: string, options?: RequestOptions): APIPromise<void>;
|
|
21
42
|
/**
|
|
22
43
|
* Clone a high similarity voice from an audio clip. Clones are more similar to the
|
|
23
44
|
* source clip, but may reproduce background noise. For these, use an audio clip
|
|
24
45
|
* about 5 seconds long.
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```ts
|
|
49
|
+
* const voiceMetadata = await client.voices.clone();
|
|
50
|
+
* ```
|
|
25
51
|
*/
|
|
26
52
|
clone(body: VoiceCloneParams, options?: RequestOptions): APIPromise<VoiceMetadata>;
|
|
27
53
|
/**
|
|
28
54
|
* Get Voice
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```ts
|
|
58
|
+
* const voice = await client.voices.get('id');
|
|
59
|
+
* ```
|
|
29
60
|
*/
|
|
30
|
-
get(id: string, options?: RequestOptions): APIPromise<Voice>;
|
|
61
|
+
get(id: string, query?: VoiceGetParams | null | undefined, options?: RequestOptions): APIPromise<Voice>;
|
|
31
62
|
/**
|
|
32
63
|
* Create a new voice from an existing voice localized to a new language and
|
|
33
64
|
* dialect.
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* ```ts
|
|
68
|
+
* const voiceMetadata = await client.voices.localize({
|
|
69
|
+
* description: 'description',
|
|
70
|
+
* language: 'en',
|
|
71
|
+
* name: 'name',
|
|
72
|
+
* original_speaker_gender: 'male',
|
|
73
|
+
* voice_id: 'voice_id',
|
|
74
|
+
* });
|
|
75
|
+
* ```
|
|
34
76
|
*/
|
|
35
77
|
localize(body: VoiceLocalizeParams, options?: RequestOptions): APIPromise<VoiceMetadata>;
|
|
36
78
|
}
|
|
37
79
|
export type VoicesCursorIDPage = CursorIDPage<Voice>;
|
|
38
80
|
export type GenderPresentation = 'masculine' | 'feminine' | 'gender_neutral';
|
|
39
81
|
/**
|
|
40
|
-
* The language that the given voice should speak the transcript in.
|
|
41
|
-
*
|
|
42
|
-
* Options: English (en), French (fr), German (de), Spanish (es), Portuguese (pt),
|
|
43
|
-
* Chinese (zh), Japanese (ja), Hindi (hi), Italian (it), Korean (ko), Dutch (nl),
|
|
44
|
-
* Polish (pl), Russian (ru), Swedish (sv), Turkish (tr).
|
|
82
|
+
* The language that the given voice should speak the transcript in. For valid
|
|
83
|
+
* options, see [Models](/build-with-cartesia/tts-models).
|
|
45
84
|
*/
|
|
46
|
-
export type SupportedLanguage = 'en' | 'fr' | 'de' | 'es' | 'pt' | 'zh' | 'ja' | 'hi' | 'it' | 'ko' | 'nl' | 'pl' | 'ru' | 'sv' | 'tr';
|
|
85
|
+
export type SupportedLanguage = 'en' | 'fr' | 'de' | 'es' | 'pt' | 'zh' | 'ja' | 'hi' | 'it' | 'ko' | 'nl' | 'pl' | 'ru' | 'sv' | 'tr' | 'tl' | 'bg' | 'ro' | 'ar' | 'cs' | 'el' | 'fi' | 'hr' | 'ms' | 'sk' | 'da' | 'ta' | 'uk' | 'hu' | 'no' | 'vi' | 'bn' | 'th' | 'he' | 'ka' | 'id' | 'te' | 'gu' | 'kn' | 'ml' | 'mr' | 'pa';
|
|
47
86
|
export interface Voice {
|
|
48
87
|
/**
|
|
49
88
|
* The ID of the voice.
|
|
@@ -58,7 +97,7 @@ export interface Voice {
|
|
|
58
97
|
*/
|
|
59
98
|
description: string;
|
|
60
99
|
/**
|
|
61
|
-
* Whether
|
|
100
|
+
* Whether your organization owns the voice.
|
|
62
101
|
*/
|
|
63
102
|
is_owner: boolean;
|
|
64
103
|
/**
|
|
@@ -66,11 +105,8 @@ export interface Voice {
|
|
|
66
105
|
*/
|
|
67
106
|
is_public: boolean;
|
|
68
107
|
/**
|
|
69
|
-
* The language that the given voice should speak the transcript in.
|
|
70
|
-
*
|
|
71
|
-
* Options: English (en), French (fr), German (de), Spanish (es), Portuguese (pt),
|
|
72
|
-
* Chinese (zh), Japanese (ja), Hindi (hi), Italian (it), Korean (ko), Dutch (nl),
|
|
73
|
-
* Polish (pl), Russian (ru), Swedish (sv), Turkish (tr).
|
|
108
|
+
* The language that the given voice should speak the transcript in. For valid
|
|
109
|
+
* options, see [Models](/build-with-cartesia/tts-models).
|
|
74
110
|
*/
|
|
75
111
|
language: SupportedLanguage;
|
|
76
112
|
/**
|
|
@@ -82,10 +118,13 @@ export interface Voice {
|
|
|
82
118
|
*/
|
|
83
119
|
gender?: GenderPresentation | null;
|
|
84
120
|
/**
|
|
85
|
-
*
|
|
86
|
-
*
|
|
121
|
+
* A URL to download a preview audio file for this voice. Useful to avoid consuming
|
|
122
|
+
* credits when looking for the right voice. The URL requires the same
|
|
123
|
+
* Authorization header. Voice previews may be changed, moved, or deleted so you
|
|
124
|
+
* should avoid storing the URL permanently. This property will be null if there's
|
|
125
|
+
* no preview available. Only included when `expand[]` includes `preview_file_url`.
|
|
87
126
|
*/
|
|
88
|
-
|
|
127
|
+
preview_file_url?: string | null;
|
|
89
128
|
}
|
|
90
129
|
export interface VoiceMetadata {
|
|
91
130
|
/**
|
|
@@ -105,11 +144,8 @@ export interface VoiceMetadata {
|
|
|
105
144
|
*/
|
|
106
145
|
is_public: boolean;
|
|
107
146
|
/**
|
|
108
|
-
* The language that the given voice should speak the transcript in.
|
|
109
|
-
*
|
|
110
|
-
* Options: English (en), French (fr), German (de), Spanish (es), Portuguese (pt),
|
|
111
|
-
* Chinese (zh), Japanese (ja), Hindi (hi), Italian (it), Korean (ko), Dutch (nl),
|
|
112
|
-
* Polish (pl), Russian (ru), Swedish (sv), Turkish (tr).
|
|
147
|
+
* The language that the given voice should speak the transcript in. For valid
|
|
148
|
+
* options, see [Models](/build-with-cartesia/tts-models).
|
|
113
149
|
*/
|
|
114
150
|
language: SupportedLanguage;
|
|
115
151
|
/**
|
|
@@ -136,24 +172,23 @@ export interface VoiceListParams extends CursorIDPageParams {
|
|
|
136
172
|
/**
|
|
137
173
|
* Additional fields to include in the response.
|
|
138
174
|
*/
|
|
139
|
-
expand?: Array<'
|
|
175
|
+
expand?: Array<'preview_file_url'> | null;
|
|
140
176
|
/**
|
|
141
177
|
* The gender presentation of the voices to return.
|
|
142
178
|
*/
|
|
143
179
|
gender?: GenderPresentation | null;
|
|
144
180
|
/**
|
|
145
|
-
* Whether to only return voices owned
|
|
181
|
+
* Whether to only return voices owned your organization.
|
|
146
182
|
*/
|
|
147
183
|
is_owner?: boolean | null;
|
|
148
|
-
/**
|
|
149
|
-
* Whether to only return starred voices.
|
|
150
|
-
*/
|
|
151
|
-
is_starred?: boolean | null;
|
|
152
|
-
language?: string;
|
|
153
184
|
/**
|
|
154
185
|
* The number of Voices to return per page, ranging between 1 and 100.
|
|
155
186
|
*/
|
|
156
187
|
limit?: number | null;
|
|
188
|
+
/**
|
|
189
|
+
* Query string to search for voices by name, description, or Voice ID.
|
|
190
|
+
*/
|
|
191
|
+
q?: string | null;
|
|
157
192
|
}
|
|
158
193
|
export interface VoiceCloneParams {
|
|
159
194
|
/**
|
|
@@ -165,11 +200,6 @@ export interface VoiceCloneParams {
|
|
|
165
200
|
* A description for the voice.
|
|
166
201
|
*/
|
|
167
202
|
description?: string | null;
|
|
168
|
-
/**
|
|
169
|
-
* Whether to apply AI enhancements to the clip to reduce background noise. This is
|
|
170
|
-
* not recommended unless the source clip is extremely low quality.
|
|
171
|
-
*/
|
|
172
|
-
enhance?: boolean | null;
|
|
173
203
|
/**
|
|
174
204
|
* The language of the voice.
|
|
175
205
|
*/
|
|
@@ -179,6 +209,12 @@ export interface VoiceCloneParams {
|
|
|
179
209
|
*/
|
|
180
210
|
name?: string;
|
|
181
211
|
}
|
|
212
|
+
export interface VoiceGetParams {
|
|
213
|
+
/**
|
|
214
|
+
* Additional fields to include in the response.
|
|
215
|
+
*/
|
|
216
|
+
expand?: Array<'preview_file_url'> | null;
|
|
217
|
+
}
|
|
182
218
|
export interface VoiceLocalizeParams {
|
|
183
219
|
/**
|
|
184
220
|
* The description of the new localized voice.
|
|
@@ -208,6 +244,6 @@ export interface VoiceLocalizeParams {
|
|
|
208
244
|
dialect?: 'au' | 'in' | 'so' | 'uk' | 'us' | 'mx' | 'pe' | 'br' | 'eu' | 'ca' | null;
|
|
209
245
|
}
|
|
210
246
|
export declare namespace Voices {
|
|
211
|
-
export { type GenderPresentation as GenderPresentation, type SupportedLanguage as SupportedLanguage, type Voice as Voice, type VoiceMetadata as VoiceMetadata, type VoicesCursorIDPage as VoicesCursorIDPage, type VoiceUpdateParams as VoiceUpdateParams, type VoiceListParams as VoiceListParams, type VoiceCloneParams as VoiceCloneParams, type VoiceLocalizeParams as VoiceLocalizeParams, };
|
|
247
|
+
export { type GenderPresentation as GenderPresentation, type SupportedLanguage as SupportedLanguage, type Voice as Voice, type VoiceMetadata as VoiceMetadata, type VoicesCursorIDPage as VoicesCursorIDPage, type VoiceUpdateParams as VoiceUpdateParams, type VoiceListParams as VoiceListParams, type VoiceCloneParams as VoiceCloneParams, type VoiceGetParams as VoiceGetParams, type VoiceLocalizeParams as VoiceLocalizeParams, };
|
|
212
248
|
}
|
|
213
249
|
//# sourceMappingURL=voices.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"voices.d.ts","sourceRoot":"","sources":["../src/resources/voices.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,YAAY,EAAE,KAAK,kBAAkB,EAAE,WAAW,EAAE;OACtD,EAAE,KAAK,UAAU,EAAE;OAEnB,EAAE,cAAc,EAAE;AAIzB,qBAAa,MAAO,SAAQ,WAAW;IACrC
|
|
1
|
+
{"version":3,"file":"voices.d.ts","sourceRoot":"","sources":["../src/resources/voices.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,YAAY,EAAE,KAAK,kBAAkB,EAAE,WAAW,EAAE;OACtD,EAAE,KAAK,UAAU,EAAE;OAEnB,EAAE,cAAc,EAAE;AAIzB,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,KAAK,CAAC;IAIxF;;;;;;;;;;OAUG;IACH,IAAI,CACF,KAAK,GAAE,eAAe,GAAG,IAAI,GAAG,SAAc,EAC9C,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,kBAAkB,EAAE,KAAK,CAAC;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K,IAAI,KAAK,EACnB,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}
|
package/resources/voices.js
CHANGED
|
@@ -12,18 +12,39 @@ class Voices extends resource_1.APIResource {
|
|
|
12
12
|
* Update the name, description, and gender of a voice. To set the gender back to
|
|
13
13
|
* the default, set the gender to `null`. If gender is not specified, the gender
|
|
14
14
|
* will not be updated.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* const voice = await client.voices.update('id', {
|
|
19
|
+
* description: 'description',
|
|
20
|
+
* name: 'name',
|
|
21
|
+
* });
|
|
22
|
+
* ```
|
|
15
23
|
*/
|
|
16
24
|
update(id, body, options) {
|
|
17
25
|
return this._client.patch((0, path_1.path) `/voices/${id}`, { body, ...options });
|
|
18
26
|
}
|
|
19
27
|
/**
|
|
20
28
|
* List Voices
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```ts
|
|
32
|
+
* // Automatically fetches more pages as needed.
|
|
33
|
+
* for await (const voice of client.voices.list()) {
|
|
34
|
+
* // ...
|
|
35
|
+
* }
|
|
36
|
+
* ```
|
|
21
37
|
*/
|
|
22
38
|
list(query = {}, options) {
|
|
23
|
-
return this._client.getAPIList('/voices
|
|
39
|
+
return this._client.getAPIList('/voices', (pagination_1.CursorIDPage), { query, ...options });
|
|
24
40
|
}
|
|
25
41
|
/**
|
|
26
42
|
* Delete Voice
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```ts
|
|
46
|
+
* await client.voices.delete('id');
|
|
47
|
+
* ```
|
|
27
48
|
*/
|
|
28
49
|
delete(id, options) {
|
|
29
50
|
return this._client.delete((0, path_1.path) `/voices/${id}`, {
|
|
@@ -35,19 +56,40 @@ class Voices extends resource_1.APIResource {
|
|
|
35
56
|
* Clone a high similarity voice from an audio clip. Clones are more similar to the
|
|
36
57
|
* source clip, but may reproduce background noise. For these, use an audio clip
|
|
37
58
|
* about 5 seconds long.
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```ts
|
|
62
|
+
* const voiceMetadata = await client.voices.clone();
|
|
63
|
+
* ```
|
|
38
64
|
*/
|
|
39
65
|
clone(body, options) {
|
|
40
66
|
return this._client.post('/voices/clone', (0, uploads_1.multipartFormRequestOptions)({ body, ...options }, this._client));
|
|
41
67
|
}
|
|
42
68
|
/**
|
|
43
69
|
* Get Voice
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* ```ts
|
|
73
|
+
* const voice = await client.voices.get('id');
|
|
74
|
+
* ```
|
|
44
75
|
*/
|
|
45
|
-
get(id, options) {
|
|
46
|
-
return this._client.get((0, path_1.path) `/voices/${id}`, options);
|
|
76
|
+
get(id, query = {}, options) {
|
|
77
|
+
return this._client.get((0, path_1.path) `/voices/${id}`, { query, ...options });
|
|
47
78
|
}
|
|
48
79
|
/**
|
|
49
80
|
* Create a new voice from an existing voice localized to a new language and
|
|
50
81
|
* dialect.
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* ```ts
|
|
85
|
+
* const voiceMetadata = await client.voices.localize({
|
|
86
|
+
* description: 'description',
|
|
87
|
+
* language: 'en',
|
|
88
|
+
* name: 'name',
|
|
89
|
+
* original_speaker_gender: 'male',
|
|
90
|
+
* voice_id: 'voice_id',
|
|
91
|
+
* });
|
|
92
|
+
* ```
|
|
51
93
|
*/
|
|
52
94
|
localize(body, options) {
|
|
53
95
|
return this._client.post('/voices/localize', { body, ...options });
|
package/resources/voices.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"voices.js","sourceRoot":"","sources":["../src/resources/voices.ts"],"names":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AE,GAAG,OAAO,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,CAChE,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IACH,GAAG,CACD,EAAU,EACV,QAA2C,EAAE,EAC7C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,WAAW,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtE,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,IAAyB,EAAE,OAAwB;QAC1D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrE,CAAC;CACF;AAtGD,wBAsGC"}
|
package/resources/voices.mjs
CHANGED
|
@@ -9,18 +9,39 @@ export class Voices extends APIResource {
|
|
|
9
9
|
* Update the name, description, and gender of a voice. To set the gender back to
|
|
10
10
|
* the default, set the gender to `null`. If gender is not specified, the gender
|
|
11
11
|
* will not be updated.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const voice = await client.voices.update('id', {
|
|
16
|
+
* description: 'description',
|
|
17
|
+
* name: 'name',
|
|
18
|
+
* });
|
|
19
|
+
* ```
|
|
12
20
|
*/
|
|
13
21
|
update(id, body, options) {
|
|
14
22
|
return this._client.patch(path `/voices/${id}`, { body, ...options });
|
|
15
23
|
}
|
|
16
24
|
/**
|
|
17
25
|
* List Voices
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```ts
|
|
29
|
+
* // Automatically fetches more pages as needed.
|
|
30
|
+
* for await (const voice of client.voices.list()) {
|
|
31
|
+
* // ...
|
|
32
|
+
* }
|
|
33
|
+
* ```
|
|
18
34
|
*/
|
|
19
35
|
list(query = {}, options) {
|
|
20
|
-
return this._client.getAPIList('/voices
|
|
36
|
+
return this._client.getAPIList('/voices', (CursorIDPage), { query, ...options });
|
|
21
37
|
}
|
|
22
38
|
/**
|
|
23
39
|
* Delete Voice
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```ts
|
|
43
|
+
* await client.voices.delete('id');
|
|
44
|
+
* ```
|
|
24
45
|
*/
|
|
25
46
|
delete(id, options) {
|
|
26
47
|
return this._client.delete(path `/voices/${id}`, {
|
|
@@ -32,19 +53,40 @@ export class Voices extends APIResource {
|
|
|
32
53
|
* Clone a high similarity voice from an audio clip. Clones are more similar to the
|
|
33
54
|
* source clip, but may reproduce background noise. For these, use an audio clip
|
|
34
55
|
* about 5 seconds long.
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* ```ts
|
|
59
|
+
* const voiceMetadata = await client.voices.clone();
|
|
60
|
+
* ```
|
|
35
61
|
*/
|
|
36
62
|
clone(body, options) {
|
|
37
63
|
return this._client.post('/voices/clone', multipartFormRequestOptions({ body, ...options }, this._client));
|
|
38
64
|
}
|
|
39
65
|
/**
|
|
40
66
|
* Get Voice
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* ```ts
|
|
70
|
+
* const voice = await client.voices.get('id');
|
|
71
|
+
* ```
|
|
41
72
|
*/
|
|
42
|
-
get(id, options) {
|
|
43
|
-
return this._client.get(path `/voices/${id}`, options);
|
|
73
|
+
get(id, query = {}, options) {
|
|
74
|
+
return this._client.get(path `/voices/${id}`, { query, ...options });
|
|
44
75
|
}
|
|
45
76
|
/**
|
|
46
77
|
* Create a new voice from an existing voice localized to a new language and
|
|
47
78
|
* dialect.
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* ```ts
|
|
82
|
+
* const voiceMetadata = await client.voices.localize({
|
|
83
|
+
* description: 'description',
|
|
84
|
+
* language: 'en',
|
|
85
|
+
* name: 'name',
|
|
86
|
+
* original_speaker_gender: 'male',
|
|
87
|
+
* voice_id: 'voice_id',
|
|
88
|
+
* });
|
|
89
|
+
* ```
|
|
48
90
|
*/
|
|
49
91
|
localize(body, options) {
|
|
50
92
|
return this._client.post('/voices/localize', { body, ...options });
|
package/resources/voices.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"voices.mjs","sourceRoot":"","sources":["../src/resources/voices.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,YAAY,EAAwC;OAEtD,EAAE,YAAY,EAAE;OAEhB,EAAE,2BAA2B,EAAE;OAC/B,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC
|
|
1
|
+
{"version":3,"file":"voices.mjs","sourceRoot":"","sources":["../src/resources/voices.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,YAAY,EAAwC;OAEtD,EAAE,YAAY,EAAE;OAEhB,EAAE,2BAA2B,EAAE;OAC/B,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,EAAU,EAAE,IAAuB,EAAE,OAAwB;QAClE,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAA,WAAW,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvE,CAAC;IAED;;;;;;;;;;OAUG;IACH,IAAI,CACF,QAA4C,EAAE,EAC9C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,EAAE,CAAA,YAAmB,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxF,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,EAAU,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,WAAW,EAAE,EAAE,EAAE;YAC9C,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;OASG;IACH,KAAK,CAAC,IAAsB,EAAE,OAAwB;QACpD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB,eAAe,EACf,2BAA2B,CAAC,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,CAChE,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IACH,GAAG,CACD,EAAU,EACV,QAA2C,EAAE,EAC7C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,WAAW,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtE,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,IAAyB,EAAE,OAAwB;QAC1D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrE,CAAC;CACF"}
|
package/src/client.ts
CHANGED
|
@@ -51,6 +51,7 @@ import {
|
|
|
51
51
|
SupportedLanguage,
|
|
52
52
|
Voice,
|
|
53
53
|
VoiceCloneParams,
|
|
54
|
+
VoiceGetParams,
|
|
54
55
|
VoiceListParams,
|
|
55
56
|
VoiceLocalizeParams,
|
|
56
57
|
VoiceMetadata,
|
|
@@ -942,6 +943,7 @@ export declare namespace Cartesia {
|
|
|
942
943
|
type VoiceUpdateParams as VoiceUpdateParams,
|
|
943
944
|
type VoiceListParams as VoiceListParams,
|
|
944
945
|
type VoiceCloneParams as VoiceCloneParams,
|
|
946
|
+
type VoiceGetParams as VoiceGetParams,
|
|
945
947
|
type VoiceLocalizeParams as VoiceLocalizeParams,
|
|
946
948
|
};
|
|
947
949
|
}
|
|
@@ -41,6 +41,12 @@ export namespace AccessTokenCreateParams {
|
|
|
41
41
|
* optional - specify only the capabilities you need.
|
|
42
42
|
*/
|
|
43
43
|
export interface Grants {
|
|
44
|
+
/**
|
|
45
|
+
* The `agent` grant allows the token to be used to access the Agent websocket
|
|
46
|
+
* calling [endpoint](/line/integrations/web-calls#connection).
|
|
47
|
+
*/
|
|
48
|
+
agent?: boolean | null;
|
|
49
|
+
|
|
44
50
|
/**
|
|
45
51
|
* The `stt` grant allows the token to be used to access any STT endpoint.
|
|
46
52
|
*/
|
|
@@ -44,7 +44,7 @@ export class Agents extends APIResource {
|
|
|
44
44
|
* Lists all agents associated with your account.
|
|
45
45
|
*/
|
|
46
46
|
list(options?: RequestOptions): APIPromise<AgentListResponse> {
|
|
47
|
-
return this._client.get('/agents
|
|
47
|
+
return this._client.get('/agents', options);
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
/**
|
|
@@ -4,6 +4,7 @@ import { APIResource } from '../../../core/resource';
|
|
|
4
4
|
import * as ResultsAPI from './results';
|
|
5
5
|
import {
|
|
6
6
|
ResultExportParams,
|
|
7
|
+
ResultExportResponse,
|
|
7
8
|
ResultListParams,
|
|
8
9
|
ResultListResponse,
|
|
9
10
|
ResultListResponsesCursorIDPage,
|
|
@@ -179,6 +180,7 @@ export declare namespace Metrics {
|
|
|
179
180
|
export {
|
|
180
181
|
Results as Results,
|
|
181
182
|
type ResultListResponse as ResultListResponse,
|
|
183
|
+
type ResultExportResponse as ResultExportResponse,
|
|
182
184
|
type ResultListResponsesCursorIDPage as ResultListResponsesCursorIDPage,
|
|
183
185
|
type ResultListParams as ResultListParams,
|
|
184
186
|
type ResultExportParams as ResultExportParams,
|
|
@@ -4,6 +4,7 @@ import { APIResource } from '../../../core/resource';
|
|
|
4
4
|
import * as CallsAPI from '../calls';
|
|
5
5
|
import { APIPromise } from '../../../core/api-promise';
|
|
6
6
|
import { CursorIDPage, type CursorIDPageParams, PagePromise } from '../../../core/pagination';
|
|
7
|
+
import { type Uploadable } from '../../../core/uploads';
|
|
7
8
|
import { buildHeaders } from '../../../internal/headers';
|
|
8
9
|
import { RequestOptions } from '../../../internal/request-options';
|
|
9
10
|
|
|
@@ -22,16 +23,15 @@ export class Results extends APIResource {
|
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
/**
|
|
25
|
-
* Export metric results to a CSV file. This endpoint
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* `x-next-page`.
|
|
26
|
+
* Export metric results to a CSV file. This endpoint streams at most 100k results
|
|
27
|
+
* as the CSV file directly to the client. Use the optional filters to narrow down
|
|
28
|
+
* the results to export.
|
|
29
29
|
*/
|
|
30
|
-
export(query: ResultExportParams | null | undefined = {}, options?: RequestOptions): APIPromise<
|
|
30
|
+
export(query: ResultExportParams | null | undefined = {}, options?: RequestOptions): APIPromise<string> {
|
|
31
31
|
return this._client.get('/agents/metrics/results/export', {
|
|
32
32
|
query,
|
|
33
33
|
...options,
|
|
34
|
-
headers: buildHeaders([{ Accept: '
|
|
34
|
+
headers: buildHeaders([{ Accept: 'text/csv' }, options?.headers]),
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
37
|
}
|
|
@@ -110,6 +110,8 @@ export interface ResultListResponse {
|
|
|
110
110
|
value?: unknown;
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
+
export type ResultExportResponse = Uploadable;
|
|
114
|
+
|
|
113
115
|
export interface ResultListParams extends CursorIDPageParams {
|
|
114
116
|
/**
|
|
115
117
|
* The ID of the agent.
|
|
@@ -126,6 +128,12 @@ export interface ResultListParams extends CursorIDPageParams {
|
|
|
126
128
|
*/
|
|
127
129
|
deployment_id?: string | null;
|
|
128
130
|
|
|
131
|
+
/**
|
|
132
|
+
* Filter metric results created before or at this ISO 8601 date/time (e.g.
|
|
133
|
+
* 2024-04-30T23:59:59Z).
|
|
134
|
+
*/
|
|
135
|
+
end_date?: string | null;
|
|
136
|
+
|
|
129
137
|
/**
|
|
130
138
|
* The number of metric results to return per page, ranging between 1 and 100.
|
|
131
139
|
*/
|
|
@@ -135,6 +143,12 @@ export interface ResultListParams extends CursorIDPageParams {
|
|
|
135
143
|
* The ID of the metric.
|
|
136
144
|
*/
|
|
137
145
|
metric_id?: string | null;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Filter metric results created at or after this ISO 8601 date/time (e.g.
|
|
149
|
+
* 2024-04-01T00:00:00Z).
|
|
150
|
+
*/
|
|
151
|
+
start_date?: string | null;
|
|
138
152
|
}
|
|
139
153
|
|
|
140
154
|
export interface ResultExportParams {
|
|
@@ -154,18 +168,10 @@ export interface ResultExportParams {
|
|
|
154
168
|
deployment_id?: string | null;
|
|
155
169
|
|
|
156
170
|
/**
|
|
157
|
-
*
|
|
158
|
-
*
|
|
159
|
-
* request and receive 100 objects, starting with `metric_result_abc123`, your
|
|
160
|
-
* subsequent call can include `ending_before=metric_result_abc123` to fetch the
|
|
161
|
-
* previous page of the list.
|
|
162
|
-
*/
|
|
163
|
-
ending_before?: string | null;
|
|
164
|
-
|
|
165
|
-
/**
|
|
166
|
-
* The number of metric results to return per page, ranging between 1 and 100.
|
|
171
|
+
* Filter metric results created before or at this ISO 8601 date/time (e.g.
|
|
172
|
+
* 2024-04-30T23:59:59Z).
|
|
167
173
|
*/
|
|
168
|
-
|
|
174
|
+
end_date?: string | null;
|
|
169
175
|
|
|
170
176
|
/**
|
|
171
177
|
* The ID of the metric.
|
|
@@ -173,18 +179,16 @@ export interface ResultExportParams {
|
|
|
173
179
|
metric_id?: string | null;
|
|
174
180
|
|
|
175
181
|
/**
|
|
176
|
-
*
|
|
177
|
-
*
|
|
178
|
-
* request and receive 100 objects, ending with `metric_result_abc123`, your
|
|
179
|
-
* subsequent call can include `starting_after=metric_result_abc123` to fetch the
|
|
180
|
-
* next page of the list.
|
|
182
|
+
* Filter metric results created at or after this ISO 8601 date/time (e.g.
|
|
183
|
+
* 2024-04-01T00:00:00Z).
|
|
181
184
|
*/
|
|
182
|
-
|
|
185
|
+
start_date?: string | null;
|
|
183
186
|
}
|
|
184
187
|
|
|
185
188
|
export declare namespace Results {
|
|
186
189
|
export {
|
|
187
190
|
type ResultListResponse as ResultListResponse,
|
|
191
|
+
type ResultExportResponse as ResultExportResponse,
|
|
188
192
|
type ResultListResponsesCursorIDPage as ResultListResponsesCursorIDPage,
|
|
189
193
|
type ResultListParams as ResultListParams,
|
|
190
194
|
type ResultExportParams as ResultExportParams,
|
package/src/resources/index.ts
CHANGED
package/src/resources/infill.ts
CHANGED
|
@@ -16,8 +16,6 @@ export class Infill extends APIResource {
|
|
|
16
16
|
* **The cost is 1 credit per character of the infill text plus a fixed cost of 300
|
|
17
17
|
* credits.**
|
|
18
18
|
*
|
|
19
|
-
* Infilling is only available on `sonic-2` at this time.
|
|
20
|
-
*
|
|
21
19
|
* At least one of `left_audio` or `right_audio` must be provided.
|
|
22
20
|
*
|
|
23
21
|
* As with all generative models, there's some inherent variability, but here's
|
|
@@ -55,7 +53,8 @@ export interface InfillCreateParams {
|
|
|
55
53
|
left_audio?: Uploadable;
|
|
56
54
|
|
|
57
55
|
/**
|
|
58
|
-
* The ID of the model to use for generating audio
|
|
56
|
+
* The ID of the model to use for generating audio. Any model other than the first
|
|
57
|
+
* `"sonic"` model is supported.
|
|
59
58
|
*/
|
|
60
59
|
model_id?: string;
|
|
61
60
|
|
|
@@ -77,7 +76,7 @@ export interface InfillCreateParams {
|
|
|
77
76
|
/**
|
|
78
77
|
* The sample rate of the output audio
|
|
79
78
|
*/
|
|
80
|
-
'output_format[sample_rate]'?:
|
|
79
|
+
'output_format[sample_rate]'?: 8000 | 16000 | 22050 | 24000 | 44100 | 48000;
|
|
81
80
|
|
|
82
81
|
right_audio?: Uploadable;
|
|
83
82
|
|
|
@@ -55,26 +55,6 @@ export class PronunciationDicts extends APIResource {
|
|
|
55
55
|
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Pin a pronunciation dictionary for the authenticated user
|
|
61
|
-
*/
|
|
62
|
-
pin(id: string, options?: RequestOptions): APIPromise<void> {
|
|
63
|
-
return this._client.post(path`/pronunciation-dicts/${id}/pin`, {
|
|
64
|
-
...options,
|
|
65
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Unpin a pronunciation dictionary for the authenticated user
|
|
71
|
-
*/
|
|
72
|
-
unpin(id: string, options?: RequestOptions): APIPromise<void> {
|
|
73
|
-
return this._client.post(path`/pronunciation-dicts/${id}/unpin`, {
|
|
74
|
-
...options,
|
|
75
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
58
|
}
|
|
79
59
|
|
|
80
60
|
export type PronunciationDictsCursorIDPage = CursorIDPage<PronunciationDict>;
|