@cartesia/cartesia-js 3.0.0-b11 → 3.0.0-b12

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 (120) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/backcompat/errors.d.mts +1 -1
  3. package/backcompat/errors.d.mts.map +1 -1
  4. package/backcompat/errors.d.ts +1 -1
  5. package/backcompat/errors.d.ts.map +1 -1
  6. package/backcompat/errors.js +1 -1
  7. package/backcompat/errors.js.map +1 -1
  8. package/backcompat/errors.mjs +1 -1
  9. package/backcompat/errors.mjs.map +1 -1
  10. package/backcompat/index.d.mts.map +1 -1
  11. package/backcompat/index.d.ts.map +1 -1
  12. package/backcompat/index.js +5 -5
  13. package/backcompat/index.js.map +1 -1
  14. package/backcompat/index.mjs +5 -5
  15. package/backcompat/index.mjs.map +1 -1
  16. package/backcompat/tts-wrapper.d.mts +33 -10
  17. package/backcompat/tts-wrapper.d.mts.map +1 -1
  18. package/backcompat/tts-wrapper.d.ts +33 -10
  19. package/backcompat/tts-wrapper.d.ts.map +1 -1
  20. package/backcompat/tts-wrapper.js +83 -26
  21. package/backcompat/tts-wrapper.js.map +1 -1
  22. package/backcompat/tts-wrapper.mjs +85 -28
  23. package/backcompat/tts-wrapper.mjs.map +1 -1
  24. package/backcompat/types.d.mts +1 -1
  25. package/backcompat/types.d.mts.map +1 -1
  26. package/backcompat/types.d.ts +1 -1
  27. package/backcompat/types.d.ts.map +1 -1
  28. package/backcompat/voice-changer-wrapper.d.mts +4 -4
  29. package/backcompat/voice-changer-wrapper.d.mts.map +1 -1
  30. package/backcompat/voice-changer-wrapper.d.ts +4 -4
  31. package/backcompat/voice-changer-wrapper.d.ts.map +1 -1
  32. package/backcompat/voice-changer-wrapper.js +6 -6
  33. package/backcompat/voice-changer-wrapper.js.map +1 -1
  34. package/backcompat/voice-changer-wrapper.mjs +7 -7
  35. package/backcompat/voice-changer-wrapper.mjs.map +1 -1
  36. package/backcompat/voices-wrapper.d.mts +18 -5
  37. package/backcompat/voices-wrapper.d.mts.map +1 -1
  38. package/backcompat/voices-wrapper.d.ts +18 -5
  39. package/backcompat/voices-wrapper.d.ts.map +1 -1
  40. package/backcompat/voices-wrapper.js +63 -0
  41. package/backcompat/voices-wrapper.js.map +1 -1
  42. package/backcompat/voices-wrapper.mjs +63 -0
  43. package/backcompat/voices-wrapper.mjs.map +1 -1
  44. package/package.json +1 -1
  45. package/resources/agents/agents.d.mts +4 -4
  46. package/resources/agents/agents.d.mts.map +1 -1
  47. package/resources/agents/agents.d.ts +4 -4
  48. package/resources/agents/agents.d.ts.map +1 -1
  49. package/resources/agents/agents.js +9 -9
  50. package/resources/agents/agents.js.map +1 -1
  51. package/resources/agents/agents.mjs +9 -9
  52. package/resources/agents/agents.mjs.map +1 -1
  53. package/resources/agents/calls.d.mts +1 -1
  54. package/resources/agents/calls.d.mts.map +1 -1
  55. package/resources/agents/calls.d.ts +1 -1
  56. package/resources/agents/calls.d.ts.map +1 -1
  57. package/resources/agents/calls.js +1 -2
  58. package/resources/agents/calls.js.map +1 -1
  59. package/resources/agents/calls.mjs +1 -2
  60. package/resources/agents/calls.mjs.map +1 -1
  61. package/resources/datasets/datasets.d.mts +3 -3
  62. package/resources/datasets/datasets.d.mts.map +1 -1
  63. package/resources/datasets/datasets.d.ts +3 -3
  64. package/resources/datasets/datasets.d.ts.map +1 -1
  65. package/resources/datasets/datasets.js +1 -1
  66. package/resources/datasets/datasets.mjs +1 -1
  67. package/resources/datasets/files.d.mts +3 -3
  68. package/resources/datasets/files.d.ts +3 -3
  69. package/resources/datasets/files.js +1 -1
  70. package/resources/datasets/files.mjs +1 -1
  71. package/resources/datasets/index.d.mts +1 -1
  72. package/resources/datasets/index.d.ts +1 -1
  73. package/resources/infill.d.mts +1 -1
  74. package/resources/infill.d.mts.map +1 -1
  75. package/resources/infill.d.ts +1 -1
  76. package/resources/infill.d.ts.map +1 -1
  77. package/resources/infill.js +1 -6
  78. package/resources/infill.js.map +1 -1
  79. package/resources/infill.mjs +1 -6
  80. package/resources/infill.mjs.map +1 -1
  81. package/resources/pronunciation-dicts.d.mts +1 -1
  82. package/resources/pronunciation-dicts.d.ts +1 -1
  83. package/resources/pronunciation-dicts.js +1 -1
  84. package/resources/pronunciation-dicts.mjs +1 -1
  85. package/resources/voice-changer.d.mts +1 -1
  86. package/resources/voice-changer.d.mts.map +1 -1
  87. package/resources/voice-changer.d.ts +1 -1
  88. package/resources/voice-changer.d.ts.map +1 -1
  89. package/resources/voice-changer.js +1 -6
  90. package/resources/voice-changer.js.map +1 -1
  91. package/resources/voice-changer.mjs +1 -6
  92. package/resources/voice-changer.mjs.map +1 -1
  93. package/resources/voices.d.mts +9 -9
  94. package/resources/voices.d.mts.map +1 -1
  95. package/resources/voices.d.ts +9 -9
  96. package/resources/voices.d.ts.map +1 -1
  97. package/resources/voices.js +14 -14
  98. package/resources/voices.js.map +1 -1
  99. package/resources/voices.mjs +14 -14
  100. package/resources/voices.mjs.map +1 -1
  101. package/src/backcompat/errors.ts +32 -40
  102. package/src/backcompat/index.ts +64 -67
  103. package/src/backcompat/tts-wrapper.ts +405 -322
  104. package/src/backcompat/types.ts +13 -13
  105. package/src/backcompat/voice-changer-wrapper.ts +58 -56
  106. package/src/backcompat/voices-wrapper.ts +217 -150
  107. package/src/resources/agents/agents.ts +10 -10
  108. package/src/resources/agents/calls.ts +2 -3
  109. package/src/resources/datasets/datasets.ts +3 -3
  110. package/src/resources/datasets/files.ts +3 -3
  111. package/src/resources/datasets/index.ts +1 -1
  112. package/src/resources/infill.ts +2 -7
  113. package/src/resources/pronunciation-dicts.ts +1 -1
  114. package/src/resources/voice-changer.ts +2 -7
  115. package/src/resources/voices.ts +15 -15
  116. package/src/version.ts +1 -1
  117. package/version.d.mts +1 -1
  118. package/version.d.ts +1 -1
  119. package/version.js +1 -1
  120. package/version.mjs +1 -1
@@ -29,16 +29,11 @@ export class Infill extends APIResource {
29
29
  * keeping as much silence in the left/right audio segments as possible
30
30
  * - This helps the model generate more natural transitions
31
31
  */
32
- create(body: InfillCreateParams, options?: RequestOptions): APIPromise<Response> {
32
+ create(body: InfillCreateParams, options?: RequestOptions): APIPromise<void> {
33
33
  return this._client.post(
34
34
  '/infill/bytes',
35
35
  multipartFormRequestOptions(
36
- {
37
- body,
38
- ...options,
39
- headers: buildHeaders([{ Accept: 'audio/wav' }, options?.headers]),
40
- __binaryResponse: true,
41
- },
36
+ { body, ...options, headers: buildHeaders([{ Accept: '*/*' }, options?.headers]) },
42
37
  this._client,
43
38
  ),
44
39
  );
@@ -49,7 +49,7 @@ export class PronunciationDicts extends APIResource {
49
49
  /**
50
50
  * Delete a pronunciation dictionary
51
51
  */
52
- delete(id: string, options?: RequestOptions): APIPromise<void> {
52
+ remove(id: string, options?: RequestOptions): APIPromise<void> {
53
53
  return this._client.delete(path`/pronunciation-dicts/${id}`, {
54
54
  ...options,
55
55
  headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
@@ -15,16 +15,11 @@ export class VoiceChanger extends APIResource {
15
15
  *
16
16
  * This endpoint is priced at 15 characters per second of input audio.
17
17
  */
18
- changeVoiceBytes(body: VoiceChangerChangeVoiceBytesParams, options?: RequestOptions): APIPromise<Response> {
18
+ changeVoiceBytes(body: VoiceChangerChangeVoiceBytesParams, options?: RequestOptions): APIPromise<void> {
19
19
  return this._client.post(
20
20
  '/voice-changer/bytes',
21
21
  multipartFormRequestOptions(
22
- {
23
- body,
24
- ...options,
25
- headers: buildHeaders([{ Accept: 'audio/wav' }, options?.headers]),
26
- __binaryResponse: true,
27
- },
22
+ { body, ...options, headers: buildHeaders([{ Accept: '*/*' }, options?.headers]) },
28
23
  this._client,
29
24
  ),
30
25
  );
@@ -45,21 +45,6 @@ export class Voices extends APIResource {
45
45
  return this._client.getAPIList('/voices', CursorIDPage<Voice>, { query, ...options });
46
46
  }
47
47
 
48
- /**
49
- * Delete Voice
50
- *
51
- * @example
52
- * ```ts
53
- * await client.voices.delete('id');
54
- * ```
55
- */
56
- delete(id: string, options?: RequestOptions): APIPromise<void> {
57
- return this._client.delete(path`/voices/${id}`, {
58
- ...options,
59
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
60
- });
61
- }
62
-
63
48
  /**
64
49
  * Clone a high similarity voice from an audio clip. Clones are more similar to the
65
50
  * source clip, but may reproduce background noise. For these, use an audio clip
@@ -111,6 +96,21 @@ export class Voices extends APIResource {
111
96
  localize(body: VoiceLocalizeParams, options?: RequestOptions): APIPromise<VoiceMetadata> {
112
97
  return this._client.post('/voices/localize', { body, ...options });
113
98
  }
99
+
100
+ /**
101
+ * Delete Voice
102
+ *
103
+ * @example
104
+ * ```ts
105
+ * await client.voices.remove('id');
106
+ * ```
107
+ */
108
+ remove(id: string, options?: RequestOptions): APIPromise<void> {
109
+ return this._client.delete(path`/voices/${id}`, {
110
+ ...options,
111
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
112
+ });
113
+ }
114
114
  }
115
115
 
116
116
  export type VoicesCursorIDPage = CursorIDPage<Voice>;
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '3.0.0-b11'; // x-release-please-version
1
+ export const VERSION = '3.0.0-b12'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "3.0.0-b11";
1
+ export declare const VERSION = "3.0.0-b12";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "3.0.0-b11";
1
+ export declare const VERSION = "3.0.0-b12";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '3.0.0-b11'; // x-release-please-version
4
+ exports.VERSION = '3.0.0-b12'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '3.0.0-b11'; // x-release-please-version
1
+ export const VERSION = '3.0.0-b12'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map