@cartesia/cartesia-js 2.1.3 → 2.1.5

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 (488) hide show
  1. package/Client.d.ts +12 -5
  2. package/Client.js +11 -6
  3. package/api/resources/apiStatus/client/Client.d.ts +4 -0
  4. package/api/resources/apiStatus/client/Client.js +21 -11
  5. package/api/resources/datasets/client/Client.d.ts +4 -1
  6. package/api/resources/datasets/client/Client.js +34 -24
  7. package/api/resources/datasets/types/FilePurpose.d.ts +1 -1
  8. package/api/resources/embedding/types/Embedding.d.ts +1 -1
  9. package/api/resources/index.d.ts +2 -0
  10. package/api/resources/index.js +20 -8
  11. package/api/resources/infill/client/Client.d.ts +49 -0
  12. package/api/resources/infill/client/Client.js +148 -0
  13. package/api/resources/infill/client/index.d.ts +1 -0
  14. package/api/resources/infill/client/index.js +17 -0
  15. package/api/resources/infill/client/requests/InfillBytesRequest.d.ts +71 -0
  16. package/api/resources/infill/client/requests/InfillBytesRequest.js +5 -0
  17. package/api/resources/infill/client/requests/index.d.ts +1 -0
  18. package/api/resources/infill/client/requests/index.js +2 -0
  19. package/api/resources/infill/index.d.ts +1 -0
  20. package/api/resources/infill/index.js +17 -0
  21. package/api/resources/tts/client/Client.js +21 -11
  22. package/api/resources/tts/types/ContextId.d.ts +1 -1
  23. package/api/resources/tts/types/Emotion.d.ts +5 -1
  24. package/api/resources/tts/types/Emotion.js +4 -0
  25. package/api/resources/tts/types/FlushId.d.ts +9 -0
  26. package/api/resources/tts/types/FlushId.js +5 -0
  27. package/api/resources/tts/types/GenerationRequest.d.ts +7 -2
  28. package/api/resources/tts/types/NaturalSpecifier.d.ts +1 -1
  29. package/api/resources/tts/types/NumericalSpecifier.d.ts +1 -1
  30. package/api/resources/tts/types/OutputFormat.d.ts +1 -1
  31. package/api/resources/tts/types/PhonemeTimestamps.d.ts +8 -0
  32. package/api/resources/tts/types/PhonemeTimestamps.js +5 -0
  33. package/api/resources/tts/types/RawEncoding.d.ts +1 -1
  34. package/api/resources/tts/types/RawOutputFormat.d.ts +1 -0
  35. package/api/resources/tts/types/Speed.d.ts +1 -1
  36. package/api/resources/tts/types/SupportedLanguage.d.ts +1 -1
  37. package/api/resources/tts/types/TtsRequestVoiceSpecifier.d.ts +1 -1
  38. package/api/resources/tts/types/WebSocketFlushDoneResponse.d.ts +8 -0
  39. package/api/resources/tts/types/WebSocketFlushDoneResponse.js +5 -0
  40. package/api/resources/tts/types/WebSocketPhonemeTimestampsResponse.d.ts +7 -0
  41. package/api/resources/tts/types/WebSocketPhonemeTimestampsResponse.js +5 -0
  42. package/api/resources/tts/types/WebSocketRequest.d.ts +1 -1
  43. package/api/resources/tts/types/WebSocketResponse.d.ts +7 -1
  44. package/api/resources/tts/types/WebSocketTtsOutput.d.ts +3 -0
  45. package/api/resources/tts/types/WebSocketTtsRequest.d.ts +1 -0
  46. package/api/resources/tts/types/index.d.ts +4 -0
  47. package/api/resources/tts/types/index.js +4 -0
  48. package/api/resources/voiceChanger/client/Client.d.ts +3 -4
  49. package/api/resources/voiceChanger/client/Client.js +23 -13
  50. package/api/resources/voiceChanger/types/OutputFormatContainer.d.ts +1 -1
  51. package/api/resources/voiceChanger/types/StreamingResponse.d.ts +1 -1
  52. package/api/resources/voices/client/Client.d.ts +5 -3
  53. package/api/resources/voices/client/Client.js +56 -47
  54. package/api/resources/voices/types/BaseVoiceId.d.ts +1 -1
  55. package/api/resources/voices/types/CloneMode.d.ts +1 -1
  56. package/api/resources/voices/types/CreateVoiceRequest.d.ts +0 -1
  57. package/api/resources/voices/types/Gender.d.ts +1 -1
  58. package/api/resources/voices/types/LocalizeDialect.d.ts +12 -4
  59. package/api/resources/voices/types/LocalizeEnglishDialect.d.ts +1 -1
  60. package/api/resources/voices/types/LocalizePortugueseDialect.d.ts +8 -0
  61. package/api/resources/voices/types/LocalizePortugueseDialect.js +10 -0
  62. package/api/resources/voices/types/LocalizeSpanishDialect.d.ts +8 -0
  63. package/api/resources/voices/types/LocalizeSpanishDialect.js +10 -0
  64. package/api/resources/voices/types/LocalizeTargetLanguage.d.ts +1 -1
  65. package/api/resources/voices/types/MixVoiceSpecifier.d.ts +1 -1
  66. package/api/resources/voices/types/Voice.d.ts +0 -1
  67. package/api/resources/voices/types/VoiceId.d.ts +1 -1
  68. package/api/resources/voices/types/Weight.d.ts +1 -1
  69. package/api/resources/voices/types/index.d.ts +2 -0
  70. package/api/resources/voices/types/index.js +2 -0
  71. package/core/fetcher/APIResponse.d.ts +1 -1
  72. package/core/fetcher/Fetcher.d.ts +1 -1
  73. package/core/fetcher/Fetcher.js +2 -2
  74. package/core/fetcher/Supplier.d.ts +1 -1
  75. package/core/fetcher/createRequestUrl.d.ts +1 -1
  76. package/core/fetcher/createRequestUrl.js +1 -2
  77. package/core/fetcher/getFetchFn.js +18 -9
  78. package/core/fetcher/getHeader.js +1 -2
  79. package/core/fetcher/getRequestBody.js +5 -5
  80. package/core/fetcher/getResponseBody.js +1 -2
  81. package/core/fetcher/makeRequest.d.ts +1 -1
  82. package/core/fetcher/requestWithRetries.js +4 -5
  83. package/core/fetcher/signals.d.ts +0 -1
  84. package/core/fetcher/signals.js +2 -3
  85. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -1
  86. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +6 -4
  87. package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +1 -1
  88. package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +1 -1
  89. package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +18 -9
  90. package/core/form-data-utils/FormDataWrapper.d.ts +4 -4
  91. package/core/form-data-utils/FormDataWrapper.js +22 -12
  92. package/core/index.js +17 -7
  93. package/core/json.d.ts +15 -0
  94. package/core/json.js +24 -0
  95. package/core/runtime/runtime.d.ts +1 -1
  96. package/core/runtime/runtime.js +51 -41
  97. package/core/schemas/Schema.d.ts +7 -5
  98. package/core/schemas/Schema.js +2 -0
  99. package/core/schemas/builders/bigint/bigint.d.ts +1 -1
  100. package/core/schemas/builders/bigint/bigint.js +22 -19
  101. package/core/schemas/builders/date/date.js +1 -2
  102. package/core/schemas/builders/enum/enum.js +1 -2
  103. package/core/schemas/builders/lazy/lazy.d.ts +1 -1
  104. package/core/schemas/builders/lazy/lazy.js +3 -4
  105. package/core/schemas/builders/lazy/lazyObject.js +1 -2
  106. package/core/schemas/builders/list/list.js +1 -2
  107. package/core/schemas/builders/literals/booleanLiteral.js +1 -2
  108. package/core/schemas/builders/literals/stringLiteral.js +1 -2
  109. package/core/schemas/builders/object/object.d.ts +1 -1
  110. package/core/schemas/builders/object/object.js +31 -3
  111. package/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +3 -3
  112. package/core/schemas/builders/object/objectWithoutOptionalProperties.js +1 -2
  113. package/core/schemas/builders/object/property.js +2 -3
  114. package/core/schemas/builders/object/types.d.ts +16 -11
  115. package/core/schemas/builders/object-like/getObjectLikeUtils.js +2 -3
  116. package/core/schemas/builders/object-like/types.d.ts +1 -1
  117. package/core/schemas/builders/record/record.js +2 -4
  118. package/core/schemas/builders/record/types.d.ts +2 -2
  119. package/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +4 -0
  120. package/core/schemas/builders/schema-utils/getSchemaUtils.js +67 -4
  121. package/core/schemas/builders/schema-utils/stringifyValidationErrors.js +1 -2
  122. package/core/schemas/builders/set/set.js +1 -2
  123. package/core/schemas/builders/undiscriminated-union/types.d.ts +4 -4
  124. package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +1 -2
  125. package/core/schemas/builders/union/discriminant.js +1 -2
  126. package/core/schemas/builders/union/types.d.ts +6 -6
  127. package/core/schemas/builders/union/union.d.ts +1 -1
  128. package/core/schemas/builders/union/union.js +1 -2
  129. package/core/schemas/utils/MaybePromise.d.ts +1 -1
  130. package/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +4 -4
  131. package/core/schemas/utils/createIdentitySchemaCreator.js +1 -2
  132. package/core/schemas/utils/entries.d.ts +1 -1
  133. package/core/schemas/utils/entries.js +1 -2
  134. package/core/schemas/utils/filterObject.d.ts +1 -1
  135. package/core/schemas/utils/filterObject.js +1 -2
  136. package/core/schemas/utils/getErrorMessageForIncorrectType.js +1 -2
  137. package/core/schemas/utils/isPlainObject.js +1 -2
  138. package/core/schemas/utils/keys.d.ts +1 -1
  139. package/core/schemas/utils/keys.js +1 -2
  140. package/core/schemas/utils/maybeSkipValidation.js +1 -2
  141. package/core/schemas/utils/partition.js +1 -2
  142. package/core/streaming-fetcher/Stream.d.ts +0 -1
  143. package/core/streaming-fetcher/Stream.js +20 -21
  144. package/core/websocket/ws.d.ts +7 -7
  145. package/core/websocket/ws.js +17 -7
  146. package/dist/Client.d.ts +12 -5
  147. package/dist/Client.js +11 -6
  148. package/dist/api/resources/apiStatus/client/Client.d.ts +4 -0
  149. package/dist/api/resources/apiStatus/client/Client.js +21 -11
  150. package/dist/api/resources/datasets/client/Client.d.ts +4 -1
  151. package/dist/api/resources/datasets/client/Client.js +34 -24
  152. package/dist/api/resources/datasets/types/FilePurpose.d.ts +1 -1
  153. package/dist/api/resources/embedding/types/Embedding.d.ts +1 -1
  154. package/dist/api/resources/index.d.ts +2 -0
  155. package/dist/api/resources/index.js +20 -8
  156. package/dist/api/resources/infill/client/Client.d.ts +49 -0
  157. package/dist/api/resources/infill/client/Client.js +148 -0
  158. package/dist/api/resources/infill/client/index.d.ts +1 -0
  159. package/dist/api/resources/infill/client/index.js +17 -0
  160. package/dist/api/resources/infill/client/requests/InfillBytesRequest.d.ts +71 -0
  161. package/dist/api/resources/infill/client/requests/InfillBytesRequest.js +5 -0
  162. package/dist/api/resources/infill/client/requests/index.d.ts +1 -0
  163. package/dist/api/resources/infill/client/requests/index.js +2 -0
  164. package/dist/api/resources/infill/index.d.ts +1 -0
  165. package/dist/api/resources/infill/index.js +17 -0
  166. package/dist/api/resources/tts/client/Client.js +21 -11
  167. package/dist/api/resources/tts/types/ContextId.d.ts +1 -1
  168. package/dist/api/resources/tts/types/Emotion.d.ts +5 -1
  169. package/dist/api/resources/tts/types/Emotion.js +4 -0
  170. package/dist/api/resources/tts/types/FlushId.d.ts +9 -0
  171. package/dist/api/resources/tts/types/FlushId.js +5 -0
  172. package/dist/api/resources/tts/types/GenerationRequest.d.ts +7 -2
  173. package/dist/api/resources/tts/types/NaturalSpecifier.d.ts +1 -1
  174. package/dist/api/resources/tts/types/NumericalSpecifier.d.ts +1 -1
  175. package/dist/api/resources/tts/types/OutputFormat.d.ts +1 -1
  176. package/dist/api/resources/tts/types/PhonemeTimestamps.d.ts +8 -0
  177. package/dist/api/resources/tts/types/PhonemeTimestamps.js +5 -0
  178. package/dist/api/resources/tts/types/RawEncoding.d.ts +1 -1
  179. package/dist/api/resources/tts/types/RawOutputFormat.d.ts +1 -0
  180. package/dist/api/resources/tts/types/Speed.d.ts +1 -1
  181. package/dist/api/resources/tts/types/SupportedLanguage.d.ts +1 -1
  182. package/dist/api/resources/tts/types/TtsRequestVoiceSpecifier.d.ts +1 -1
  183. package/dist/api/resources/tts/types/WebSocketFlushDoneResponse.d.ts +8 -0
  184. package/dist/api/resources/tts/types/WebSocketFlushDoneResponse.js +5 -0
  185. package/dist/api/resources/tts/types/WebSocketPhonemeTimestampsResponse.d.ts +7 -0
  186. package/dist/api/resources/tts/types/WebSocketPhonemeTimestampsResponse.js +5 -0
  187. package/dist/api/resources/tts/types/WebSocketRequest.d.ts +1 -1
  188. package/dist/api/resources/tts/types/WebSocketResponse.d.ts +7 -1
  189. package/dist/api/resources/tts/types/WebSocketTtsOutput.d.ts +3 -0
  190. package/dist/api/resources/tts/types/WebSocketTtsRequest.d.ts +1 -0
  191. package/dist/api/resources/tts/types/index.d.ts +4 -0
  192. package/dist/api/resources/tts/types/index.js +4 -0
  193. package/dist/api/resources/voiceChanger/client/Client.d.ts +3 -4
  194. package/dist/api/resources/voiceChanger/client/Client.js +23 -13
  195. package/dist/api/resources/voiceChanger/types/OutputFormatContainer.d.ts +1 -1
  196. package/dist/api/resources/voiceChanger/types/StreamingResponse.d.ts +1 -1
  197. package/dist/api/resources/voices/client/Client.d.ts +5 -3
  198. package/dist/api/resources/voices/client/Client.js +56 -47
  199. package/dist/api/resources/voices/types/BaseVoiceId.d.ts +1 -1
  200. package/dist/api/resources/voices/types/CloneMode.d.ts +1 -1
  201. package/dist/api/resources/voices/types/CreateVoiceRequest.d.ts +0 -1
  202. package/dist/api/resources/voices/types/Gender.d.ts +1 -1
  203. package/dist/api/resources/voices/types/LocalizeDialect.d.ts +12 -4
  204. package/dist/api/resources/voices/types/LocalizeEnglishDialect.d.ts +1 -1
  205. package/dist/api/resources/voices/types/LocalizePortugueseDialect.d.ts +8 -0
  206. package/dist/api/resources/voices/types/LocalizePortugueseDialect.js +10 -0
  207. package/dist/api/resources/voices/types/LocalizeSpanishDialect.d.ts +8 -0
  208. package/dist/api/resources/voices/types/LocalizeSpanishDialect.js +10 -0
  209. package/dist/api/resources/voices/types/LocalizeTargetLanguage.d.ts +1 -1
  210. package/dist/api/resources/voices/types/MixVoiceSpecifier.d.ts +1 -1
  211. package/dist/api/resources/voices/types/Voice.d.ts +0 -1
  212. package/dist/api/resources/voices/types/VoiceId.d.ts +1 -1
  213. package/dist/api/resources/voices/types/Weight.d.ts +1 -1
  214. package/dist/api/resources/voices/types/index.d.ts +2 -0
  215. package/dist/api/resources/voices/types/index.js +2 -0
  216. package/dist/core/fetcher/APIResponse.d.ts +1 -1
  217. package/dist/core/fetcher/Fetcher.d.ts +1 -1
  218. package/dist/core/fetcher/Fetcher.js +2 -2
  219. package/dist/core/fetcher/Supplier.d.ts +1 -1
  220. package/dist/core/fetcher/createRequestUrl.d.ts +1 -1
  221. package/dist/core/fetcher/createRequestUrl.js +1 -2
  222. package/dist/core/fetcher/getFetchFn.js +18 -9
  223. package/dist/core/fetcher/getHeader.js +1 -2
  224. package/dist/core/fetcher/getRequestBody.js +5 -5
  225. package/dist/core/fetcher/getResponseBody.js +1 -2
  226. package/dist/core/fetcher/makeRequest.d.ts +1 -1
  227. package/dist/core/fetcher/requestWithRetries.js +4 -5
  228. package/dist/core/fetcher/signals.d.ts +0 -1
  229. package/dist/core/fetcher/signals.js +2 -3
  230. package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -1
  231. package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +6 -4
  232. package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +1 -1
  233. package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +1 -1
  234. package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +18 -9
  235. package/dist/core/form-data-utils/FormDataWrapper.d.ts +4 -4
  236. package/dist/core/form-data-utils/FormDataWrapper.js +22 -12
  237. package/dist/core/index.js +17 -7
  238. package/dist/core/json.d.ts +15 -0
  239. package/dist/core/json.js +24 -0
  240. package/dist/core/runtime/runtime.d.ts +1 -1
  241. package/dist/core/runtime/runtime.js +51 -41
  242. package/dist/core/schemas/Schema.d.ts +7 -5
  243. package/dist/core/schemas/Schema.js +2 -0
  244. package/dist/core/schemas/builders/bigint/bigint.d.ts +1 -1
  245. package/dist/core/schemas/builders/bigint/bigint.js +22 -19
  246. package/dist/core/schemas/builders/date/date.js +1 -2
  247. package/dist/core/schemas/builders/enum/enum.js +1 -2
  248. package/dist/core/schemas/builders/lazy/lazy.d.ts +1 -1
  249. package/dist/core/schemas/builders/lazy/lazy.js +3 -4
  250. package/dist/core/schemas/builders/lazy/lazyObject.js +1 -2
  251. package/dist/core/schemas/builders/list/list.js +1 -2
  252. package/dist/core/schemas/builders/literals/booleanLiteral.js +1 -2
  253. package/dist/core/schemas/builders/literals/stringLiteral.js +1 -2
  254. package/dist/core/schemas/builders/object/object.d.ts +1 -1
  255. package/dist/core/schemas/builders/object/object.js +31 -3
  256. package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +3 -3
  257. package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.js +1 -2
  258. package/dist/core/schemas/builders/object/property.js +2 -3
  259. package/dist/core/schemas/builders/object/types.d.ts +16 -11
  260. package/dist/core/schemas/builders/object-like/getObjectLikeUtils.js +2 -3
  261. package/dist/core/schemas/builders/object-like/types.d.ts +1 -1
  262. package/dist/core/schemas/builders/record/record.js +2 -4
  263. package/dist/core/schemas/builders/record/types.d.ts +2 -2
  264. package/dist/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +4 -0
  265. package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +67 -4
  266. package/dist/core/schemas/builders/schema-utils/stringifyValidationErrors.js +1 -2
  267. package/dist/core/schemas/builders/set/set.js +1 -2
  268. package/dist/core/schemas/builders/undiscriminated-union/types.d.ts +4 -4
  269. package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +1 -2
  270. package/dist/core/schemas/builders/union/discriminant.js +1 -2
  271. package/dist/core/schemas/builders/union/types.d.ts +6 -6
  272. package/dist/core/schemas/builders/union/union.d.ts +1 -1
  273. package/dist/core/schemas/builders/union/union.js +1 -2
  274. package/dist/core/schemas/utils/MaybePromise.d.ts +1 -1
  275. package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +4 -4
  276. package/dist/core/schemas/utils/createIdentitySchemaCreator.js +1 -2
  277. package/dist/core/schemas/utils/entries.d.ts +1 -1
  278. package/dist/core/schemas/utils/entries.js +1 -2
  279. package/dist/core/schemas/utils/filterObject.d.ts +1 -1
  280. package/dist/core/schemas/utils/filterObject.js +1 -2
  281. package/dist/core/schemas/utils/getErrorMessageForIncorrectType.js +1 -2
  282. package/dist/core/schemas/utils/isPlainObject.js +1 -2
  283. package/dist/core/schemas/utils/keys.d.ts +1 -1
  284. package/dist/core/schemas/utils/keys.js +1 -2
  285. package/dist/core/schemas/utils/maybeSkipValidation.js +1 -2
  286. package/dist/core/schemas/utils/partition.js +1 -2
  287. package/dist/core/streaming-fetcher/Stream.d.ts +0 -1
  288. package/dist/core/streaming-fetcher/Stream.js +20 -21
  289. package/dist/core/websocket/ws.d.ts +7 -7
  290. package/dist/core/websocket/ws.js +17 -7
  291. package/dist/environments.d.ts +1 -1
  292. package/dist/errors/CartesiaError.js +2 -1
  293. package/dist/errors/CartesiaTimeoutError.d.ts +1 -1
  294. package/dist/errors/CartesiaTimeoutError.js +2 -2
  295. package/dist/index.js +17 -7
  296. package/dist/serialization/resources/apiStatus/types/ApiInfo.js +17 -7
  297. package/dist/serialization/resources/datasets/types/CreateDatasetRequest.js +17 -7
  298. package/dist/serialization/resources/datasets/types/Dataset.js +17 -7
  299. package/dist/serialization/resources/datasets/types/DatasetFile.js +17 -7
  300. package/dist/serialization/resources/datasets/types/FilePurpose.js +17 -7
  301. package/dist/serialization/resources/datasets/types/PaginatedDatasetFiles.js +17 -7
  302. package/dist/serialization/resources/datasets/types/PaginatedDatasets.js +17 -7
  303. package/dist/serialization/resources/embedding/types/Embedding.js +17 -7
  304. package/dist/serialization/resources/index.js +17 -7
  305. package/dist/serialization/resources/tts/types/CancelContextRequest.js +17 -7
  306. package/dist/serialization/resources/tts/types/ContextId.js +17 -7
  307. package/dist/serialization/resources/tts/types/Controls.js +17 -7
  308. package/dist/serialization/resources/tts/types/Emotion.d.ts +1 -1
  309. package/dist/serialization/resources/tts/types/Emotion.js +21 -7
  310. package/dist/serialization/resources/tts/types/FlushId.d.ts +10 -0
  311. package/dist/serialization/resources/tts/types/FlushId.js +41 -0
  312. package/dist/serialization/resources/tts/types/GenerationRequest.d.ts +4 -2
  313. package/dist/serialization/resources/tts/types/GenerationRequest.js +21 -9
  314. package/dist/serialization/resources/tts/types/Mp3OutputFormat.js +17 -7
  315. package/dist/serialization/resources/tts/types/NaturalSpecifier.js +17 -7
  316. package/dist/serialization/resources/tts/types/NumericalSpecifier.js +17 -7
  317. package/dist/serialization/resources/tts/types/OutputFormat.js +17 -7
  318. package/dist/serialization/resources/tts/types/PhonemeTimestamps.d.ts +14 -0
  319. package/dist/serialization/resources/tts/types/PhonemeTimestamps.js +45 -0
  320. package/dist/serialization/resources/tts/types/RawEncoding.js +17 -7
  321. package/dist/serialization/resources/tts/types/RawOutputFormat.d.ts +1 -0
  322. package/dist/serialization/resources/tts/types/RawOutputFormat.js +18 -7
  323. package/dist/serialization/resources/tts/types/Speed.js +17 -7
  324. package/dist/serialization/resources/tts/types/SupportedLanguage.js +17 -7
  325. package/dist/serialization/resources/tts/types/TtsRequest.js +17 -7
  326. package/dist/serialization/resources/tts/types/TtsRequestEmbeddingSpecifier.js +17 -7
  327. package/dist/serialization/resources/tts/types/TtsRequestIdSpecifier.js +17 -7
  328. package/dist/serialization/resources/tts/types/TtsRequestVoiceSpecifier.js +17 -7
  329. package/dist/serialization/resources/tts/types/WavOutputFormat.js +17 -7
  330. package/dist/serialization/resources/tts/types/WebSocketBaseResponse.js +17 -7
  331. package/dist/serialization/resources/tts/types/WebSocketChunkResponse.js +17 -7
  332. package/dist/serialization/resources/tts/types/WebSocketDoneResponse.js +17 -7
  333. package/dist/serialization/resources/tts/types/WebSocketErrorResponse.js +17 -7
  334. package/dist/serialization/resources/tts/types/WebSocketFlushDoneResponse.d.ts +15 -0
  335. package/dist/serialization/resources/tts/types/WebSocketFlushDoneResponse.js +48 -0
  336. package/dist/serialization/resources/tts/types/WebSocketPhonemeTimestampsResponse.d.ts +14 -0
  337. package/dist/serialization/resources/tts/types/WebSocketPhonemeTimestampsResponse.js +47 -0
  338. package/dist/serialization/resources/tts/types/WebSocketRawOutputFormat.js +17 -7
  339. package/dist/serialization/resources/tts/types/WebSocketRequest.js +17 -7
  340. package/dist/serialization/resources/tts/types/WebSocketResponse.d.ts +9 -1
  341. package/dist/serialization/resources/tts/types/WebSocketResponse.js +21 -7
  342. package/dist/serialization/resources/tts/types/WebSocketStreamOptions.js +17 -7
  343. package/dist/serialization/resources/tts/types/WebSocketTimestampsResponse.js +17 -7
  344. package/dist/serialization/resources/tts/types/WebSocketTtsOutput.d.ts +5 -0
  345. package/dist/serialization/resources/tts/types/WebSocketTtsOutput.js +22 -7
  346. package/dist/serialization/resources/tts/types/WebSocketTtsRequest.d.ts +1 -0
  347. package/dist/serialization/resources/tts/types/WebSocketTtsRequest.js +18 -7
  348. package/dist/serialization/resources/tts/types/WordTimestamps.js +17 -7
  349. package/dist/serialization/resources/tts/types/index.d.ts +4 -0
  350. package/dist/serialization/resources/tts/types/index.js +4 -0
  351. package/dist/serialization/resources/voiceChanger/types/OutputFormatContainer.js +17 -7
  352. package/dist/serialization/resources/voiceChanger/types/StreamingResponse.js +17 -7
  353. package/dist/serialization/resources/voices/client/index.js +17 -7
  354. package/dist/serialization/resources/voices/client/list.js +17 -7
  355. package/dist/serialization/resources/voices/types/CloneMode.js +17 -7
  356. package/dist/serialization/resources/voices/types/CreateVoiceRequest.d.ts +0 -2
  357. package/dist/serialization/resources/voices/types/CreateVoiceRequest.js +17 -9
  358. package/dist/serialization/resources/voices/types/EmbeddingResponse.js +17 -7
  359. package/dist/serialization/resources/voices/types/EmbeddingSpecifier.js +17 -7
  360. package/dist/serialization/resources/voices/types/Gender.js +17 -7
  361. package/dist/serialization/resources/voices/types/IdSpecifier.js +17 -7
  362. package/dist/serialization/resources/voices/types/LocalizeDialect.d.ts +3 -1
  363. package/dist/serialization/resources/voices/types/LocalizeDialect.js +24 -8
  364. package/dist/serialization/resources/voices/types/LocalizeEnglishDialect.js +17 -7
  365. package/dist/serialization/resources/voices/types/LocalizePortugueseDialect.d.ts +10 -0
  366. package/dist/serialization/resources/voices/types/LocalizePortugueseDialect.js +41 -0
  367. package/dist/serialization/resources/voices/types/LocalizeSpanishDialect.d.ts +10 -0
  368. package/dist/serialization/resources/voices/types/LocalizeSpanishDialect.js +41 -0
  369. package/dist/serialization/resources/voices/types/LocalizeTargetLanguage.js +17 -7
  370. package/dist/serialization/resources/voices/types/LocalizeVoiceRequest.js +17 -7
  371. package/dist/serialization/resources/voices/types/MixVoiceSpecifier.js +17 -7
  372. package/dist/serialization/resources/voices/types/MixVoicesRequest.js +17 -7
  373. package/dist/serialization/resources/voices/types/UpdateVoiceRequest.js +17 -7
  374. package/dist/serialization/resources/voices/types/Voice.d.ts +0 -2
  375. package/dist/serialization/resources/voices/types/Voice.js +17 -9
  376. package/dist/serialization/resources/voices/types/VoiceId.js +17 -7
  377. package/dist/serialization/resources/voices/types/VoiceMetadata.js +17 -7
  378. package/dist/serialization/resources/voices/types/Weight.js +17 -7
  379. package/dist/serialization/resources/voices/types/index.d.ts +2 -0
  380. package/dist/serialization/resources/voices/types/index.js +2 -0
  381. package/dist/version.d.ts +1 -1
  382. package/dist/version.js +1 -1
  383. package/dist/wrapper/WebPlayer.js +1 -1
  384. package/dist/wrapper/Websocket.js +25 -15
  385. package/dist/wrapper/source.js +1 -1
  386. package/dist/wrapper/utils.d.ts +9 -9
  387. package/dist/wrapper/utils.js +10 -10
  388. package/environments.d.ts +1 -1
  389. package/errors/CartesiaError.js +2 -1
  390. package/errors/CartesiaTimeoutError.d.ts +1 -1
  391. package/errors/CartesiaTimeoutError.js +2 -2
  392. package/index.js +17 -7
  393. package/{jest.config.js → jest.config.mjs} +4 -1
  394. package/package.json +15 -16
  395. package/reference.md +97 -1
  396. package/scripts/rename-to-esm-files.js +115 -0
  397. package/serialization/resources/apiStatus/types/ApiInfo.js +17 -7
  398. package/serialization/resources/datasets/types/CreateDatasetRequest.js +17 -7
  399. package/serialization/resources/datasets/types/Dataset.js +17 -7
  400. package/serialization/resources/datasets/types/DatasetFile.js +17 -7
  401. package/serialization/resources/datasets/types/FilePurpose.js +17 -7
  402. package/serialization/resources/datasets/types/PaginatedDatasetFiles.js +17 -7
  403. package/serialization/resources/datasets/types/PaginatedDatasets.js +17 -7
  404. package/serialization/resources/embedding/types/Embedding.js +17 -7
  405. package/serialization/resources/index.js +17 -7
  406. package/serialization/resources/tts/types/CancelContextRequest.js +17 -7
  407. package/serialization/resources/tts/types/ContextId.js +17 -7
  408. package/serialization/resources/tts/types/Controls.js +17 -7
  409. package/serialization/resources/tts/types/Emotion.d.ts +1 -1
  410. package/serialization/resources/tts/types/Emotion.js +21 -7
  411. package/serialization/resources/tts/types/FlushId.d.ts +10 -0
  412. package/serialization/resources/tts/types/FlushId.js +41 -0
  413. package/serialization/resources/tts/types/GenerationRequest.d.ts +4 -2
  414. package/serialization/resources/tts/types/GenerationRequest.js +21 -9
  415. package/serialization/resources/tts/types/Mp3OutputFormat.js +17 -7
  416. package/serialization/resources/tts/types/NaturalSpecifier.js +17 -7
  417. package/serialization/resources/tts/types/NumericalSpecifier.js +17 -7
  418. package/serialization/resources/tts/types/OutputFormat.js +17 -7
  419. package/serialization/resources/tts/types/PhonemeTimestamps.d.ts +14 -0
  420. package/serialization/resources/tts/types/PhonemeTimestamps.js +45 -0
  421. package/serialization/resources/tts/types/RawEncoding.js +17 -7
  422. package/serialization/resources/tts/types/RawOutputFormat.d.ts +1 -0
  423. package/serialization/resources/tts/types/RawOutputFormat.js +18 -7
  424. package/serialization/resources/tts/types/Speed.js +17 -7
  425. package/serialization/resources/tts/types/SupportedLanguage.js +17 -7
  426. package/serialization/resources/tts/types/TtsRequest.js +17 -7
  427. package/serialization/resources/tts/types/TtsRequestEmbeddingSpecifier.js +17 -7
  428. package/serialization/resources/tts/types/TtsRequestIdSpecifier.js +17 -7
  429. package/serialization/resources/tts/types/TtsRequestVoiceSpecifier.js +17 -7
  430. package/serialization/resources/tts/types/WavOutputFormat.js +17 -7
  431. package/serialization/resources/tts/types/WebSocketBaseResponse.js +17 -7
  432. package/serialization/resources/tts/types/WebSocketChunkResponse.js +17 -7
  433. package/serialization/resources/tts/types/WebSocketDoneResponse.js +17 -7
  434. package/serialization/resources/tts/types/WebSocketErrorResponse.js +17 -7
  435. package/serialization/resources/tts/types/WebSocketFlushDoneResponse.d.ts +15 -0
  436. package/serialization/resources/tts/types/WebSocketFlushDoneResponse.js +48 -0
  437. package/serialization/resources/tts/types/WebSocketPhonemeTimestampsResponse.d.ts +14 -0
  438. package/serialization/resources/tts/types/WebSocketPhonemeTimestampsResponse.js +47 -0
  439. package/serialization/resources/tts/types/WebSocketRawOutputFormat.js +17 -7
  440. package/serialization/resources/tts/types/WebSocketRequest.js +17 -7
  441. package/serialization/resources/tts/types/WebSocketResponse.d.ts +9 -1
  442. package/serialization/resources/tts/types/WebSocketResponse.js +21 -7
  443. package/serialization/resources/tts/types/WebSocketStreamOptions.js +17 -7
  444. package/serialization/resources/tts/types/WebSocketTimestampsResponse.js +17 -7
  445. package/serialization/resources/tts/types/WebSocketTtsOutput.d.ts +5 -0
  446. package/serialization/resources/tts/types/WebSocketTtsOutput.js +22 -7
  447. package/serialization/resources/tts/types/WebSocketTtsRequest.d.ts +1 -0
  448. package/serialization/resources/tts/types/WebSocketTtsRequest.js +18 -7
  449. package/serialization/resources/tts/types/WordTimestamps.js +17 -7
  450. package/serialization/resources/tts/types/index.d.ts +4 -0
  451. package/serialization/resources/tts/types/index.js +4 -0
  452. package/serialization/resources/voiceChanger/types/OutputFormatContainer.js +17 -7
  453. package/serialization/resources/voiceChanger/types/StreamingResponse.js +17 -7
  454. package/serialization/resources/voices/client/index.js +17 -7
  455. package/serialization/resources/voices/client/list.js +17 -7
  456. package/serialization/resources/voices/types/CloneMode.js +17 -7
  457. package/serialization/resources/voices/types/CreateVoiceRequest.d.ts +0 -2
  458. package/serialization/resources/voices/types/CreateVoiceRequest.js +17 -9
  459. package/serialization/resources/voices/types/EmbeddingResponse.js +17 -7
  460. package/serialization/resources/voices/types/EmbeddingSpecifier.js +17 -7
  461. package/serialization/resources/voices/types/Gender.js +17 -7
  462. package/serialization/resources/voices/types/IdSpecifier.js +17 -7
  463. package/serialization/resources/voices/types/LocalizeDialect.d.ts +3 -1
  464. package/serialization/resources/voices/types/LocalizeDialect.js +24 -8
  465. package/serialization/resources/voices/types/LocalizeEnglishDialect.js +17 -7
  466. package/serialization/resources/voices/types/LocalizePortugueseDialect.d.ts +10 -0
  467. package/serialization/resources/voices/types/LocalizePortugueseDialect.js +41 -0
  468. package/serialization/resources/voices/types/LocalizeSpanishDialect.d.ts +10 -0
  469. package/serialization/resources/voices/types/LocalizeSpanishDialect.js +41 -0
  470. package/serialization/resources/voices/types/LocalizeTargetLanguage.js +17 -7
  471. package/serialization/resources/voices/types/LocalizeVoiceRequest.js +17 -7
  472. package/serialization/resources/voices/types/MixVoiceSpecifier.js +17 -7
  473. package/serialization/resources/voices/types/MixVoicesRequest.js +17 -7
  474. package/serialization/resources/voices/types/UpdateVoiceRequest.js +17 -7
  475. package/serialization/resources/voices/types/Voice.d.ts +0 -2
  476. package/serialization/resources/voices/types/Voice.js +17 -9
  477. package/serialization/resources/voices/types/VoiceId.js +17 -7
  478. package/serialization/resources/voices/types/VoiceMetadata.js +17 -7
  479. package/serialization/resources/voices/types/Weight.js +17 -7
  480. package/serialization/resources/voices/types/index.d.ts +2 -0
  481. package/serialization/resources/voices/types/index.js +2 -0
  482. package/version.d.ts +1 -1
  483. package/version.js +1 -1
  484. package/wrapper/WebPlayer.js +1 -1
  485. package/wrapper/Websocket.js +25 -15
  486. package/wrapper/source.js +1 -1
  487. package/wrapper/utils.d.ts +9 -9
  488. package/wrapper/utils.js +10 -10
@@ -18,23 +18,31 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
18
18
  }) : function(o, v) {
19
19
  o["default"] = v;
20
20
  });
21
- var __importStar = (this && this.__importStar) || function (mod) {
22
- if (mod && mod.__esModule) return mod;
23
- var result = {};
24
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
- __setModuleDefault(result, mod);
26
- return result;
27
- };
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
28
38
  Object.defineProperty(exports, "__esModule", { value: true });
29
39
  exports.CreateVoiceRequest = void 0;
30
40
  const core = __importStar(require("../../../../core"));
31
41
  const Embedding_1 = require("../../embedding/types/Embedding");
32
42
  const SupportedLanguage_1 = require("../../tts/types/SupportedLanguage");
33
- const BaseVoiceId_1 = require("./BaseVoiceId");
34
43
  exports.CreateVoiceRequest = core.serialization.object({
35
44
  name: core.serialization.string(),
36
45
  description: core.serialization.string(),
37
46
  embedding: Embedding_1.Embedding,
38
47
  language: SupportedLanguage_1.SupportedLanguage.optional(),
39
- baseVoiceId: core.serialization.property("base_voice_id", BaseVoiceId_1.BaseVoiceId.optional()),
40
48
  });
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
18
18
  }) : function(o, v) {
19
19
  o["default"] = v;
20
20
  });
21
- var __importStar = (this && this.__importStar) || function (mod) {
22
- if (mod && mod.__esModule) return mod;
23
- var result = {};
24
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
- __setModuleDefault(result, mod);
26
- return result;
27
- };
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
28
38
  Object.defineProperty(exports, "__esModule", { value: true });
29
39
  exports.EmbeddingResponse = void 0;
30
40
  const core = __importStar(require("../../../../core"));
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
18
18
  }) : function(o, v) {
19
19
  o["default"] = v;
20
20
  });
21
- var __importStar = (this && this.__importStar) || function (mod) {
22
- if (mod && mod.__esModule) return mod;
23
- var result = {};
24
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
- __setModuleDefault(result, mod);
26
- return result;
27
- };
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
28
38
  Object.defineProperty(exports, "__esModule", { value: true });
29
39
  exports.EmbeddingSpecifier = void 0;
30
40
  const core = __importStar(require("../../../../core"));
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
18
18
  }) : function(o, v) {
19
19
  o["default"] = v;
20
20
  });
21
- var __importStar = (this && this.__importStar) || function (mod) {
22
- if (mod && mod.__esModule) return mod;
23
- var result = {};
24
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
- __setModuleDefault(result, mod);
26
- return result;
27
- };
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
28
38
  Object.defineProperty(exports, "__esModule", { value: true });
29
39
  exports.Gender = void 0;
30
40
  const core = __importStar(require("../../../../core"));
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
18
18
  }) : function(o, v) {
19
19
  o["default"] = v;
20
20
  });
21
- var __importStar = (this && this.__importStar) || function (mod) {
22
- if (mod && mod.__esModule) return mod;
23
- var result = {};
24
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
- __setModuleDefault(result, mod);
26
- return result;
27
- };
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
28
38
  Object.defineProperty(exports, "__esModule", { value: true });
29
39
  exports.IdSpecifier = void 0;
30
40
  const core = __importStar(require("../../../../core"));
@@ -5,7 +5,9 @@ import * as serializers from "../../../index";
5
5
  import * as Cartesia from "../../../../api/index";
6
6
  import * as core from "../../../../core";
7
7
  import { LocalizeEnglishDialect } from "./LocalizeEnglishDialect";
8
+ import { LocalizeSpanishDialect } from "./LocalizeSpanishDialect";
9
+ import { LocalizePortugueseDialect } from "./LocalizePortugueseDialect";
8
10
  export declare const LocalizeDialect: core.serialization.Schema<serializers.LocalizeDialect.Raw, Cartesia.LocalizeDialect>;
9
11
  export declare namespace LocalizeDialect {
10
- type Raw = LocalizeEnglishDialect.Raw;
12
+ type Raw = LocalizeEnglishDialect.Raw | LocalizeSpanishDialect.Raw | LocalizePortugueseDialect.Raw;
11
13
  }
@@ -18,15 +18,31 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
18
18
  }) : function(o, v) {
19
19
  o["default"] = v;
20
20
  });
21
- var __importStar = (this && this.__importStar) || function (mod) {
22
- if (mod && mod.__esModule) return mod;
23
- var result = {};
24
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
- __setModuleDefault(result, mod);
26
- return result;
27
- };
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
28
38
  Object.defineProperty(exports, "__esModule", { value: true });
29
39
  exports.LocalizeDialect = void 0;
30
40
  const core = __importStar(require("../../../../core"));
31
41
  const LocalizeEnglishDialect_1 = require("./LocalizeEnglishDialect");
32
- exports.LocalizeDialect = core.serialization.undiscriminatedUnion([LocalizeEnglishDialect_1.LocalizeEnglishDialect]);
42
+ const LocalizeSpanishDialect_1 = require("./LocalizeSpanishDialect");
43
+ const LocalizePortugueseDialect_1 = require("./LocalizePortugueseDialect");
44
+ exports.LocalizeDialect = core.serialization.undiscriminatedUnion([
45
+ LocalizeEnglishDialect_1.LocalizeEnglishDialect,
46
+ LocalizeSpanishDialect_1.LocalizeSpanishDialect,
47
+ LocalizePortugueseDialect_1.LocalizePortugueseDialect,
48
+ ]);
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
18
18
  }) : function(o, v) {
19
19
  o["default"] = v;
20
20
  });
21
- var __importStar = (this && this.__importStar) || function (mod) {
22
- if (mod && mod.__esModule) return mod;
23
- var result = {};
24
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
- __setModuleDefault(result, mod);
26
- return result;
27
- };
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
28
38
  Object.defineProperty(exports, "__esModule", { value: true });
29
39
  exports.LocalizeEnglishDialect = void 0;
30
40
  const core = __importStar(require("../../../../core"));
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../../../index";
5
+ import * as Cartesia from "../../../../api/index";
6
+ import * as core from "../../../../core";
7
+ export declare const LocalizePortugueseDialect: core.serialization.Schema<serializers.LocalizePortugueseDialect.Raw, Cartesia.LocalizePortugueseDialect>;
8
+ export declare namespace LocalizePortugueseDialect {
9
+ type Raw = "br" | "eu";
10
+ }
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.LocalizePortugueseDialect = void 0;
40
+ const core = __importStar(require("../../../../core"));
41
+ exports.LocalizePortugueseDialect = core.serialization.enum_(["br", "eu"]);
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../../../index";
5
+ import * as Cartesia from "../../../../api/index";
6
+ import * as core from "../../../../core";
7
+ export declare const LocalizeSpanishDialect: core.serialization.Schema<serializers.LocalizeSpanishDialect.Raw, Cartesia.LocalizeSpanishDialect>;
8
+ export declare namespace LocalizeSpanishDialect {
9
+ type Raw = "mx" | "pe";
10
+ }
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.LocalizeSpanishDialect = void 0;
40
+ const core = __importStar(require("../../../../core"));
41
+ exports.LocalizeSpanishDialect = core.serialization.enum_(["mx", "pe"]);
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
18
18
  }) : function(o, v) {
19
19
  o["default"] = v;
20
20
  });
21
- var __importStar = (this && this.__importStar) || function (mod) {
22
- if (mod && mod.__esModule) return mod;
23
- var result = {};
24
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
- __setModuleDefault(result, mod);
26
- return result;
27
- };
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
28
38
  Object.defineProperty(exports, "__esModule", { value: true });
29
39
  exports.LocalizeTargetLanguage = void 0;
30
40
  const core = __importStar(require("../../../../core"));
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
18
18
  }) : function(o, v) {
19
19
  o["default"] = v;
20
20
  });
21
- var __importStar = (this && this.__importStar) || function (mod) {
22
- if (mod && mod.__esModule) return mod;
23
- var result = {};
24
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
- __setModuleDefault(result, mod);
26
- return result;
27
- };
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
28
38
  Object.defineProperty(exports, "__esModule", { value: true });
29
39
  exports.LocalizeVoiceRequest = void 0;
30
40
  const core = __importStar(require("../../../../core"));
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
18
18
  }) : function(o, v) {
19
19
  o["default"] = v;
20
20
  });
21
- var __importStar = (this && this.__importStar) || function (mod) {
22
- if (mod && mod.__esModule) return mod;
23
- var result = {};
24
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
- __setModuleDefault(result, mod);
26
- return result;
27
- };
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
28
38
  Object.defineProperty(exports, "__esModule", { value: true });
29
39
  exports.MixVoiceSpecifier = void 0;
30
40
  const core = __importStar(require("../../../../core"));
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
18
18
  }) : function(o, v) {
19
19
  o["default"] = v;
20
20
  });
21
- var __importStar = (this && this.__importStar) || function (mod) {
22
- if (mod && mod.__esModule) return mod;
23
- var result = {};
24
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
- __setModuleDefault(result, mod);
26
- return result;
27
- };
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
28
38
  Object.defineProperty(exports, "__esModule", { value: true });
29
39
  exports.MixVoicesRequest = void 0;
30
40
  const core = __importStar(require("../../../../core"));
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
18
18
  }) : function(o, v) {
19
19
  o["default"] = v;
20
20
  });
21
- var __importStar = (this && this.__importStar) || function (mod) {
22
- if (mod && mod.__esModule) return mod;
23
- var result = {};
24
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
- __setModuleDefault(result, mod);
26
- return result;
27
- };
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
28
38
  Object.defineProperty(exports, "__esModule", { value: true });
29
39
  exports.UpdateVoiceRequest = void 0;
30
40
  const core = __importStar(require("../../../../core"));
@@ -7,7 +7,6 @@ import * as core from "../../../../core";
7
7
  import { VoiceId } from "./VoiceId";
8
8
  import { Embedding } from "../../embedding/types/Embedding";
9
9
  import { SupportedLanguage } from "../../tts/types/SupportedLanguage";
10
- import { BaseVoiceId } from "./BaseVoiceId";
11
10
  export declare const Voice: core.serialization.ObjectSchema<serializers.Voice.Raw, Cartesia.Voice>;
12
11
  export declare namespace Voice {
13
12
  interface Raw {
@@ -19,6 +18,5 @@ export declare namespace Voice {
19
18
  created_at: string;
20
19
  embedding: Embedding.Raw;
21
20
  language: SupportedLanguage.Raw;
22
- base_voice_id?: BaseVoiceId.Raw | null;
23
21
  }
24
22
  }
@@ -18,20 +18,29 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
18
18
  }) : function(o, v) {
19
19
  o["default"] = v;
20
20
  });
21
- var __importStar = (this && this.__importStar) || function (mod) {
22
- if (mod && mod.__esModule) return mod;
23
- var result = {};
24
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
- __setModuleDefault(result, mod);
26
- return result;
27
- };
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
28
38
  Object.defineProperty(exports, "__esModule", { value: true });
29
39
  exports.Voice = void 0;
30
40
  const core = __importStar(require("../../../../core"));
31
41
  const VoiceId_1 = require("./VoiceId");
32
42
  const Embedding_1 = require("../../embedding/types/Embedding");
33
43
  const SupportedLanguage_1 = require("../../tts/types/SupportedLanguage");
34
- const BaseVoiceId_1 = require("./BaseVoiceId");
35
44
  exports.Voice = core.serialization.object({
36
45
  id: VoiceId_1.VoiceId,
37
46
  userId: core.serialization.property("user_id", core.serialization.string().optional()),
@@ -41,5 +50,4 @@ exports.Voice = core.serialization.object({
41
50
  createdAt: core.serialization.property("created_at", core.serialization.date()),
42
51
  embedding: Embedding_1.Embedding,
43
52
  language: SupportedLanguage_1.SupportedLanguage,
44
- baseVoiceId: core.serialization.property("base_voice_id", BaseVoiceId_1.BaseVoiceId.optional()),
45
53
  });
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
18
18
  }) : function(o, v) {
19
19
  o["default"] = v;
20
20
  });
21
- var __importStar = (this && this.__importStar) || function (mod) {
22
- if (mod && mod.__esModule) return mod;
23
- var result = {};
24
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
- __setModuleDefault(result, mod);
26
- return result;
27
- };
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
28
38
  Object.defineProperty(exports, "__esModule", { value: true });
29
39
  exports.VoiceId = void 0;
30
40
  const core = __importStar(require("../../../../core"));