@cartesia/cartesia-js 2.2.9 → 3.0.0-b11
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 +120 -0
- package/LICENSE +201 -0
- package/README.md +273 -516
- package/api-promise.d.mts +2 -0
- package/api-promise.d.mts.map +1 -0
- package/api-promise.d.ts +2 -0
- package/api-promise.d.ts.map +1 -0
- package/api-promise.js +6 -0
- package/api-promise.js.map +1 -0
- package/api-promise.mjs +2 -0
- package/api-promise.mjs.map +1 -0
- package/backcompat/errors.d.mts +16 -0
- package/backcompat/errors.d.mts.map +1 -0
- package/backcompat/errors.d.ts +16 -0
- package/backcompat/errors.d.ts.map +1 -0
- package/backcompat/errors.js +46 -0
- package/backcompat/errors.js.map +1 -0
- package/backcompat/errors.mjs +40 -0
- package/backcompat/errors.mjs.map +1 -0
- package/backcompat/index.d.mts +22 -0
- package/backcompat/index.d.mts.map +1 -0
- package/backcompat/index.d.ts +22 -0
- package/backcompat/index.d.ts.map +1 -0
- package/backcompat/index.js +77 -0
- package/backcompat/index.js.map +1 -0
- package/backcompat/index.mjs +72 -0
- package/backcompat/index.mjs.map +1 -0
- package/backcompat/tts-wrapper.d.mts +86 -0
- package/backcompat/tts-wrapper.d.mts.map +1 -0
- package/backcompat/tts-wrapper.d.ts +86 -0
- package/backcompat/tts-wrapper.d.ts.map +1 -0
- package/backcompat/tts-wrapper.js +269 -0
- package/backcompat/tts-wrapper.js.map +1 -0
- package/backcompat/tts-wrapper.mjs +263 -0
- package/backcompat/tts-wrapper.mjs.map +1 -0
- package/backcompat/types.d.mts +18 -0
- package/backcompat/types.d.mts.map +1 -0
- package/backcompat/types.d.ts +18 -0
- package/backcompat/types.d.ts.map +1 -0
- package/backcompat/types.js +3 -0
- package/backcompat/types.js.map +1 -0
- package/backcompat/types.mjs +2 -0
- package/backcompat/types.mjs.map +1 -0
- package/backcompat/voice-changer-wrapper.d.mts +19 -0
- package/backcompat/voice-changer-wrapper.d.mts.map +1 -0
- package/backcompat/voice-changer-wrapper.d.ts +19 -0
- package/backcompat/voice-changer-wrapper.d.ts.map +1 -0
- package/backcompat/voice-changer-wrapper.js +49 -0
- package/backcompat/voice-changer-wrapper.js.map +1 -0
- package/backcompat/voice-changer-wrapper.mjs +45 -0
- package/backcompat/voice-changer-wrapper.mjs.map +1 -0
- package/backcompat/voices-wrapper.d.mts +36 -0
- package/backcompat/voices-wrapper.d.mts.map +1 -0
- package/backcompat/voices-wrapper.d.ts +36 -0
- package/backcompat/voices-wrapper.d.ts.map +1 -0
- package/backcompat/voices-wrapper.js +82 -0
- package/backcompat/voices-wrapper.js.map +1 -0
- package/backcompat/voices-wrapper.mjs +78 -0
- package/backcompat/voices-wrapper.mjs.map +1 -0
- package/client.d.mts +220 -0
- package/client.d.mts.map +1 -0
- package/client.d.ts +220 -0
- package/client.d.ts.map +1 -0
- package/client.js +517 -0
- package/client.js.map +1 -0
- package/client.mjs +513 -0
- package/client.mjs.map +1 -0
- package/core/EventEmitter.d.mts +45 -0
- package/core/EventEmitter.d.mts.map +1 -0
- package/core/EventEmitter.d.ts +45 -0
- package/core/EventEmitter.d.ts.map +1 -0
- package/core/EventEmitter.js +79 -0
- package/core/EventEmitter.js.map +1 -0
- package/core/EventEmitter.mjs +75 -0
- package/core/EventEmitter.mjs.map +1 -0
- package/core/api-promise.d.mts +46 -0
- package/core/api-promise.d.mts.map +1 -0
- package/core/api-promise.d.ts +46 -0
- package/core/api-promise.d.ts.map +1 -0
- package/core/api-promise.js +74 -0
- package/core/api-promise.js.map +1 -0
- package/core/api-promise.mjs +70 -0
- package/core/api-promise.mjs.map +1 -0
- package/core/error.d.mts +46 -0
- package/core/error.d.mts.map +1 -0
- package/core/error.d.ts +46 -0
- package/core/error.d.ts.map +1 -0
- package/core/error.js +113 -0
- package/core/error.js.map +1 -0
- package/core/error.mjs +97 -0
- package/core/error.mjs.map +1 -0
- package/core/pagination.d.mts +54 -0
- package/core/pagination.d.mts.map +1 -0
- package/core/pagination.d.ts +54 -0
- package/core/pagination.d.ts.map +1 -0
- package/core/pagination.js +115 -0
- package/core/pagination.js.map +1 -0
- package/core/pagination.mjs +109 -0
- package/core/pagination.mjs.map +1 -0
- package/core/resource.d.mts +6 -0
- package/core/resource.d.mts.map +1 -0
- package/core/resource.d.ts +6 -0
- package/core/resource.d.ts.map +1 -0
- package/core/resource.js +11 -0
- package/core/resource.js.map +1 -0
- package/core/resource.mjs +7 -0
- package/core/resource.mjs.map +1 -0
- package/core/uploads.d.mts +3 -0
- package/core/uploads.d.mts.map +1 -0
- package/core/uploads.d.ts +3 -0
- package/core/uploads.d.ts.map +1 -0
- package/core/uploads.js +6 -0
- package/core/uploads.js.map +1 -0
- package/core/uploads.mjs +2 -0
- package/core/uploads.mjs.map +1 -0
- package/error.d.mts +2 -0
- package/error.d.mts.map +1 -0
- package/error.d.ts +2 -0
- package/error.d.ts.map +1 -0
- package/error.js +6 -0
- package/error.js.map +1 -0
- package/error.mjs +2 -0
- package/error.mjs.map +1 -0
- package/index.d.mts +8 -0
- package/index.d.mts.map +1 -0
- package/index.d.ts +8 -7
- package/index.d.ts.map +1 -0
- package/index.js +32 -51
- package/index.js.map +1 -0
- package/index.mjs +9 -0
- package/index.mjs.map +1 -0
- package/internal/builtin-types.d.mts +73 -0
- package/internal/builtin-types.d.mts.map +1 -0
- package/internal/builtin-types.d.ts +73 -0
- package/internal/builtin-types.d.ts.map +1 -0
- package/internal/builtin-types.js +4 -0
- package/internal/builtin-types.js.map +1 -0
- package/internal/builtin-types.mjs +3 -0
- package/internal/builtin-types.mjs.map +1 -0
- package/internal/detect-platform.d.mts +15 -0
- package/internal/detect-platform.d.mts.map +1 -0
- package/internal/detect-platform.d.ts +15 -0
- package/internal/detect-platform.d.ts.map +1 -0
- package/internal/detect-platform.js +162 -0
- package/internal/detect-platform.js.map +1 -0
- package/internal/detect-platform.mjs +157 -0
- package/internal/detect-platform.mjs.map +1 -0
- package/internal/errors.d.mts +3 -0
- package/internal/errors.d.mts.map +1 -0
- package/internal/errors.d.ts +3 -0
- package/internal/errors.d.ts.map +1 -0
- package/internal/errors.js +41 -0
- package/internal/errors.js.map +1 -0
- package/internal/errors.mjs +36 -0
- package/internal/errors.mjs.map +1 -0
- package/internal/headers.d.mts +20 -0
- package/internal/headers.d.mts.map +1 -0
- package/internal/headers.d.ts +20 -0
- package/internal/headers.d.ts.map +1 -0
- package/internal/headers.js +79 -0
- package/internal/headers.js.map +1 -0
- package/internal/headers.mjs +74 -0
- package/internal/headers.mjs.map +1 -0
- package/internal/parse.d.mts +12 -0
- package/internal/parse.d.mts.map +1 -0
- package/internal/parse.d.ts +12 -0
- package/internal/parse.d.ts.map +1 -0
- package/internal/parse.js +35 -0
- package/internal/parse.js.map +1 -0
- package/internal/parse.mjs +32 -0
- package/internal/parse.mjs.map +1 -0
- package/internal/qs/formats.d.mts +7 -0
- package/internal/qs/formats.d.mts.map +1 -0
- package/internal/qs/formats.d.ts +7 -0
- package/internal/qs/formats.d.ts.map +1 -0
- package/internal/qs/formats.js +13 -0
- package/internal/qs/formats.js.map +1 -0
- package/internal/qs/formats.mjs +9 -0
- package/internal/qs/formats.mjs.map +1 -0
- package/internal/qs/index.d.mts +10 -0
- package/internal/qs/index.d.mts.map +1 -0
- package/internal/qs/index.d.ts +10 -0
- package/internal/qs/index.d.ts.map +1 -0
- package/internal/qs/index.js +14 -0
- package/internal/qs/index.js.map +1 -0
- package/internal/qs/index.mjs +10 -0
- package/internal/qs/index.mjs.map +1 -0
- package/internal/qs/stringify.d.mts +3 -0
- package/internal/qs/stringify.d.mts.map +1 -0
- package/internal/qs/stringify.d.ts +3 -0
- package/internal/qs/stringify.d.ts.map +1 -0
- package/internal/qs/stringify.js +277 -0
- package/internal/qs/stringify.js.map +1 -0
- package/internal/qs/stringify.mjs +274 -0
- package/internal/qs/stringify.mjs.map +1 -0
- package/internal/qs/types.d.mts +57 -0
- package/internal/qs/types.d.mts.map +1 -0
- package/internal/qs/types.d.ts +57 -0
- package/internal/qs/types.d.ts.map +1 -0
- package/internal/qs/types.js +3 -0
- package/internal/qs/types.js.map +1 -0
- package/internal/qs/types.mjs +2 -0
- package/internal/qs/types.mjs.map +1 -0
- package/internal/qs/utils.d.mts +15 -0
- package/internal/qs/utils.d.mts.map +1 -0
- package/internal/qs/utils.d.ts +15 -0
- package/internal/qs/utils.d.ts.map +1 -0
- package/internal/qs/utils.js +230 -0
- package/internal/qs/utils.js.map +1 -0
- package/internal/qs/utils.mjs +217 -0
- package/internal/qs/utils.mjs.map +1 -0
- package/internal/request-options.d.mts +75 -0
- package/internal/request-options.d.mts.map +1 -0
- package/internal/request-options.d.ts +75 -0
- package/internal/request-options.d.ts.map +1 -0
- package/internal/request-options.js +14 -0
- package/internal/request-options.js.map +1 -0
- package/internal/request-options.mjs +10 -0
- package/internal/request-options.mjs.map +1 -0
- package/internal/shim-types.d.mts +17 -0
- package/internal/shim-types.d.mts.map +1 -0
- package/internal/shim-types.d.ts +17 -0
- package/internal/shim-types.d.ts.map +1 -0
- package/internal/shim-types.js +4 -0
- package/internal/shim-types.js.map +1 -0
- package/internal/shim-types.mjs +3 -0
- package/internal/shim-types.mjs.map +1 -0
- package/internal/shims.d.mts +20 -0
- package/internal/shims.d.mts.map +1 -0
- package/internal/shims.d.ts +20 -0
- package/internal/shims.d.ts.map +1 -0
- package/internal/shims.js +92 -0
- package/internal/shims.js.map +1 -0
- package/internal/shims.mjs +85 -0
- package/internal/shims.mjs.map +1 -0
- package/internal/to-file.d.mts +45 -0
- package/internal/to-file.d.mts.map +1 -0
- package/internal/to-file.d.ts +45 -0
- package/internal/to-file.d.ts.map +1 -0
- package/internal/to-file.js +91 -0
- package/internal/to-file.js.map +1 -0
- package/internal/to-file.mjs +88 -0
- package/internal/to-file.mjs.map +1 -0
- package/internal/tslib.js +85 -0
- package/internal/tslib.mjs +17 -0
- package/internal/types.d.mts +69 -0
- package/internal/types.d.mts.map +1 -0
- package/internal/types.d.ts +69 -0
- package/internal/types.d.ts.map +1 -0
- package/internal/types.js +4 -0
- package/internal/types.js.map +1 -0
- package/internal/types.mjs +3 -0
- package/internal/types.mjs.map +1 -0
- package/internal/uploads.d.mts +42 -0
- package/internal/uploads.d.mts.map +1 -0
- package/internal/uploads.d.ts +42 -0
- package/internal/uploads.d.ts.map +1 -0
- package/internal/uploads.js +141 -0
- package/internal/uploads.js.map +1 -0
- package/internal/uploads.mjs +131 -0
- package/internal/uploads.mjs.map +1 -0
- package/internal/utils/base64.d.mts +3 -0
- package/internal/utils/base64.d.mts.map +1 -0
- package/internal/utils/base64.d.ts +3 -0
- package/internal/utils/base64.d.ts.map +1 -0
- package/internal/utils/base64.js +38 -0
- package/internal/utils/base64.js.map +1 -0
- package/internal/utils/base64.mjs +33 -0
- package/internal/utils/base64.mjs.map +1 -0
- package/internal/utils/bytes.d.mts +4 -0
- package/internal/utils/bytes.d.mts.map +1 -0
- package/internal/utils/bytes.d.ts +4 -0
- package/internal/utils/bytes.d.ts.map +1 -0
- package/internal/utils/bytes.js +31 -0
- package/internal/utils/bytes.js.map +1 -0
- package/internal/utils/bytes.mjs +26 -0
- package/internal/utils/bytes.mjs.map +1 -0
- package/internal/utils/env.d.mts +9 -0
- package/internal/utils/env.d.mts.map +1 -0
- package/internal/utils/env.d.ts +9 -0
- package/internal/utils/env.d.ts.map +1 -0
- package/internal/utils/env.js +22 -0
- package/internal/utils/env.js.map +1 -0
- package/internal/utils/env.mjs +18 -0
- package/internal/utils/env.mjs.map +1 -0
- package/internal/utils/log.d.mts +37 -0
- package/internal/utils/log.d.mts.map +1 -0
- package/internal/utils/log.d.ts +37 -0
- package/internal/utils/log.d.ts.map +1 -0
- package/internal/utils/log.js +85 -0
- package/internal/utils/log.js.map +1 -0
- package/internal/utils/log.mjs +79 -0
- package/internal/utils/log.mjs.map +1 -0
- package/internal/utils/path.d.mts +15 -0
- package/internal/utils/path.d.mts.map +1 -0
- package/internal/utils/path.d.ts +15 -0
- package/internal/utils/path.d.ts.map +1 -0
- package/internal/utils/path.js +79 -0
- package/internal/utils/path.js.map +1 -0
- package/internal/utils/path.mjs +74 -0
- package/internal/utils/path.mjs.map +1 -0
- package/internal/utils/sleep.d.mts +2 -0
- package/internal/utils/sleep.d.mts.map +1 -0
- package/internal/utils/sleep.d.ts +2 -0
- package/internal/utils/sleep.d.ts.map +1 -0
- package/internal/utils/sleep.js +7 -0
- package/internal/utils/sleep.js.map +1 -0
- package/internal/utils/sleep.mjs +3 -0
- package/internal/utils/sleep.mjs.map +1 -0
- package/internal/utils/uuid.d.mts +5 -0
- package/internal/utils/uuid.d.mts.map +1 -0
- package/internal/utils/uuid.d.ts +5 -0
- package/internal/utils/uuid.d.ts.map +1 -0
- package/internal/utils/uuid.js +19 -0
- package/internal/utils/uuid.js.map +1 -0
- package/internal/utils/uuid.mjs +15 -0
- package/internal/utils/uuid.mjs.map +1 -0
- package/internal/utils/values.d.mts +18 -0
- package/internal/utils/values.d.mts.map +1 -0
- package/internal/utils/values.d.ts +18 -0
- package/internal/utils/values.d.ts.map +1 -0
- package/internal/utils/values.js +112 -0
- package/internal/utils/values.js.map +1 -0
- package/internal/utils/values.mjs +94 -0
- package/internal/utils/values.mjs.map +1 -0
- package/internal/utils.d.mts +7 -0
- package/internal/utils.d.mts.map +1 -0
- package/internal/utils.d.ts +7 -0
- package/internal/utils.d.ts.map +1 -0
- package/internal/utils.js +11 -0
- package/internal/utils.js.map +1 -0
- package/internal/utils.mjs +8 -0
- package/internal/utils.mjs.map +1 -0
- package/package.json +164 -45
- package/pagination.d.mts +2 -0
- package/pagination.d.mts.map +1 -0
- package/pagination.d.ts +2 -0
- package/pagination.d.ts.map +1 -0
- package/pagination.js +6 -0
- package/pagination.js.map +1 -0
- package/pagination.mjs +2 -0
- package/pagination.mjs.map +1 -0
- package/resource.d.mts +2 -0
- package/resource.d.mts.map +1 -0
- package/resource.d.ts +2 -0
- package/resource.d.ts.map +1 -0
- package/resource.js +6 -0
- package/resource.js.map +1 -0
- package/resource.mjs +2 -0
- package/resource.mjs.map +1 -0
- package/resources/access-token.d.mts +53 -0
- package/resources/access-token.d.mts.map +1 -0
- package/resources/access-token.d.ts +53 -0
- package/resources/access-token.d.ts.map +1 -0
- package/resources/access-token.js +16 -0
- package/resources/access-token.js.map +1 -0
- package/resources/access-token.mjs +12 -0
- package/resources/access-token.mjs.map +1 -0
- package/resources/agents/agents.d.mts +244 -0
- package/resources/agents/agents.d.mts.map +1 -0
- package/resources/agents/agents.d.ts +244 -0
- package/resources/agents/agents.d.ts.map +1 -0
- package/resources/agents/agents.js +68 -0
- package/resources/agents/agents.js.map +1 -0
- package/resources/agents/agents.mjs +63 -0
- package/resources/agents/agents.mjs.map +1 -0
- package/resources/agents/calls.d.mts +218 -0
- package/resources/agents/calls.d.mts.map +1 -0
- package/resources/agents/calls.d.ts +218 -0
- package/resources/agents/calls.d.ts.map +1 -0
- package/resources/agents/calls.js +37 -0
- package/resources/agents/calls.js.map +1 -0
- package/resources/agents/calls.mjs +33 -0
- package/resources/agents/calls.mjs.map +1 -0
- package/resources/agents/deployments.d.mts +92 -0
- package/resources/agents/deployments.d.mts.map +1 -0
- package/resources/agents/deployments.d.ts +92 -0
- package/resources/agents/deployments.d.ts.map +1 -0
- package/resources/agents/deployments.js +22 -0
- package/resources/agents/deployments.js.map +1 -0
- package/resources/agents/deployments.mjs +18 -0
- package/resources/agents/deployments.mjs.map +1 -0
- package/resources/agents/index.d.mts +5 -0
- package/resources/agents/index.d.mts.map +1 -0
- package/resources/agents/index.d.ts +5 -0
- package/resources/agents/index.d.ts.map +1 -0
- package/resources/agents/index.js +13 -0
- package/resources/agents/index.js.map +1 -0
- package/resources/agents/index.mjs +6 -0
- package/resources/agents/index.mjs.map +1 -0
- package/resources/agents/metrics/index.d.mts +3 -0
- package/resources/agents/metrics/index.d.mts.map +1 -0
- package/resources/agents/metrics/index.d.ts +3 -0
- package/resources/agents/metrics/index.d.ts.map +1 -0
- package/resources/agents/metrics/index.js +9 -0
- package/resources/agents/metrics/index.js.map +1 -0
- package/resources/agents/metrics/index.mjs +4 -0
- package/resources/agents/metrics/index.mjs.map +1 -0
- package/resources/agents/metrics/metrics.d.mts +114 -0
- package/resources/agents/metrics/metrics.d.mts.map +1 -0
- package/resources/agents/metrics/metrics.d.ts +114 -0
- package/resources/agents/metrics/metrics.d.ts.map +1 -0
- package/resources/agents/metrics/metrics.js +60 -0
- package/resources/agents/metrics/metrics.js.map +1 -0
- package/resources/agents/metrics/metrics.mjs +55 -0
- package/resources/agents/metrics/metrics.mjs.map +1 -0
- package/resources/agents/metrics/results.d.mts +144 -0
- package/resources/agents/metrics/results.d.mts.map +1 -0
- package/resources/agents/metrics/results.d.ts +144 -0
- package/resources/agents/metrics/results.d.ts.map +1 -0
- package/resources/agents/metrics/results.js +32 -0
- package/resources/agents/metrics/results.js.map +1 -0
- package/resources/agents/metrics/results.mjs +28 -0
- package/resources/agents/metrics/results.mjs.map +1 -0
- package/resources/agents/metrics.d.mts +2 -0
- package/resources/agents/metrics.d.mts.map +1 -0
- package/resources/agents/metrics.d.ts +2 -0
- package/resources/agents/metrics.d.ts.map +1 -0
- package/resources/agents/metrics.js +6 -0
- package/resources/agents/metrics.js.map +1 -0
- package/resources/agents/metrics.mjs +3 -0
- package/resources/agents/metrics.mjs.map +1 -0
- package/resources/agents.d.mts +2 -0
- package/resources/agents.d.mts.map +1 -0
- package/resources/agents.d.ts +2 -0
- package/resources/agents.d.ts.map +1 -0
- package/resources/agents.js +6 -0
- package/resources/agents.js.map +1 -0
- package/resources/agents.mjs +3 -0
- package/resources/agents.mjs.map +1 -0
- package/resources/datasets/datasets.d.mts +82 -0
- package/resources/datasets/datasets.d.mts.map +1 -0
- package/resources/datasets/datasets.d.ts +82 -0
- package/resources/datasets/datasets.d.ts.map +1 -0
- package/resources/datasets/datasets.js +57 -0
- package/resources/datasets/datasets.js.map +1 -0
- package/resources/datasets/datasets.mjs +52 -0
- package/resources/datasets/datasets.mjs.map +1 -0
- package/resources/datasets/files.d.mts +64 -0
- package/resources/datasets/files.d.mts.map +1 -0
- package/resources/datasets/files.d.ts +64 -0
- package/resources/datasets/files.d.ts.map +1 -0
- package/resources/datasets/files.js +38 -0
- package/resources/datasets/files.js.map +1 -0
- package/resources/datasets/files.mjs +34 -0
- package/resources/datasets/files.mjs.map +1 -0
- package/resources/datasets/index.d.mts +3 -0
- package/resources/datasets/index.d.mts.map +1 -0
- package/resources/datasets/index.d.ts +3 -0
- package/resources/datasets/index.d.ts.map +1 -0
- package/resources/datasets/index.js +9 -0
- package/resources/datasets/index.js.map +1 -0
- package/resources/datasets/index.mjs +4 -0
- package/resources/datasets/index.mjs.map +1 -0
- package/resources/datasets.d.mts +2 -0
- package/resources/datasets.d.mts.map +1 -0
- package/resources/datasets.d.ts +2 -0
- package/resources/datasets.d.ts.map +1 -0
- package/resources/datasets.js +6 -0
- package/resources/datasets.js.map +1 -0
- package/resources/datasets.mjs +3 -0
- package/resources/datasets.mjs.map +1 -0
- package/resources/fine-tunes.d.mts +101 -0
- package/resources/fine-tunes.d.mts.map +1 -0
- package/resources/fine-tunes.d.ts +101 -0
- package/resources/fine-tunes.d.ts.map +1 -0
- package/resources/fine-tunes.js +48 -0
- package/resources/fine-tunes.js.map +1 -0
- package/resources/fine-tunes.mjs +44 -0
- package/resources/fine-tunes.mjs.map +1 -0
- package/resources/index.d.mts +12 -0
- package/resources/index.d.mts.map +1 -0
- package/resources/index.d.ts +12 -0
- package/resources/index.d.ts.map +1 -0
- package/resources/index.js +25 -0
- package/resources/index.js.map +1 -0
- package/resources/index.mjs +12 -0
- package/resources/index.mjs.map +1 -0
- package/resources/infill.d.mts +71 -0
- package/resources/infill.d.mts.map +1 -0
- package/resources/infill.d.ts +71 -0
- package/resources/infill.d.ts.map +1 -0
- package/resources/infill.js +40 -0
- package/resources/infill.js.map +1 -0
- package/resources/infill.mjs +36 -0
- package/resources/infill.mjs.map +1 -0
- package/resources/pronunciation-dicts.d.mts +99 -0
- package/resources/pronunciation-dicts.d.mts.map +1 -0
- package/resources/pronunciation-dicts.d.ts +99 -0
- package/resources/pronunciation-dicts.d.ts.map +1 -0
- package/resources/pronunciation-dicts.js +48 -0
- package/resources/pronunciation-dicts.js.map +1 -0
- package/resources/pronunciation-dicts.mjs +44 -0
- package/resources/pronunciation-dicts.mjs.map +1 -0
- package/resources/stt.d.mts +105 -0
- package/resources/stt.d.mts.map +1 -0
- package/resources/stt.d.ts +105 -0
- package/resources/stt.d.ts.map +1 -0
- package/resources/stt.js +33 -0
- package/resources/stt.js.map +1 -0
- package/resources/stt.mjs +29 -0
- package/resources/stt.mjs.map +1 -0
- package/resources/top-level.d.mts +8 -0
- package/resources/top-level.d.mts.map +1 -0
- package/resources/top-level.d.ts +8 -0
- package/resources/top-level.d.ts.map +1 -0
- package/resources/top-level.js +4 -0
- package/resources/top-level.js.map +1 -0
- package/resources/top-level.mjs +3 -0
- package/resources/top-level.mjs.map +1 -0
- package/resources/tts/index.d.mts +2 -0
- package/resources/tts/index.d.mts.map +1 -0
- package/resources/tts/index.d.ts +2 -0
- package/resources/tts/index.d.ts.map +1 -0
- package/resources/tts/index.js +7 -0
- package/resources/tts/index.js.map +1 -0
- package/resources/tts/index.mjs +3 -0
- package/resources/tts/index.mjs.map +1 -0
- package/resources/tts/internal-base.d.mts +40 -0
- package/resources/tts/internal-base.d.mts.map +1 -0
- package/resources/tts/internal-base.d.ts +40 -0
- package/resources/tts/internal-base.d.ts.map +1 -0
- package/resources/tts/internal-base.js +48 -0
- package/resources/tts/internal-base.js.map +1 -0
- package/resources/tts/internal-base.mjs +42 -0
- package/resources/tts/internal-base.mjs.map +1 -0
- package/resources/tts/tts.d.mts +373 -0
- package/resources/tts/tts.d.mts.map +1 -0
- package/resources/tts/tts.d.ts +373 -0
- package/resources/tts/tts.d.ts.map +1 -0
- package/resources/tts/tts.js +31 -0
- package/resources/tts/tts.js.map +1 -0
- package/resources/tts/tts.mjs +27 -0
- package/resources/tts/tts.mjs.map +1 -0
- package/resources/tts/ws.d.mts +17 -0
- package/resources/tts/ws.d.mts.map +1 -0
- package/resources/tts/ws.d.ts +17 -0
- package/resources/tts/ws.d.ts.map +1 -0
- package/resources/tts/ws.js +73 -0
- package/resources/tts/ws.js.map +1 -0
- package/resources/tts/ws.mjs +68 -0
- package/resources/tts/ws.mjs.map +1 -0
- package/resources/tts.d.mts +2 -0
- package/resources/tts.d.mts.map +1 -0
- package/resources/tts.d.ts +2 -0
- package/resources/tts.d.ts.map +1 -0
- package/resources/tts.js +6 -0
- package/resources/tts.js.map +1 -0
- package/resources/tts.mjs +3 -0
- package/resources/tts.mjs.map +1 -0
- package/resources/voice-changer.d.mts +50 -0
- package/resources/voice-changer.d.mts.map +1 -0
- package/resources/voice-changer.d.ts +50 -0
- package/resources/voice-changer.d.ts.map +1 -0
- package/resources/voice-changer.js +31 -0
- package/resources/voice-changer.js.map +1 -0
- package/resources/voice-changer.mjs +27 -0
- package/resources/voice-changer.mjs.map +1 -0
- package/resources/voices.d.mts +249 -0
- package/resources/voices.d.mts.map +1 -0
- package/resources/voices.d.ts +249 -0
- package/resources/voices.d.ts.map +1 -0
- package/resources/voices.js +99 -0
- package/resources/voices.js.map +1 -0
- package/resources/voices.mjs +95 -0
- package/resources/voices.mjs.map +1 -0
- package/resources.d.mts +2 -0
- package/resources.d.mts.map +1 -0
- package/resources.d.ts +2 -0
- package/resources.d.ts.map +1 -0
- package/resources.js +5 -0
- package/resources.js.map +1 -0
- package/resources.mjs +2 -0
- package/resources.mjs.map +1 -0
- package/src/api-promise.ts +2 -0
- package/src/backcompat/errors.ts +52 -0
- package/src/backcompat/index.ts +89 -0
- package/src/backcompat/tts-wrapper.ts +351 -0
- package/src/backcompat/types.ts +19 -0
- package/src/backcompat/voice-changer-wrapper.ts +71 -0
- package/src/backcompat/voices-wrapper.ts +163 -0
- package/src/client.ts +949 -0
- package/src/core/EventEmitter.ts +98 -0
- package/src/core/README.md +3 -0
- package/src/core/api-promise.ts +92 -0
- package/src/core/error.ts +130 -0
- package/src/core/pagination.ts +175 -0
- package/src/core/resource.ts +11 -0
- package/src/core/uploads.ts +2 -0
- package/src/error.ts +2 -0
- package/src/index.ts +24 -0
- package/src/internal/README.md +3 -0
- package/src/internal/builtin-types.ts +93 -0
- package/src/internal/detect-platform.ts +196 -0
- package/src/internal/errors.ts +33 -0
- package/src/internal/headers.ts +97 -0
- package/src/internal/parse.ts +50 -0
- package/src/internal/qs/LICENSE.md +13 -0
- package/src/internal/qs/README.md +3 -0
- package/src/internal/qs/formats.ts +10 -0
- package/src/internal/qs/index.ts +13 -0
- package/src/internal/qs/stringify.ts +385 -0
- package/src/internal/qs/types.ts +71 -0
- package/src/internal/qs/utils.ts +265 -0
- package/src/internal/request-options.ts +91 -0
- package/src/internal/shim-types.ts +26 -0
- package/src/internal/shims.ts +107 -0
- package/src/internal/to-file.ts +154 -0
- package/src/internal/types.ts +95 -0
- package/src/internal/uploads.ts +187 -0
- package/src/internal/utils/base64.ts +40 -0
- package/src/internal/utils/bytes.ts +32 -0
- package/src/internal/utils/env.ts +18 -0
- package/src/internal/utils/log.ts +126 -0
- package/src/internal/utils/path.ts +88 -0
- package/src/internal/utils/sleep.ts +3 -0
- package/src/internal/utils/uuid.ts +17 -0
- package/src/internal/utils/values.ts +105 -0
- package/src/internal/utils.ts +8 -0
- package/src/lib/.keep +4 -0
- package/src/pagination.ts +2 -0
- package/src/resource.ts +2 -0
- package/src/resources/access-token.ts +67 -0
- package/src/resources/agents/agents.ts +351 -0
- package/src/resources/agents/calls.ts +274 -0
- package/src/resources/agents/deployments.ts +119 -0
- package/src/resources/agents/index.ts +27 -0
- package/src/resources/agents/metrics/index.ts +19 -0
- package/src/resources/agents/metrics/metrics.ts +188 -0
- package/src/resources/agents/metrics/results.ts +196 -0
- package/src/resources/agents/metrics.ts +3 -0
- package/src/resources/agents.ts +3 -0
- package/src/resources/datasets/datasets.ts +145 -0
- package/src/resources/datasets/files.ts +110 -0
- package/src/resources/datasets/index.ts +18 -0
- package/src/resources/datasets.ts +3 -0
- package/src/resources/fine-tunes.ts +155 -0
- package/src/resources/index.ts +69 -0
- package/src/resources/infill.ts +105 -0
- package/src/resources/pronunciation-dicts.ts +152 -0
- package/src/resources/stt.ts +232 -0
- package/src/resources/top-level.ts +11 -0
- package/src/resources/tts/index.ts +14 -0
- package/src/resources/tts/internal-base.ts +89 -0
- package/src/resources/tts/tts.ts +551 -0
- package/src/resources/tts/ws.ts +79 -0
- package/src/resources/tts.ts +3 -0
- package/src/resources/voice-changer.ts +92 -0
- package/src/resources/voices.ts +392 -0
- package/src/resources.ts +1 -0
- package/src/tsconfig.json +11 -0
- package/src/uploads.ts +2 -0
- package/src/version.ts +1 -0
- package/uploads.d.mts +2 -0
- package/uploads.d.mts.map +1 -0
- package/uploads.d.ts +2 -0
- package/uploads.d.ts.map +1 -0
- package/uploads.js +6 -0
- package/uploads.js.map +1 -0
- package/uploads.mjs +2 -0
- package/uploads.mjs.map +1 -0
- package/version.d.mts +2 -0
- package/version.d.mts.map +1 -0
- package/version.d.ts +2 -1
- package/version.d.ts.map +1 -0
- package/version.js +3 -2
- package/version.js.map +1 -0
- package/version.mjs +2 -0
- package/version.mjs.map +1 -0
- package/Client.d.ts +0 -53
- package/Client.js +0 -47
- package/api/index.d.ts +0 -1
- package/api/index.js +0 -17
- package/api/resources/apiStatus/client/Client.d.ts +0 -43
- package/api/resources/apiStatus/client/Client.js +0 -113
- package/api/resources/apiStatus/client/index.d.ts +0 -1
- package/api/resources/apiStatus/client/index.js +0 -2
- package/api/resources/apiStatus/index.d.ts +0 -2
- package/api/resources/apiStatus/index.js +0 -18
- package/api/resources/apiStatus/types/ApiInfo.d.ts +0 -7
- package/api/resources/apiStatus/types/ApiInfo.js +0 -5
- package/api/resources/apiStatus/types/index.d.ts +0 -1
- package/api/resources/apiStatus/types/index.js +0 -17
- package/api/resources/auth/client/Client.d.ts +0 -68
- package/api/resources/auth/client/Client.js +0 -143
- package/api/resources/auth/client/index.d.ts +0 -1
- package/api/resources/auth/client/index.js +0 -2
- package/api/resources/auth/index.d.ts +0 -2
- package/api/resources/auth/index.js +0 -18
- package/api/resources/auth/types/TokenGrant.d.ts +0 -9
- package/api/resources/auth/types/TokenGrant.js +0 -5
- package/api/resources/auth/types/TokenRequest.d.ts +0 -10
- package/api/resources/auth/types/TokenRequest.js +0 -5
- package/api/resources/auth/types/TokenResponse.d.ts +0 -7
- package/api/resources/auth/types/TokenResponse.js +0 -5
- package/api/resources/auth/types/index.d.ts +0 -3
- package/api/resources/auth/types/index.js +0 -19
- package/api/resources/embedding/index.d.ts +0 -1
- package/api/resources/embedding/index.js +0 -17
- package/api/resources/embedding/types/Embedding.d.ts +0 -10
- package/api/resources/embedding/types/Embedding.js +0 -5
- package/api/resources/embedding/types/index.d.ts +0 -1
- package/api/resources/embedding/types/index.js +0 -17
- package/api/resources/index.d.ts +0 -19
- package/api/resources/index.js +0 -58
- package/api/resources/infill/client/Client.d.ts +0 -57
- package/api/resources/infill/client/Client.js +0 -156
- package/api/resources/infill/client/index.d.ts +0 -1
- package/api/resources/infill/client/index.js +0 -17
- package/api/resources/infill/client/requests/InfillBytesRequest.d.ts +0 -63
- package/api/resources/infill/client/requests/InfillBytesRequest.js +0 -5
- package/api/resources/infill/client/requests/index.d.ts +0 -1
- package/api/resources/infill/client/requests/index.js +0 -2
- package/api/resources/infill/index.d.ts +0 -1
- package/api/resources/infill/index.js +0 -17
- package/api/resources/stt/client/Client.d.ts +0 -71
- package/api/resources/stt/client/Client.js +0 -166
- package/api/resources/stt/client/index.d.ts +0 -1
- package/api/resources/stt/client/index.js +0 -17
- package/api/resources/stt/client/requests/TranscriptionRequest.d.ts +0 -147
- package/api/resources/stt/client/requests/TranscriptionRequest.js +0 -5
- package/api/resources/stt/client/requests/index.d.ts +0 -1
- package/api/resources/stt/client/requests/index.js +0 -2
- package/api/resources/stt/index.d.ts +0 -2
- package/api/resources/stt/index.js +0 -18
- package/api/resources/stt/types/DoneMessage.d.ts +0 -10
- package/api/resources/stt/types/DoneMessage.js +0 -5
- package/api/resources/stt/types/ErrorMessage.d.ts +0 -9
- package/api/resources/stt/types/ErrorMessage.js +0 -5
- package/api/resources/stt/types/FlushDoneMessage.d.ts +0 -10
- package/api/resources/stt/types/FlushDoneMessage.js +0 -5
- package/api/resources/stt/types/StreamingTranscriptionResponse.d.ts +0 -22
- package/api/resources/stt/types/StreamingTranscriptionResponse.js +0 -5
- package/api/resources/stt/types/SttEncoding.d.ts +0 -15
- package/api/resources/stt/types/SttEncoding.js +0 -14
- package/api/resources/stt/types/TimestampGranularity.d.ts +0 -12
- package/api/resources/stt/types/TimestampGranularity.js +0 -9
- package/api/resources/stt/types/TranscriptMessage.d.ts +0 -22
- package/api/resources/stt/types/TranscriptMessage.js +0 -5
- package/api/resources/stt/types/TranscriptionResponse.d.ts +0 -14
- package/api/resources/stt/types/TranscriptionResponse.js +0 -5
- package/api/resources/stt/types/TranscriptionWord.d.ts +0 -11
- package/api/resources/stt/types/TranscriptionWord.js +0 -5
- package/api/resources/stt/types/index.d.ts +0 -9
- package/api/resources/stt/types/index.js +0 -25
- package/api/resources/tts/client/Client.d.ts +0 -39
- package/api/resources/tts/client/Client.js +0 -162
- package/api/resources/tts/client/index.d.ts +0 -1
- package/api/resources/tts/client/index.js +0 -2
- package/api/resources/tts/index.d.ts +0 -2
- package/api/resources/tts/index.js +0 -18
- package/api/resources/tts/types/CancelContextRequest.d.ts +0 -10
- package/api/resources/tts/types/CancelContextRequest.js +0 -5
- package/api/resources/tts/types/ContextId.d.ts +0 -9
- package/api/resources/tts/types/ContextId.js +0 -5
- package/api/resources/tts/types/Controls.d.ts +0 -8
- package/api/resources/tts/types/Controls.js +0 -5
- package/api/resources/tts/types/Emotion.d.ts +0 -7
- package/api/resources/tts/types/Emotion.js +0 -5
- package/api/resources/tts/types/EmotionDeprecated.d.ts +0 -38
- package/api/resources/tts/types/EmotionDeprecated.js +0 -33
- package/api/resources/tts/types/FlushId.d.ts +0 -9
- package/api/resources/tts/types/FlushId.js +0 -5
- package/api/resources/tts/types/GenerationConfig.d.ts +0 -15
- package/api/resources/tts/types/GenerationConfig.js +0 -5
- package/api/resources/tts/types/GenerationRequest.d.ts +0 -44
- package/api/resources/tts/types/GenerationRequest.js +0 -5
- package/api/resources/tts/types/ModelSpeed.d.ts +0 -16
- package/api/resources/tts/types/ModelSpeed.js +0 -11
- package/api/resources/tts/types/Mp3OutputFormat.d.ts +0 -9
- package/api/resources/tts/types/Mp3OutputFormat.js +0 -5
- package/api/resources/tts/types/NaturalSpecifier.d.ts +0 -11
- package/api/resources/tts/types/NaturalSpecifier.js +0 -13
- package/api/resources/tts/types/NumericalSpecifier.d.ts +0 -4
- package/api/resources/tts/types/NumericalSpecifier.js +0 -5
- package/api/resources/tts/types/OutputFormat.d.ts +0 -16
- package/api/resources/tts/types/OutputFormat.js +0 -5
- package/api/resources/tts/types/PhonemeTimestamps.d.ts +0 -8
- package/api/resources/tts/types/PhonemeTimestamps.js +0 -5
- package/api/resources/tts/types/RawEncoding.d.ts +0 -10
- package/api/resources/tts/types/RawEncoding.js +0 -12
- package/api/resources/tts/types/RawOutputFormat.d.ts +0 -10
- package/api/resources/tts/types/RawOutputFormat.js +0 -5
- package/api/resources/tts/types/Speed.d.ts +0 -10
- package/api/resources/tts/types/Speed.js +0 -5
- package/api/resources/tts/types/SseOutputFormat.d.ts +0 -10
- package/api/resources/tts/types/SseOutputFormat.js +0 -5
- package/api/resources/tts/types/SupportedLanguage.d.ts +0 -26
- package/api/resources/tts/types/SupportedLanguage.js +0 -23
- package/api/resources/tts/types/TtsRequest.d.ts +0 -21
- package/api/resources/tts/types/TtsRequest.js +0 -5
- package/api/resources/tts/types/TtsRequestEmbeddingSpecifier.d.ts +0 -9
- package/api/resources/tts/types/TtsRequestEmbeddingSpecifier.js +0 -5
- package/api/resources/tts/types/TtsRequestIdSpecifier.d.ts +0 -9
- package/api/resources/tts/types/TtsRequestIdSpecifier.js +0 -5
- package/api/resources/tts/types/TtsRequestVoiceSpecifier.d.ts +0 -5
- package/api/resources/tts/types/TtsRequestVoiceSpecifier.js +0 -5
- package/api/resources/tts/types/TtssseRequest.d.ts +0 -29
- package/api/resources/tts/types/TtssseRequest.js +0 -5
- package/api/resources/tts/types/WavOutputFormat.d.ts +0 -6
- package/api/resources/tts/types/WavOutputFormat.js +0 -5
- package/api/resources/tts/types/WebSocketBaseResponse.d.ts +0 -9
- package/api/resources/tts/types/WebSocketBaseResponse.js +0 -5
- package/api/resources/tts/types/WebSocketChunkResponse.d.ts +0 -8
- package/api/resources/tts/types/WebSocketChunkResponse.js +0 -5
- package/api/resources/tts/types/WebSocketDoneResponse.d.ts +0 -6
- package/api/resources/tts/types/WebSocketDoneResponse.js +0 -5
- package/api/resources/tts/types/WebSocketErrorResponse.d.ts +0 -7
- package/api/resources/tts/types/WebSocketErrorResponse.js +0 -5
- package/api/resources/tts/types/WebSocketFlushDoneResponse.d.ts +0 -8
- package/api/resources/tts/types/WebSocketFlushDoneResponse.js +0 -5
- package/api/resources/tts/types/WebSocketPhonemeTimestampsResponse.d.ts +0 -7
- package/api/resources/tts/types/WebSocketPhonemeTimestampsResponse.js +0 -5
- package/api/resources/tts/types/WebSocketRawOutputFormat.d.ts +0 -10
- package/api/resources/tts/types/WebSocketRawOutputFormat.js +0 -5
- package/api/resources/tts/types/WebSocketRequest.d.ts +0 -11
- package/api/resources/tts/types/WebSocketRequest.js +0 -5
- package/api/resources/tts/types/WebSocketResponse.d.ts +0 -25
- package/api/resources/tts/types/WebSocketResponse.js +0 -5
- package/api/resources/tts/types/WebSocketStreamOptions.d.ts +0 -6
- package/api/resources/tts/types/WebSocketStreamOptions.js +0 -5
- package/api/resources/tts/types/WebSocketTimestampsResponse.d.ts +0 -7
- package/api/resources/tts/types/WebSocketTimestampsResponse.js +0 -5
- package/api/resources/tts/types/WebSocketTtsOutput.d.ts +0 -12
- package/api/resources/tts/types/WebSocketTtsOutput.js +0 -5
- package/api/resources/tts/types/WebSocketTtsRequest.d.ts +0 -25
- package/api/resources/tts/types/WebSocketTtsRequest.js +0 -5
- package/api/resources/tts/types/WordTimestamps.d.ts +0 -8
- package/api/resources/tts/types/WordTimestamps.js +0 -5
- package/api/resources/tts/types/index.d.ts +0 -39
- package/api/resources/tts/types/index.js +0 -55
- package/api/resources/voiceChanger/client/Client.d.ts +0 -46
- package/api/resources/voiceChanger/client/Client.js +0 -195
- package/api/resources/voiceChanger/client/index.d.ts +0 -1
- package/api/resources/voiceChanger/client/index.js +0 -17
- package/api/resources/voiceChanger/client/requests/VoiceChangerBytesRequest.d.ts +0 -39
- package/api/resources/voiceChanger/client/requests/VoiceChangerBytesRequest.js +0 -5
- package/api/resources/voiceChanger/client/requests/VoiceChangerSseRequest.d.ts +0 -39
- package/api/resources/voiceChanger/client/requests/VoiceChangerSseRequest.js +0 -5
- package/api/resources/voiceChanger/client/requests/index.d.ts +0 -2
- package/api/resources/voiceChanger/client/requests/index.js +0 -2
- package/api/resources/voiceChanger/index.d.ts +0 -2
- package/api/resources/voiceChanger/index.js +0 -18
- package/api/resources/voiceChanger/types/OutputFormatContainer.d.ts +0 -9
- package/api/resources/voiceChanger/types/OutputFormatContainer.js +0 -11
- package/api/resources/voiceChanger/types/StreamingResponse.d.ts +0 -16
- package/api/resources/voiceChanger/types/StreamingResponse.js +0 -5
- package/api/resources/voiceChanger/types/index.d.ts +0 -2
- package/api/resources/voiceChanger/types/index.js +0 -18
- package/api/resources/voices/client/Client.d.ts +0 -150
- package/api/resources/voices/client/Client.js +0 -530
- package/api/resources/voices/client/index.d.ts +0 -1
- package/api/resources/voices/client/index.js +0 -17
- package/api/resources/voices/client/requests/CloneVoiceRequest.d.ts +0 -35
- package/api/resources/voices/client/requests/CloneVoiceRequest.js +0 -5
- package/api/resources/voices/client/requests/index.d.ts +0 -1
- package/api/resources/voices/client/requests/index.js +0 -2
- package/api/resources/voices/index.d.ts +0 -2
- package/api/resources/voices/index.js +0 -18
- package/api/resources/voices/types/BaseVoiceId.d.ts +0 -8
- package/api/resources/voices/types/BaseVoiceId.js +0 -5
- package/api/resources/voices/types/CloneMode.d.ts +0 -8
- package/api/resources/voices/types/CloneMode.js +0 -10
- package/api/resources/voices/types/CreateVoiceRequest.d.ts +0 -13
- package/api/resources/voices/types/CreateVoiceRequest.js +0 -5
- package/api/resources/voices/types/EmbeddingResponse.d.ts +0 -7
- package/api/resources/voices/types/EmbeddingResponse.js +0 -5
- package/api/resources/voices/types/EmbeddingSpecifier.d.ts +0 -8
- package/api/resources/voices/types/EmbeddingSpecifier.js +0 -5
- package/api/resources/voices/types/Gender.d.ts +0 -8
- package/api/resources/voices/types/Gender.js +0 -10
- package/api/resources/voices/types/IdSpecifier.d.ts +0 -8
- package/api/resources/voices/types/IdSpecifier.js +0 -5
- package/api/resources/voices/types/LocalizeDialect.d.ts +0 -20
- package/api/resources/voices/types/LocalizeDialect.js +0 -5
- package/api/resources/voices/types/LocalizeEnglishDialect.d.ts +0 -11
- package/api/resources/voices/types/LocalizeEnglishDialect.js +0 -13
- package/api/resources/voices/types/LocalizeFrenchDialect.d.ts +0 -8
- package/api/resources/voices/types/LocalizeFrenchDialect.js +0 -10
- package/api/resources/voices/types/LocalizePortugueseDialect.d.ts +0 -8
- package/api/resources/voices/types/LocalizePortugueseDialect.js +0 -10
- package/api/resources/voices/types/LocalizeSpanishDialect.d.ts +0 -8
- package/api/resources/voices/types/LocalizeSpanishDialect.js +0 -10
- package/api/resources/voices/types/LocalizeTargetLanguage.d.ts +0 -26
- package/api/resources/voices/types/LocalizeTargetLanguage.js +0 -23
- package/api/resources/voices/types/LocalizeVoiceRequest.d.ts +0 -15
- package/api/resources/voices/types/LocalizeVoiceRequest.js +0 -5
- package/api/resources/voices/types/MixVoiceSpecifier.d.ts +0 -5
- package/api/resources/voices/types/MixVoiceSpecifier.js +0 -5
- package/api/resources/voices/types/MixVoicesRequest.d.ts +0 -7
- package/api/resources/voices/types/MixVoicesRequest.js +0 -5
- package/api/resources/voices/types/UpdateVoiceRequest.d.ts +0 -9
- package/api/resources/voices/types/UpdateVoiceRequest.js +0 -5
- package/api/resources/voices/types/Voice.d.ts +0 -19
- package/api/resources/voices/types/Voice.js +0 -5
- package/api/resources/voices/types/VoiceId.d.ts +0 -7
- package/api/resources/voices/types/VoiceId.js +0 -5
- package/api/resources/voices/types/VoiceMetadata.d.ts +0 -18
- package/api/resources/voices/types/VoiceMetadata.js +0 -5
- package/api/resources/voices/types/Weight.d.ts +0 -7
- package/api/resources/voices/types/Weight.js +0 -5
- package/api/resources/voices/types/index.d.ts +0 -21
- package/api/resources/voices/types/index.js +0 -37
- package/core/fetcher/APIResponse.d.ts +0 -10
- package/core/fetcher/APIResponse.js +0 -2
- package/core/fetcher/Fetcher.d.ts +0 -39
- package/core/fetcher/Fetcher.js +0 -100
- package/core/fetcher/Supplier.d.ts +0 -4
- package/core/fetcher/Supplier.js +0 -22
- package/core/fetcher/createRequestUrl.d.ts +0 -1
- package/core/fetcher/createRequestUrl.js +0 -12
- package/core/fetcher/getFetchFn.d.ts +0 -4
- package/core/fetcher/getFetchFn.js +0 -68
- package/core/fetcher/getHeader.d.ts +0 -1
- package/core/fetcher/getHeader.js +0 -11
- package/core/fetcher/getRequestBody.d.ts +0 -7
- package/core/fetcher/getRequestBody.js +0 -23
- package/core/fetcher/getResponseBody.d.ts +0 -1
- package/core/fetcher/getResponseBody.js +0 -54
- package/core/fetcher/index.d.ts +0 -5
- package/core/fetcher/index.js +0 -9
- package/core/fetcher/makeRequest.d.ts +0 -1
- package/core/fetcher/makeRequest.js +0 -42
- package/core/fetcher/requestWithRetries.d.ts +0 -1
- package/core/fetcher/requestWithRetries.js +0 -40
- package/core/fetcher/signals.d.ts +0 -11
- package/core/fetcher/signals.js +0 -36
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +0 -30
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +0 -247
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -21
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +0 -126
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +0 -31
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +0 -229
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +0 -18
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +0 -59
- package/core/form-data-utils/FormDataWrapper.d.ts +0 -60
- package/core/form-data-utils/FormDataWrapper.js +0 -184
- package/core/form-data-utils/index.d.ts +0 -1
- package/core/form-data-utils/index.js +0 -17
- package/core/index.d.ts +0 -5
- package/core/index.js +0 -44
- package/core/json.d.ts +0 -15
- package/core/json.js +0 -24
- package/core/runtime/index.d.ts +0 -1
- package/core/runtime/index.js +0 -5
- package/core/runtime/runtime.d.ts +0 -9
- package/core/runtime/runtime.js +0 -103
- package/core/schemas/Schema.d.ts +0 -87
- package/core/schemas/Schema.js +0 -24
- package/core/schemas/builders/bigint/bigint.d.ts +0 -2
- package/core/schemas/builders/bigint/bigint.js +0 -53
- package/core/schemas/builders/bigint/index.d.ts +0 -1
- package/core/schemas/builders/bigint/index.js +0 -5
- package/core/schemas/builders/date/date.d.ts +0 -2
- package/core/schemas/builders/date/date.js +0 -62
- package/core/schemas/builders/date/index.d.ts +0 -1
- package/core/schemas/builders/date/index.js +0 -5
- package/core/schemas/builders/enum/enum.d.ts +0 -2
- package/core/schemas/builders/enum/enum.js +0 -38
- package/core/schemas/builders/enum/index.d.ts +0 -1
- package/core/schemas/builders/enum/index.js +0 -5
- package/core/schemas/builders/index.d.ts +0 -14
- package/core/schemas/builders/index.js +0 -30
- package/core/schemas/builders/lazy/index.d.ts +0 -3
- package/core/schemas/builders/lazy/index.js +0 -7
- package/core/schemas/builders/lazy/lazy.d.ts +0 -5
- package/core/schemas/builders/lazy/lazy.js +0 -24
- package/core/schemas/builders/lazy/lazyObject.d.ts +0 -3
- package/core/schemas/builders/lazy/lazyObject.js +0 -11
- package/core/schemas/builders/list/index.d.ts +0 -1
- package/core/schemas/builders/list/index.js +0 -5
- package/core/schemas/builders/list/list.d.ts +0 -2
- package/core/schemas/builders/list/list.js +0 -54
- package/core/schemas/builders/literals/booleanLiteral.d.ts +0 -2
- package/core/schemas/builders/literals/booleanLiteral.js +0 -28
- package/core/schemas/builders/literals/index.d.ts +0 -2
- package/core/schemas/builders/literals/index.js +0 -7
- package/core/schemas/builders/literals/stringLiteral.d.ts +0 -2
- package/core/schemas/builders/literals/stringLiteral.js +0 -28
- package/core/schemas/builders/object/index.d.ts +0 -6
- package/core/schemas/builders/object/index.js +0 -11
- package/core/schemas/builders/object/object.d.ts +0 -3
- package/core/schemas/builders/object/object.js +0 -261
- package/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +0 -6
- package/core/schemas/builders/object/objectWithoutOptionalProperties.js +0 -7
- package/core/schemas/builders/object/property.d.ts +0 -8
- package/core/schemas/builders/object/property.js +0 -15
- package/core/schemas/builders/object/types.d.ts +0 -31
- package/core/schemas/builders/object/types.js +0 -2
- package/core/schemas/builders/object-like/getObjectLikeUtils.d.ts +0 -9
- package/core/schemas/builders/object-like/getObjectLikeUtils.js +0 -53
- package/core/schemas/builders/object-like/index.d.ts +0 -2
- package/core/schemas/builders/object-like/index.js +0 -6
- package/core/schemas/builders/object-like/types.d.ts +0 -7
- package/core/schemas/builders/object-like/types.js +0 -2
- package/core/schemas/builders/primitives/any.d.ts +0 -1
- package/core/schemas/builders/primitives/any.js +0 -6
- package/core/schemas/builders/primitives/boolean.d.ts +0 -1
- package/core/schemas/builders/primitives/boolean.js +0 -25
- package/core/schemas/builders/primitives/index.d.ts +0 -5
- package/core/schemas/builders/primitives/index.js +0 -13
- package/core/schemas/builders/primitives/number.d.ts +0 -1
- package/core/schemas/builders/primitives/number.js +0 -25
- package/core/schemas/builders/primitives/string.d.ts +0 -1
- package/core/schemas/builders/primitives/string.js +0 -25
- package/core/schemas/builders/primitives/unknown.d.ts +0 -1
- package/core/schemas/builders/primitives/unknown.js +0 -6
- package/core/schemas/builders/record/index.d.ts +0 -2
- package/core/schemas/builders/record/index.js +0 -5
- package/core/schemas/builders/record/record.d.ts +0 -3
- package/core/schemas/builders/record/record.js +0 -93
- package/core/schemas/builders/record/types.d.ts +0 -4
- package/core/schemas/builders/record/types.js +0 -2
- package/core/schemas/builders/schema-utils/JsonError.d.ts +0 -5
- package/core/schemas/builders/schema-utils/JsonError.js +0 -12
- package/core/schemas/builders/schema-utils/ParseError.d.ts +0 -5
- package/core/schemas/builders/schema-utils/ParseError.js +0 -12
- package/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +0 -21
- package/core/schemas/builders/schema-utils/getSchemaUtils.js +0 -145
- package/core/schemas/builders/schema-utils/index.d.ts +0 -4
- package/core/schemas/builders/schema-utils/index.js +0 -11
- package/core/schemas/builders/schema-utils/stringifyValidationErrors.d.ts +0 -2
- package/core/schemas/builders/schema-utils/stringifyValidationErrors.js +0 -9
- package/core/schemas/builders/set/index.d.ts +0 -1
- package/core/schemas/builders/set/index.js +0 -5
- package/core/schemas/builders/set/set.d.ts +0 -2
- package/core/schemas/builders/set/set.js +0 -43
- package/core/schemas/builders/undiscriminated-union/index.d.ts +0 -2
- package/core/schemas/builders/undiscriminated-union/index.js +0 -5
- package/core/schemas/builders/undiscriminated-union/types.d.ts +0 -4
- package/core/schemas/builders/undiscriminated-union/types.js +0 -2
- package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.d.ts +0 -3
- package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +0 -39
- package/core/schemas/builders/union/discriminant.d.ts +0 -5
- package/core/schemas/builders/union/discriminant.js +0 -9
- package/core/schemas/builders/union/index.d.ts +0 -4
- package/core/schemas/builders/union/index.js +0 -7
- package/core/schemas/builders/union/types.d.ts +0 -13
- package/core/schemas/builders/union/types.js +0 -2
- package/core/schemas/builders/union/union.d.ts +0 -4
- package/core/schemas/builders/union/union.js +0 -129
- package/core/schemas/index.d.ts +0 -2
- package/core/schemas/index.js +0 -17
- package/core/schemas/utils/MaybePromise.d.ts +0 -1
- package/core/schemas/utils/MaybePromise.js +0 -2
- package/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +0 -7
- package/core/schemas/utils/addQuestionMarksToNullableProperties.js +0 -2
- package/core/schemas/utils/createIdentitySchemaCreator.d.ts +0 -2
- package/core/schemas/utils/createIdentitySchemaCreator.js +0 -15
- package/core/schemas/utils/entries.d.ts +0 -1
- package/core/schemas/utils/entries.js +0 -6
- package/core/schemas/utils/filterObject.d.ts +0 -1
- package/core/schemas/utils/filterObject.js +0 -13
- package/core/schemas/utils/getErrorMessageForIncorrectType.d.ts +0 -1
- package/core/schemas/utils/getErrorMessageForIncorrectType.js +0 -27
- package/core/schemas/utils/isPlainObject.d.ts +0 -1
- package/core/schemas/utils/isPlainObject.js +0 -17
- package/core/schemas/utils/keys.d.ts +0 -1
- package/core/schemas/utils/keys.js +0 -6
- package/core/schemas/utils/maybeSkipValidation.d.ts +0 -2
- package/core/schemas/utils/maybeSkipValidation.js +0 -27
- package/core/schemas/utils/partition.d.ts +0 -1
- package/core/schemas/utils/partition.js +0 -15
- package/core/streaming-fetcher/Stream.d.ts +0 -47
- package/core/streaming-fetcher/Stream.js +0 -169
- package/core/streaming-fetcher/index.d.ts +0 -1
- package/core/streaming-fetcher/index.js +0 -5
- package/core/websocket/events.d.ts +0 -36
- package/core/websocket/events.js +0 -27
- package/core/websocket/index.d.ts +0 -1
- package/core/websocket/index.js +0 -17
- package/core/websocket/ws.d.ts +0 -137
- package/core/websocket/ws.js +0 -448
- package/dist/Client.d.ts +0 -53
- package/dist/Client.js +0 -47
- package/dist/api/index.d.ts +0 -1
- package/dist/api/index.js +0 -17
- package/dist/api/resources/apiStatus/client/Client.d.ts +0 -43
- package/dist/api/resources/apiStatus/client/Client.js +0 -113
- package/dist/api/resources/apiStatus/client/index.d.ts +0 -1
- package/dist/api/resources/apiStatus/client/index.js +0 -2
- package/dist/api/resources/apiStatus/index.d.ts +0 -2
- package/dist/api/resources/apiStatus/index.js +0 -18
- package/dist/api/resources/apiStatus/types/ApiInfo.d.ts +0 -7
- package/dist/api/resources/apiStatus/types/ApiInfo.js +0 -5
- package/dist/api/resources/apiStatus/types/index.d.ts +0 -1
- package/dist/api/resources/apiStatus/types/index.js +0 -17
- package/dist/api/resources/auth/client/Client.d.ts +0 -68
- package/dist/api/resources/auth/client/Client.js +0 -143
- package/dist/api/resources/auth/client/index.d.ts +0 -1
- package/dist/api/resources/auth/client/index.js +0 -2
- package/dist/api/resources/auth/index.d.ts +0 -2
- package/dist/api/resources/auth/index.js +0 -18
- package/dist/api/resources/auth/types/TokenGrant.d.ts +0 -9
- package/dist/api/resources/auth/types/TokenGrant.js +0 -5
- package/dist/api/resources/auth/types/TokenRequest.d.ts +0 -10
- package/dist/api/resources/auth/types/TokenRequest.js +0 -5
- package/dist/api/resources/auth/types/TokenResponse.d.ts +0 -7
- package/dist/api/resources/auth/types/TokenResponse.js +0 -5
- package/dist/api/resources/auth/types/index.d.ts +0 -3
- package/dist/api/resources/auth/types/index.js +0 -19
- package/dist/api/resources/embedding/index.d.ts +0 -1
- package/dist/api/resources/embedding/index.js +0 -17
- package/dist/api/resources/embedding/types/Embedding.d.ts +0 -10
- package/dist/api/resources/embedding/types/Embedding.js +0 -5
- package/dist/api/resources/embedding/types/index.d.ts +0 -1
- package/dist/api/resources/embedding/types/index.js +0 -17
- package/dist/api/resources/index.d.ts +0 -19
- package/dist/api/resources/index.js +0 -58
- package/dist/api/resources/infill/client/Client.d.ts +0 -57
- package/dist/api/resources/infill/client/Client.js +0 -156
- package/dist/api/resources/infill/client/index.d.ts +0 -1
- package/dist/api/resources/infill/client/index.js +0 -17
- package/dist/api/resources/infill/client/requests/InfillBytesRequest.d.ts +0 -63
- package/dist/api/resources/infill/client/requests/InfillBytesRequest.js +0 -5
- package/dist/api/resources/infill/client/requests/index.d.ts +0 -1
- package/dist/api/resources/infill/client/requests/index.js +0 -2
- package/dist/api/resources/infill/index.d.ts +0 -1
- package/dist/api/resources/infill/index.js +0 -17
- package/dist/api/resources/stt/client/Client.d.ts +0 -71
- package/dist/api/resources/stt/client/Client.js +0 -166
- package/dist/api/resources/stt/client/index.d.ts +0 -1
- package/dist/api/resources/stt/client/index.js +0 -17
- package/dist/api/resources/stt/client/requests/TranscriptionRequest.d.ts +0 -147
- package/dist/api/resources/stt/client/requests/TranscriptionRequest.js +0 -5
- package/dist/api/resources/stt/client/requests/index.d.ts +0 -1
- package/dist/api/resources/stt/client/requests/index.js +0 -2
- package/dist/api/resources/stt/index.d.ts +0 -2
- package/dist/api/resources/stt/index.js +0 -18
- package/dist/api/resources/stt/types/DoneMessage.d.ts +0 -10
- package/dist/api/resources/stt/types/DoneMessage.js +0 -5
- package/dist/api/resources/stt/types/ErrorMessage.d.ts +0 -9
- package/dist/api/resources/stt/types/ErrorMessage.js +0 -5
- package/dist/api/resources/stt/types/FlushDoneMessage.d.ts +0 -10
- package/dist/api/resources/stt/types/FlushDoneMessage.js +0 -5
- package/dist/api/resources/stt/types/StreamingTranscriptionResponse.d.ts +0 -22
- package/dist/api/resources/stt/types/StreamingTranscriptionResponse.js +0 -5
- package/dist/api/resources/stt/types/SttEncoding.d.ts +0 -15
- package/dist/api/resources/stt/types/SttEncoding.js +0 -14
- package/dist/api/resources/stt/types/TimestampGranularity.d.ts +0 -12
- package/dist/api/resources/stt/types/TimestampGranularity.js +0 -9
- package/dist/api/resources/stt/types/TranscriptMessage.d.ts +0 -22
- package/dist/api/resources/stt/types/TranscriptMessage.js +0 -5
- package/dist/api/resources/stt/types/TranscriptionResponse.d.ts +0 -14
- package/dist/api/resources/stt/types/TranscriptionResponse.js +0 -5
- package/dist/api/resources/stt/types/TranscriptionWord.d.ts +0 -11
- package/dist/api/resources/stt/types/TranscriptionWord.js +0 -5
- package/dist/api/resources/stt/types/index.d.ts +0 -9
- package/dist/api/resources/stt/types/index.js +0 -25
- package/dist/api/resources/tts/client/Client.d.ts +0 -39
- package/dist/api/resources/tts/client/Client.js +0 -162
- package/dist/api/resources/tts/client/index.d.ts +0 -1
- package/dist/api/resources/tts/client/index.js +0 -2
- package/dist/api/resources/tts/index.d.ts +0 -2
- package/dist/api/resources/tts/index.js +0 -18
- package/dist/api/resources/tts/types/CancelContextRequest.d.ts +0 -10
- package/dist/api/resources/tts/types/CancelContextRequest.js +0 -5
- package/dist/api/resources/tts/types/ContextId.d.ts +0 -9
- package/dist/api/resources/tts/types/ContextId.js +0 -5
- package/dist/api/resources/tts/types/Controls.d.ts +0 -8
- package/dist/api/resources/tts/types/Controls.js +0 -5
- package/dist/api/resources/tts/types/Emotion.d.ts +0 -7
- package/dist/api/resources/tts/types/Emotion.js +0 -5
- package/dist/api/resources/tts/types/EmotionDeprecated.d.ts +0 -38
- package/dist/api/resources/tts/types/EmotionDeprecated.js +0 -33
- package/dist/api/resources/tts/types/FlushId.d.ts +0 -9
- package/dist/api/resources/tts/types/FlushId.js +0 -5
- package/dist/api/resources/tts/types/GenerationConfig.d.ts +0 -15
- package/dist/api/resources/tts/types/GenerationConfig.js +0 -5
- package/dist/api/resources/tts/types/GenerationRequest.d.ts +0 -44
- package/dist/api/resources/tts/types/GenerationRequest.js +0 -5
- package/dist/api/resources/tts/types/ModelSpeed.d.ts +0 -16
- package/dist/api/resources/tts/types/ModelSpeed.js +0 -11
- package/dist/api/resources/tts/types/Mp3OutputFormat.d.ts +0 -9
- package/dist/api/resources/tts/types/Mp3OutputFormat.js +0 -5
- package/dist/api/resources/tts/types/NaturalSpecifier.d.ts +0 -11
- package/dist/api/resources/tts/types/NaturalSpecifier.js +0 -13
- package/dist/api/resources/tts/types/NumericalSpecifier.d.ts +0 -4
- package/dist/api/resources/tts/types/NumericalSpecifier.js +0 -5
- package/dist/api/resources/tts/types/OutputFormat.d.ts +0 -16
- package/dist/api/resources/tts/types/OutputFormat.js +0 -5
- package/dist/api/resources/tts/types/PhonemeTimestamps.d.ts +0 -8
- package/dist/api/resources/tts/types/PhonemeTimestamps.js +0 -5
- package/dist/api/resources/tts/types/RawEncoding.d.ts +0 -10
- package/dist/api/resources/tts/types/RawEncoding.js +0 -12
- package/dist/api/resources/tts/types/RawOutputFormat.d.ts +0 -10
- package/dist/api/resources/tts/types/RawOutputFormat.js +0 -5
- package/dist/api/resources/tts/types/Speed.d.ts +0 -10
- package/dist/api/resources/tts/types/Speed.js +0 -5
- package/dist/api/resources/tts/types/SseOutputFormat.d.ts +0 -10
- package/dist/api/resources/tts/types/SseOutputFormat.js +0 -5
- package/dist/api/resources/tts/types/SupportedLanguage.d.ts +0 -26
- package/dist/api/resources/tts/types/SupportedLanguage.js +0 -23
- package/dist/api/resources/tts/types/TtsRequest.d.ts +0 -21
- package/dist/api/resources/tts/types/TtsRequest.js +0 -5
- package/dist/api/resources/tts/types/TtsRequestEmbeddingSpecifier.d.ts +0 -9
- package/dist/api/resources/tts/types/TtsRequestEmbeddingSpecifier.js +0 -5
- package/dist/api/resources/tts/types/TtsRequestIdSpecifier.d.ts +0 -9
- package/dist/api/resources/tts/types/TtsRequestIdSpecifier.js +0 -5
- package/dist/api/resources/tts/types/TtsRequestVoiceSpecifier.d.ts +0 -5
- package/dist/api/resources/tts/types/TtsRequestVoiceSpecifier.js +0 -5
- package/dist/api/resources/tts/types/TtssseRequest.d.ts +0 -29
- package/dist/api/resources/tts/types/TtssseRequest.js +0 -5
- package/dist/api/resources/tts/types/WavOutputFormat.d.ts +0 -6
- package/dist/api/resources/tts/types/WavOutputFormat.js +0 -5
- package/dist/api/resources/tts/types/WebSocketBaseResponse.d.ts +0 -9
- package/dist/api/resources/tts/types/WebSocketBaseResponse.js +0 -5
- package/dist/api/resources/tts/types/WebSocketChunkResponse.d.ts +0 -8
- package/dist/api/resources/tts/types/WebSocketChunkResponse.js +0 -5
- package/dist/api/resources/tts/types/WebSocketDoneResponse.d.ts +0 -6
- package/dist/api/resources/tts/types/WebSocketDoneResponse.js +0 -5
- package/dist/api/resources/tts/types/WebSocketErrorResponse.d.ts +0 -7
- package/dist/api/resources/tts/types/WebSocketErrorResponse.js +0 -5
- package/dist/api/resources/tts/types/WebSocketFlushDoneResponse.d.ts +0 -8
- package/dist/api/resources/tts/types/WebSocketFlushDoneResponse.js +0 -5
- package/dist/api/resources/tts/types/WebSocketPhonemeTimestampsResponse.d.ts +0 -7
- package/dist/api/resources/tts/types/WebSocketPhonemeTimestampsResponse.js +0 -5
- package/dist/api/resources/tts/types/WebSocketRawOutputFormat.d.ts +0 -10
- package/dist/api/resources/tts/types/WebSocketRawOutputFormat.js +0 -5
- package/dist/api/resources/tts/types/WebSocketRequest.d.ts +0 -11
- package/dist/api/resources/tts/types/WebSocketRequest.js +0 -5
- package/dist/api/resources/tts/types/WebSocketResponse.d.ts +0 -25
- package/dist/api/resources/tts/types/WebSocketResponse.js +0 -5
- package/dist/api/resources/tts/types/WebSocketStreamOptions.d.ts +0 -6
- package/dist/api/resources/tts/types/WebSocketStreamOptions.js +0 -5
- package/dist/api/resources/tts/types/WebSocketTimestampsResponse.d.ts +0 -7
- package/dist/api/resources/tts/types/WebSocketTimestampsResponse.js +0 -5
- package/dist/api/resources/tts/types/WebSocketTtsOutput.d.ts +0 -12
- package/dist/api/resources/tts/types/WebSocketTtsOutput.js +0 -5
- package/dist/api/resources/tts/types/WebSocketTtsRequest.d.ts +0 -25
- package/dist/api/resources/tts/types/WebSocketTtsRequest.js +0 -5
- package/dist/api/resources/tts/types/WordTimestamps.d.ts +0 -8
- package/dist/api/resources/tts/types/WordTimestamps.js +0 -5
- package/dist/api/resources/tts/types/index.d.ts +0 -39
- package/dist/api/resources/tts/types/index.js +0 -55
- package/dist/api/resources/voiceChanger/client/Client.d.ts +0 -46
- package/dist/api/resources/voiceChanger/client/Client.js +0 -195
- package/dist/api/resources/voiceChanger/client/index.d.ts +0 -1
- package/dist/api/resources/voiceChanger/client/index.js +0 -17
- package/dist/api/resources/voiceChanger/client/requests/VoiceChangerBytesRequest.d.ts +0 -39
- package/dist/api/resources/voiceChanger/client/requests/VoiceChangerBytesRequest.js +0 -5
- package/dist/api/resources/voiceChanger/client/requests/VoiceChangerSseRequest.d.ts +0 -39
- package/dist/api/resources/voiceChanger/client/requests/VoiceChangerSseRequest.js +0 -5
- package/dist/api/resources/voiceChanger/client/requests/index.d.ts +0 -2
- package/dist/api/resources/voiceChanger/client/requests/index.js +0 -2
- package/dist/api/resources/voiceChanger/index.d.ts +0 -2
- package/dist/api/resources/voiceChanger/index.js +0 -18
- package/dist/api/resources/voiceChanger/types/OutputFormatContainer.d.ts +0 -9
- package/dist/api/resources/voiceChanger/types/OutputFormatContainer.js +0 -11
- package/dist/api/resources/voiceChanger/types/StreamingResponse.d.ts +0 -16
- package/dist/api/resources/voiceChanger/types/StreamingResponse.js +0 -5
- package/dist/api/resources/voiceChanger/types/index.d.ts +0 -2
- package/dist/api/resources/voiceChanger/types/index.js +0 -18
- package/dist/api/resources/voices/client/Client.d.ts +0 -150
- package/dist/api/resources/voices/client/Client.js +0 -530
- package/dist/api/resources/voices/client/index.d.ts +0 -1
- package/dist/api/resources/voices/client/index.js +0 -17
- package/dist/api/resources/voices/client/requests/CloneVoiceRequest.d.ts +0 -35
- package/dist/api/resources/voices/client/requests/CloneVoiceRequest.js +0 -5
- package/dist/api/resources/voices/client/requests/index.d.ts +0 -1
- package/dist/api/resources/voices/client/requests/index.js +0 -2
- package/dist/api/resources/voices/index.d.ts +0 -2
- package/dist/api/resources/voices/index.js +0 -18
- package/dist/api/resources/voices/types/BaseVoiceId.d.ts +0 -8
- package/dist/api/resources/voices/types/BaseVoiceId.js +0 -5
- package/dist/api/resources/voices/types/CloneMode.d.ts +0 -8
- package/dist/api/resources/voices/types/CloneMode.js +0 -10
- package/dist/api/resources/voices/types/CreateVoiceRequest.d.ts +0 -13
- package/dist/api/resources/voices/types/CreateVoiceRequest.js +0 -5
- package/dist/api/resources/voices/types/EmbeddingResponse.d.ts +0 -7
- package/dist/api/resources/voices/types/EmbeddingResponse.js +0 -5
- package/dist/api/resources/voices/types/EmbeddingSpecifier.d.ts +0 -8
- package/dist/api/resources/voices/types/EmbeddingSpecifier.js +0 -5
- package/dist/api/resources/voices/types/Gender.d.ts +0 -8
- package/dist/api/resources/voices/types/Gender.js +0 -10
- package/dist/api/resources/voices/types/IdSpecifier.d.ts +0 -8
- package/dist/api/resources/voices/types/IdSpecifier.js +0 -5
- package/dist/api/resources/voices/types/LocalizeDialect.d.ts +0 -20
- package/dist/api/resources/voices/types/LocalizeDialect.js +0 -5
- package/dist/api/resources/voices/types/LocalizeEnglishDialect.d.ts +0 -11
- package/dist/api/resources/voices/types/LocalizeEnglishDialect.js +0 -13
- package/dist/api/resources/voices/types/LocalizeFrenchDialect.d.ts +0 -8
- package/dist/api/resources/voices/types/LocalizeFrenchDialect.js +0 -10
- package/dist/api/resources/voices/types/LocalizePortugueseDialect.d.ts +0 -8
- package/dist/api/resources/voices/types/LocalizePortugueseDialect.js +0 -10
- package/dist/api/resources/voices/types/LocalizeSpanishDialect.d.ts +0 -8
- package/dist/api/resources/voices/types/LocalizeSpanishDialect.js +0 -10
- package/dist/api/resources/voices/types/LocalizeTargetLanguage.d.ts +0 -26
- package/dist/api/resources/voices/types/LocalizeTargetLanguage.js +0 -23
- package/dist/api/resources/voices/types/LocalizeVoiceRequest.d.ts +0 -15
- package/dist/api/resources/voices/types/LocalizeVoiceRequest.js +0 -5
- package/dist/api/resources/voices/types/MixVoiceSpecifier.d.ts +0 -5
- package/dist/api/resources/voices/types/MixVoiceSpecifier.js +0 -5
- package/dist/api/resources/voices/types/MixVoicesRequest.d.ts +0 -7
- package/dist/api/resources/voices/types/MixVoicesRequest.js +0 -5
- package/dist/api/resources/voices/types/UpdateVoiceRequest.d.ts +0 -9
- package/dist/api/resources/voices/types/UpdateVoiceRequest.js +0 -5
- package/dist/api/resources/voices/types/Voice.d.ts +0 -19
- package/dist/api/resources/voices/types/Voice.js +0 -5
- package/dist/api/resources/voices/types/VoiceId.d.ts +0 -7
- package/dist/api/resources/voices/types/VoiceId.js +0 -5
- package/dist/api/resources/voices/types/VoiceMetadata.d.ts +0 -18
- package/dist/api/resources/voices/types/VoiceMetadata.js +0 -5
- package/dist/api/resources/voices/types/Weight.d.ts +0 -7
- package/dist/api/resources/voices/types/Weight.js +0 -5
- package/dist/api/resources/voices/types/index.d.ts +0 -21
- package/dist/api/resources/voices/types/index.js +0 -37
- package/dist/core/fetcher/APIResponse.d.ts +0 -10
- package/dist/core/fetcher/APIResponse.js +0 -2
- package/dist/core/fetcher/Fetcher.d.ts +0 -39
- package/dist/core/fetcher/Fetcher.js +0 -100
- package/dist/core/fetcher/Supplier.d.ts +0 -4
- package/dist/core/fetcher/Supplier.js +0 -22
- package/dist/core/fetcher/createRequestUrl.d.ts +0 -1
- package/dist/core/fetcher/createRequestUrl.js +0 -12
- package/dist/core/fetcher/getFetchFn.d.ts +0 -4
- package/dist/core/fetcher/getFetchFn.js +0 -68
- package/dist/core/fetcher/getHeader.d.ts +0 -1
- package/dist/core/fetcher/getHeader.js +0 -11
- package/dist/core/fetcher/getRequestBody.d.ts +0 -7
- package/dist/core/fetcher/getRequestBody.js +0 -23
- package/dist/core/fetcher/getResponseBody.d.ts +0 -1
- package/dist/core/fetcher/getResponseBody.js +0 -54
- package/dist/core/fetcher/index.d.ts +0 -5
- package/dist/core/fetcher/index.js +0 -9
- package/dist/core/fetcher/makeRequest.d.ts +0 -1
- package/dist/core/fetcher/makeRequest.js +0 -42
- package/dist/core/fetcher/requestWithRetries.d.ts +0 -1
- package/dist/core/fetcher/requestWithRetries.js +0 -40
- package/dist/core/fetcher/signals.d.ts +0 -11
- package/dist/core/fetcher/signals.js +0 -36
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +0 -30
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +0 -247
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -21
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +0 -126
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +0 -31
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +0 -229
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +0 -18
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +0 -59
- package/dist/core/form-data-utils/FormDataWrapper.d.ts +0 -60
- package/dist/core/form-data-utils/FormDataWrapper.js +0 -184
- package/dist/core/form-data-utils/index.d.ts +0 -1
- package/dist/core/form-data-utils/index.js +0 -17
- package/dist/core/index.d.ts +0 -5
- package/dist/core/index.js +0 -44
- package/dist/core/json.d.ts +0 -15
- package/dist/core/json.js +0 -24
- package/dist/core/runtime/index.d.ts +0 -1
- package/dist/core/runtime/index.js +0 -5
- package/dist/core/runtime/runtime.d.ts +0 -9
- package/dist/core/runtime/runtime.js +0 -103
- package/dist/core/schemas/Schema.d.ts +0 -87
- package/dist/core/schemas/Schema.js +0 -24
- package/dist/core/schemas/builders/bigint/bigint.d.ts +0 -2
- package/dist/core/schemas/builders/bigint/bigint.js +0 -53
- package/dist/core/schemas/builders/bigint/index.d.ts +0 -1
- package/dist/core/schemas/builders/bigint/index.js +0 -5
- package/dist/core/schemas/builders/date/date.d.ts +0 -2
- package/dist/core/schemas/builders/date/date.js +0 -62
- package/dist/core/schemas/builders/date/index.d.ts +0 -1
- package/dist/core/schemas/builders/date/index.js +0 -5
- package/dist/core/schemas/builders/enum/enum.d.ts +0 -2
- package/dist/core/schemas/builders/enum/enum.js +0 -38
- package/dist/core/schemas/builders/enum/index.d.ts +0 -1
- package/dist/core/schemas/builders/enum/index.js +0 -5
- package/dist/core/schemas/builders/index.d.ts +0 -14
- package/dist/core/schemas/builders/index.js +0 -30
- package/dist/core/schemas/builders/lazy/index.d.ts +0 -3
- package/dist/core/schemas/builders/lazy/index.js +0 -7
- package/dist/core/schemas/builders/lazy/lazy.d.ts +0 -5
- package/dist/core/schemas/builders/lazy/lazy.js +0 -24
- package/dist/core/schemas/builders/lazy/lazyObject.d.ts +0 -3
- package/dist/core/schemas/builders/lazy/lazyObject.js +0 -11
- package/dist/core/schemas/builders/list/index.d.ts +0 -1
- package/dist/core/schemas/builders/list/index.js +0 -5
- package/dist/core/schemas/builders/list/list.d.ts +0 -2
- package/dist/core/schemas/builders/list/list.js +0 -54
- package/dist/core/schemas/builders/literals/booleanLiteral.d.ts +0 -2
- package/dist/core/schemas/builders/literals/booleanLiteral.js +0 -28
- package/dist/core/schemas/builders/literals/index.d.ts +0 -2
- package/dist/core/schemas/builders/literals/index.js +0 -7
- package/dist/core/schemas/builders/literals/stringLiteral.d.ts +0 -2
- package/dist/core/schemas/builders/literals/stringLiteral.js +0 -28
- package/dist/core/schemas/builders/object/index.d.ts +0 -6
- package/dist/core/schemas/builders/object/index.js +0 -11
- package/dist/core/schemas/builders/object/object.d.ts +0 -3
- package/dist/core/schemas/builders/object/object.js +0 -261
- package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +0 -6
- package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.js +0 -7
- package/dist/core/schemas/builders/object/property.d.ts +0 -8
- package/dist/core/schemas/builders/object/property.js +0 -15
- package/dist/core/schemas/builders/object/types.d.ts +0 -31
- package/dist/core/schemas/builders/object/types.js +0 -2
- package/dist/core/schemas/builders/object-like/getObjectLikeUtils.d.ts +0 -9
- package/dist/core/schemas/builders/object-like/getObjectLikeUtils.js +0 -53
- package/dist/core/schemas/builders/object-like/index.d.ts +0 -2
- package/dist/core/schemas/builders/object-like/index.js +0 -6
- package/dist/core/schemas/builders/object-like/types.d.ts +0 -7
- package/dist/core/schemas/builders/object-like/types.js +0 -2
- package/dist/core/schemas/builders/primitives/any.d.ts +0 -1
- package/dist/core/schemas/builders/primitives/any.js +0 -6
- package/dist/core/schemas/builders/primitives/boolean.d.ts +0 -1
- package/dist/core/schemas/builders/primitives/boolean.js +0 -25
- package/dist/core/schemas/builders/primitives/index.d.ts +0 -5
- package/dist/core/schemas/builders/primitives/index.js +0 -13
- package/dist/core/schemas/builders/primitives/number.d.ts +0 -1
- package/dist/core/schemas/builders/primitives/number.js +0 -25
- package/dist/core/schemas/builders/primitives/string.d.ts +0 -1
- package/dist/core/schemas/builders/primitives/string.js +0 -25
- package/dist/core/schemas/builders/primitives/unknown.d.ts +0 -1
- package/dist/core/schemas/builders/primitives/unknown.js +0 -6
- package/dist/core/schemas/builders/record/index.d.ts +0 -2
- package/dist/core/schemas/builders/record/index.js +0 -5
- package/dist/core/schemas/builders/record/record.d.ts +0 -3
- package/dist/core/schemas/builders/record/record.js +0 -93
- package/dist/core/schemas/builders/record/types.d.ts +0 -4
- package/dist/core/schemas/builders/record/types.js +0 -2
- package/dist/core/schemas/builders/schema-utils/JsonError.d.ts +0 -5
- package/dist/core/schemas/builders/schema-utils/JsonError.js +0 -12
- package/dist/core/schemas/builders/schema-utils/ParseError.d.ts +0 -5
- package/dist/core/schemas/builders/schema-utils/ParseError.js +0 -12
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +0 -21
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +0 -145
- package/dist/core/schemas/builders/schema-utils/index.d.ts +0 -4
- package/dist/core/schemas/builders/schema-utils/index.js +0 -11
- package/dist/core/schemas/builders/schema-utils/stringifyValidationErrors.d.ts +0 -2
- package/dist/core/schemas/builders/schema-utils/stringifyValidationErrors.js +0 -9
- package/dist/core/schemas/builders/set/index.d.ts +0 -1
- package/dist/core/schemas/builders/set/index.js +0 -5
- package/dist/core/schemas/builders/set/set.d.ts +0 -2
- package/dist/core/schemas/builders/set/set.js +0 -43
- package/dist/core/schemas/builders/undiscriminated-union/index.d.ts +0 -2
- package/dist/core/schemas/builders/undiscriminated-union/index.js +0 -5
- package/dist/core/schemas/builders/undiscriminated-union/types.d.ts +0 -4
- package/dist/core/schemas/builders/undiscriminated-union/types.js +0 -2
- package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.d.ts +0 -3
- package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +0 -39
- package/dist/core/schemas/builders/union/discriminant.d.ts +0 -5
- package/dist/core/schemas/builders/union/discriminant.js +0 -9
- package/dist/core/schemas/builders/union/index.d.ts +0 -4
- package/dist/core/schemas/builders/union/index.js +0 -7
- package/dist/core/schemas/builders/union/types.d.ts +0 -13
- package/dist/core/schemas/builders/union/types.js +0 -2
- package/dist/core/schemas/builders/union/union.d.ts +0 -4
- package/dist/core/schemas/builders/union/union.js +0 -129
- package/dist/core/schemas/index.d.ts +0 -2
- package/dist/core/schemas/index.js +0 -17
- package/dist/core/schemas/utils/MaybePromise.d.ts +0 -1
- package/dist/core/schemas/utils/MaybePromise.js +0 -2
- package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +0 -7
- package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.js +0 -2
- package/dist/core/schemas/utils/createIdentitySchemaCreator.d.ts +0 -2
- package/dist/core/schemas/utils/createIdentitySchemaCreator.js +0 -15
- package/dist/core/schemas/utils/entries.d.ts +0 -1
- package/dist/core/schemas/utils/entries.js +0 -6
- package/dist/core/schemas/utils/filterObject.d.ts +0 -1
- package/dist/core/schemas/utils/filterObject.js +0 -13
- package/dist/core/schemas/utils/getErrorMessageForIncorrectType.d.ts +0 -1
- package/dist/core/schemas/utils/getErrorMessageForIncorrectType.js +0 -27
- package/dist/core/schemas/utils/isPlainObject.d.ts +0 -1
- package/dist/core/schemas/utils/isPlainObject.js +0 -17
- package/dist/core/schemas/utils/keys.d.ts +0 -1
- package/dist/core/schemas/utils/keys.js +0 -6
- package/dist/core/schemas/utils/maybeSkipValidation.d.ts +0 -2
- package/dist/core/schemas/utils/maybeSkipValidation.js +0 -27
- package/dist/core/schemas/utils/partition.d.ts +0 -1
- package/dist/core/schemas/utils/partition.js +0 -15
- package/dist/core/streaming-fetcher/Stream.d.ts +0 -47
- package/dist/core/streaming-fetcher/Stream.js +0 -169
- package/dist/core/streaming-fetcher/index.d.ts +0 -1
- package/dist/core/streaming-fetcher/index.js +0 -5
- package/dist/core/websocket/events.d.ts +0 -36
- package/dist/core/websocket/events.js +0 -27
- package/dist/core/websocket/index.d.ts +0 -1
- package/dist/core/websocket/index.js +0 -17
- package/dist/core/websocket/ws.d.ts +0 -137
- package/dist/core/websocket/ws.js +0 -448
- package/dist/environments.d.ts +0 -7
- package/dist/environments.js +0 -9
- package/dist/errors/CartesiaError.d.ts +0 -12
- package/dist/errors/CartesiaError.js +0 -33
- package/dist/errors/CartesiaTimeoutError.d.ts +0 -6
- package/dist/errors/CartesiaTimeoutError.js +0 -13
- package/dist/errors/index.d.ts +0 -2
- package/dist/errors/index.js +0 -7
- package/dist/index.d.ts +0 -7
- package/dist/index.js +0 -53
- package/dist/serialization/index.d.ts +0 -1
- package/dist/serialization/index.js +0 -17
- package/dist/serialization/resources/apiStatus/index.d.ts +0 -1
- package/dist/serialization/resources/apiStatus/index.js +0 -17
- package/dist/serialization/resources/apiStatus/types/ApiInfo.d.ts +0 -13
- package/dist/serialization/resources/apiStatus/types/ApiInfo.js +0 -44
- package/dist/serialization/resources/apiStatus/types/index.d.ts +0 -1
- package/dist/serialization/resources/apiStatus/types/index.js +0 -17
- package/dist/serialization/resources/auth/index.d.ts +0 -1
- package/dist/serialization/resources/auth/index.js +0 -17
- package/dist/serialization/resources/auth/types/TokenGrant.d.ts +0 -13
- package/dist/serialization/resources/auth/types/TokenGrant.js +0 -44
- package/dist/serialization/resources/auth/types/TokenRequest.d.ts +0 -14
- package/dist/serialization/resources/auth/types/TokenRequest.js +0 -45
- package/dist/serialization/resources/auth/types/TokenResponse.d.ts +0 -12
- package/dist/serialization/resources/auth/types/TokenResponse.js +0 -43
- package/dist/serialization/resources/auth/types/index.d.ts +0 -3
- package/dist/serialization/resources/auth/types/index.js +0 -19
- package/dist/serialization/resources/embedding/index.d.ts +0 -1
- package/dist/serialization/resources/embedding/index.js +0 -17
- package/dist/serialization/resources/embedding/types/Embedding.d.ts +0 -10
- package/dist/serialization/resources/embedding/types/Embedding.js +0 -41
- package/dist/serialization/resources/embedding/types/index.d.ts +0 -1
- package/dist/serialization/resources/embedding/types/index.js +0 -17
- package/dist/serialization/resources/index.d.ts +0 -14
- package/dist/serialization/resources/index.js +0 -53
- package/dist/serialization/resources/stt/index.d.ts +0 -1
- package/dist/serialization/resources/stt/index.js +0 -17
- package/dist/serialization/resources/stt/types/DoneMessage.d.ts +0 -12
- package/dist/serialization/resources/stt/types/DoneMessage.js +0 -43
- package/dist/serialization/resources/stt/types/ErrorMessage.d.ts +0 -13
- package/dist/serialization/resources/stt/types/ErrorMessage.js +0 -44
- package/dist/serialization/resources/stt/types/FlushDoneMessage.d.ts +0 -12
- package/dist/serialization/resources/stt/types/FlushDoneMessage.js +0 -43
- package/dist/serialization/resources/stt/types/StreamingTranscriptionResponse.d.ts +0 -26
- package/dist/serialization/resources/stt/types/StreamingTranscriptionResponse.js +0 -55
- package/dist/serialization/resources/stt/types/SttEncoding.d.ts +0 -10
- package/dist/serialization/resources/stt/types/SttEncoding.js +0 -41
- package/dist/serialization/resources/stt/types/TimestampGranularity.d.ts +0 -10
- package/dist/serialization/resources/stt/types/TimestampGranularity.js +0 -41
- package/dist/serialization/resources/stt/types/TranscriptMessage.d.ts +0 -18
- package/dist/serialization/resources/stt/types/TranscriptMessage.js +0 -49
- package/dist/serialization/resources/stt/types/TranscriptionResponse.d.ts +0 -16
- package/dist/serialization/resources/stt/types/TranscriptionResponse.js +0 -47
- package/dist/serialization/resources/stt/types/TranscriptionWord.d.ts +0 -14
- package/dist/serialization/resources/stt/types/TranscriptionWord.js +0 -45
- package/dist/serialization/resources/stt/types/index.d.ts +0 -9
- package/dist/serialization/resources/stt/types/index.js +0 -25
- package/dist/serialization/resources/tts/index.d.ts +0 -1
- package/dist/serialization/resources/tts/index.js +0 -17
- package/dist/serialization/resources/tts/types/CancelContextRequest.d.ts +0 -14
- package/dist/serialization/resources/tts/types/CancelContextRequest.js +0 -45
- package/dist/serialization/resources/tts/types/ContextId.d.ts +0 -10
- package/dist/serialization/resources/tts/types/ContextId.js +0 -41
- package/dist/serialization/resources/tts/types/Controls.d.ts +0 -15
- package/dist/serialization/resources/tts/types/Controls.js +0 -46
- package/dist/serialization/resources/tts/types/Emotion.d.ts +0 -10
- package/dist/serialization/resources/tts/types/Emotion.js +0 -41
- package/dist/serialization/resources/tts/types/EmotionDeprecated.d.ts +0 -10
- package/dist/serialization/resources/tts/types/EmotionDeprecated.js +0 -67
- package/dist/serialization/resources/tts/types/FlushId.d.ts +0 -10
- package/dist/serialization/resources/tts/types/FlushId.js +0 -41
- package/dist/serialization/resources/tts/types/GenerationConfig.d.ts +0 -15
- package/dist/serialization/resources/tts/types/GenerationConfig.js +0 -46
- package/dist/serialization/resources/tts/types/GenerationRequest.d.ts +0 -33
- package/dist/serialization/resources/tts/types/GenerationRequest.js +0 -64
- package/dist/serialization/resources/tts/types/ModelSpeed.d.ts +0 -10
- package/dist/serialization/resources/tts/types/ModelSpeed.js +0 -41
- package/dist/serialization/resources/tts/types/Mp3OutputFormat.d.ts +0 -13
- package/dist/serialization/resources/tts/types/Mp3OutputFormat.js +0 -44
- package/dist/serialization/resources/tts/types/NaturalSpecifier.d.ts +0 -10
- package/dist/serialization/resources/tts/types/NaturalSpecifier.js +0 -41
- package/dist/serialization/resources/tts/types/NumericalSpecifier.d.ts +0 -10
- package/dist/serialization/resources/tts/types/NumericalSpecifier.js +0 -41
- package/dist/serialization/resources/tts/types/OutputFormat.d.ts +0 -22
- package/dist/serialization/resources/tts/types/OutputFormat.js +0 -53
- package/dist/serialization/resources/tts/types/PhonemeTimestamps.d.ts +0 -14
- package/dist/serialization/resources/tts/types/PhonemeTimestamps.js +0 -45
- package/dist/serialization/resources/tts/types/RawEncoding.d.ts +0 -10
- package/dist/serialization/resources/tts/types/RawEncoding.js +0 -41
- package/dist/serialization/resources/tts/types/RawOutputFormat.d.ts +0 -15
- package/dist/serialization/resources/tts/types/RawOutputFormat.js +0 -46
- package/dist/serialization/resources/tts/types/Speed.d.ts +0 -12
- package/dist/serialization/resources/tts/types/Speed.js +0 -43
- package/dist/serialization/resources/tts/types/SseOutputFormat.d.ts +0 -15
- package/dist/serialization/resources/tts/types/SseOutputFormat.js +0 -46
- package/dist/serialization/resources/tts/types/SupportedLanguage.d.ts +0 -10
- package/dist/serialization/resources/tts/types/SupportedLanguage.js +0 -57
- package/dist/serialization/resources/tts/types/TtsRequest.d.ts +0 -25
- package/dist/serialization/resources/tts/types/TtsRequest.js +0 -56
- package/dist/serialization/resources/tts/types/TtsRequestEmbeddingSpecifier.d.ts +0 -16
- package/dist/serialization/resources/tts/types/TtsRequestEmbeddingSpecifier.js +0 -47
- package/dist/serialization/resources/tts/types/TtsRequestIdSpecifier.d.ts +0 -16
- package/dist/serialization/resources/tts/types/TtsRequestIdSpecifier.js +0 -47
- package/dist/serialization/resources/tts/types/TtsRequestVoiceSpecifier.d.ts +0 -12
- package/dist/serialization/resources/tts/types/TtsRequestVoiceSpecifier.js +0 -43
- package/dist/serialization/resources/tts/types/TtssseRequest.d.ts +0 -30
- package/dist/serialization/resources/tts/types/TtssseRequest.js +0 -61
- package/dist/serialization/resources/tts/types/WavOutputFormat.d.ts +0 -12
- package/dist/serialization/resources/tts/types/WavOutputFormat.js +0 -42
- package/dist/serialization/resources/tts/types/WebSocketBaseResponse.d.ts +0 -15
- package/dist/serialization/resources/tts/types/WebSocketBaseResponse.js +0 -46
- package/dist/serialization/resources/tts/types/WebSocketChunkResponse.d.ts +0 -14
- package/dist/serialization/resources/tts/types/WebSocketChunkResponse.js +0 -47
- package/dist/serialization/resources/tts/types/WebSocketDoneResponse.d.ts +0 -12
- package/dist/serialization/resources/tts/types/WebSocketDoneResponse.js +0 -42
- package/dist/serialization/resources/tts/types/WebSocketErrorResponse.d.ts +0 -13
- package/dist/serialization/resources/tts/types/WebSocketErrorResponse.js +0 -46
- package/dist/serialization/resources/tts/types/WebSocketFlushDoneResponse.d.ts +0 -15
- package/dist/serialization/resources/tts/types/WebSocketFlushDoneResponse.js +0 -48
- package/dist/serialization/resources/tts/types/WebSocketPhonemeTimestampsResponse.d.ts +0 -14
- package/dist/serialization/resources/tts/types/WebSocketPhonemeTimestampsResponse.js +0 -47
- package/dist/serialization/resources/tts/types/WebSocketRawOutputFormat.d.ts +0 -15
- package/dist/serialization/resources/tts/types/WebSocketRawOutputFormat.js +0 -46
- package/dist/serialization/resources/tts/types/WebSocketRequest.d.ts +0 -12
- package/dist/serialization/resources/tts/types/WebSocketRequest.js +0 -43
- package/dist/serialization/resources/tts/types/WebSocketResponse.d.ts +0 -34
- package/dist/serialization/resources/tts/types/WebSocketResponse.js +0 -59
- package/dist/serialization/resources/tts/types/WebSocketStreamOptions.d.ts +0 -12
- package/dist/serialization/resources/tts/types/WebSocketStreamOptions.js +0 -43
- package/dist/serialization/resources/tts/types/WebSocketTimestampsResponse.d.ts +0 -14
- package/dist/serialization/resources/tts/types/WebSocketTimestampsResponse.js +0 -47
- package/dist/serialization/resources/tts/types/WebSocketTtsOutput.d.ts +0 -21
- package/dist/serialization/resources/tts/types/WebSocketTtsOutput.js +0 -52
- package/dist/serialization/resources/tts/types/WebSocketTtsRequest.d.ts +0 -30
- package/dist/serialization/resources/tts/types/WebSocketTtsRequest.js +0 -61
- package/dist/serialization/resources/tts/types/WordTimestamps.d.ts +0 -14
- package/dist/serialization/resources/tts/types/WordTimestamps.js +0 -45
- package/dist/serialization/resources/tts/types/index.d.ts +0 -39
- package/dist/serialization/resources/tts/types/index.js +0 -55
- package/dist/serialization/resources/voiceChanger/index.d.ts +0 -1
- package/dist/serialization/resources/voiceChanger/index.js +0 -17
- package/dist/serialization/resources/voiceChanger/types/OutputFormatContainer.d.ts +0 -10
- package/dist/serialization/resources/voiceChanger/types/OutputFormatContainer.js +0 -41
- package/dist/serialization/resources/voiceChanger/types/StreamingResponse.d.ts +0 -22
- package/dist/serialization/resources/voiceChanger/types/StreamingResponse.js +0 -53
- package/dist/serialization/resources/voiceChanger/types/index.d.ts +0 -2
- package/dist/serialization/resources/voiceChanger/types/index.js +0 -18
- package/dist/serialization/resources/voices/client/index.d.ts +0 -1
- package/dist/serialization/resources/voices/client/index.js +0 -37
- package/dist/serialization/resources/voices/client/list.d.ts +0 -11
- package/dist/serialization/resources/voices/client/list.js +0 -42
- package/dist/serialization/resources/voices/index.d.ts +0 -2
- package/dist/serialization/resources/voices/index.js +0 -18
- package/dist/serialization/resources/voices/types/BaseVoiceId.d.ts +0 -11
- package/dist/serialization/resources/voices/types/BaseVoiceId.js +0 -8
- package/dist/serialization/resources/voices/types/CloneMode.d.ts +0 -10
- package/dist/serialization/resources/voices/types/CloneMode.js +0 -41
- package/dist/serialization/resources/voices/types/CreateVoiceRequest.d.ts +0 -19
- package/dist/serialization/resources/voices/types/CreateVoiceRequest.js +0 -50
- package/dist/serialization/resources/voices/types/EmbeddingResponse.d.ts +0 -13
- package/dist/serialization/resources/voices/types/EmbeddingResponse.js +0 -44
- package/dist/serialization/resources/voices/types/EmbeddingSpecifier.d.ts +0 -15
- package/dist/serialization/resources/voices/types/EmbeddingSpecifier.js +0 -46
- package/dist/serialization/resources/voices/types/Gender.d.ts +0 -10
- package/dist/serialization/resources/voices/types/Gender.js +0 -44
- package/dist/serialization/resources/voices/types/IdSpecifier.d.ts +0 -15
- package/dist/serialization/resources/voices/types/IdSpecifier.js +0 -46
- package/dist/serialization/resources/voices/types/LocalizeDialect.d.ts +0 -14
- package/dist/serialization/resources/voices/types/LocalizeDialect.js +0 -50
- package/dist/serialization/resources/voices/types/LocalizeEnglishDialect.d.ts +0 -10
- package/dist/serialization/resources/voices/types/LocalizeEnglishDialect.js +0 -41
- package/dist/serialization/resources/voices/types/LocalizeFrenchDialect.d.ts +0 -10
- package/dist/serialization/resources/voices/types/LocalizeFrenchDialect.js +0 -41
- package/dist/serialization/resources/voices/types/LocalizePortugueseDialect.d.ts +0 -10
- package/dist/serialization/resources/voices/types/LocalizePortugueseDialect.js +0 -41
- package/dist/serialization/resources/voices/types/LocalizeSpanishDialect.d.ts +0 -10
- package/dist/serialization/resources/voices/types/LocalizeSpanishDialect.js +0 -41
- package/dist/serialization/resources/voices/types/LocalizeTargetLanguage.d.ts +0 -10
- package/dist/serialization/resources/voices/types/LocalizeTargetLanguage.js +0 -57
- package/dist/serialization/resources/voices/types/LocalizeVoiceRequest.d.ts +0 -20
- package/dist/serialization/resources/voices/types/LocalizeVoiceRequest.js +0 -51
- package/dist/serialization/resources/voices/types/MixVoiceSpecifier.d.ts +0 -12
- package/dist/serialization/resources/voices/types/MixVoiceSpecifier.js +0 -43
- package/dist/serialization/resources/voices/types/MixVoicesRequest.d.ts +0 -13
- package/dist/serialization/resources/voices/types/MixVoicesRequest.js +0 -44
- package/dist/serialization/resources/voices/types/UpdateVoiceRequest.d.ts +0 -13
- package/dist/serialization/resources/voices/types/UpdateVoiceRequest.js +0 -44
- package/dist/serialization/resources/voices/types/Voice.d.ts +0 -22
- package/dist/serialization/resources/voices/types/Voice.js +0 -53
- package/dist/serialization/resources/voices/types/VoiceId.d.ts +0 -10
- package/dist/serialization/resources/voices/types/VoiceId.js +0 -41
- package/dist/serialization/resources/voices/types/VoiceMetadata.d.ts +0 -20
- package/dist/serialization/resources/voices/types/VoiceMetadata.js +0 -51
- package/dist/serialization/resources/voices/types/Weight.d.ts +0 -10
- package/dist/serialization/resources/voices/types/Weight.js +0 -41
- package/dist/serialization/resources/voices/types/index.d.ts +0 -21
- package/dist/serialization/resources/voices/types/index.js +0 -37
- package/dist/version.d.ts +0 -1
- package/dist/version.js +0 -4
- package/dist/wrapper/Client.d.ts +0 -9
- package/dist/wrapper/Client.js +0 -17
- package/dist/wrapper/StreamingSTTClient.d.ts +0 -26
- package/dist/wrapper/StreamingSTTClient.js +0 -140
- package/dist/wrapper/StreamingTTSClient.d.ts +0 -16
- package/dist/wrapper/StreamingTTSClient.js +0 -23
- package/dist/wrapper/SttWebsocket.d.ts +0 -34
- package/dist/wrapper/SttWebsocket.js +0 -219
- package/dist/wrapper/WebPlayer.d.ts +0 -44
- package/dist/wrapper/WebPlayer.js +0 -141
- package/dist/wrapper/Websocket.d.ts +0 -40
- package/dist/wrapper/Websocket.js +0 -243
- package/dist/wrapper/source.d.ts +0 -65
- package/dist/wrapper/source.js +0 -179
- package/dist/wrapper/utils.d.ts +0 -105
- package/dist/wrapper/utils.js +0 -173
- package/environments.d.ts +0 -7
- package/environments.js +0 -9
- package/errors/CartesiaError.d.ts +0 -12
- package/errors/CartesiaError.js +0 -33
- package/errors/CartesiaTimeoutError.d.ts +0 -6
- package/errors/CartesiaTimeoutError.js +0 -13
- package/errors/index.d.ts +0 -2
- package/errors/index.js +0 -7
- package/jest.config.mjs +0 -8
- package/reference.md +0 -1052
- package/scripts/rename-to-esm-files.js +0 -115
- package/serialization/index.d.ts +0 -1
- package/serialization/index.js +0 -17
- package/serialization/resources/apiStatus/index.d.ts +0 -1
- package/serialization/resources/apiStatus/index.js +0 -17
- package/serialization/resources/apiStatus/types/ApiInfo.d.ts +0 -13
- package/serialization/resources/apiStatus/types/ApiInfo.js +0 -44
- package/serialization/resources/apiStatus/types/index.d.ts +0 -1
- package/serialization/resources/apiStatus/types/index.js +0 -17
- package/serialization/resources/auth/index.d.ts +0 -1
- package/serialization/resources/auth/index.js +0 -17
- package/serialization/resources/auth/types/TokenGrant.d.ts +0 -13
- package/serialization/resources/auth/types/TokenGrant.js +0 -44
- package/serialization/resources/auth/types/TokenRequest.d.ts +0 -14
- package/serialization/resources/auth/types/TokenRequest.js +0 -45
- package/serialization/resources/auth/types/TokenResponse.d.ts +0 -12
- package/serialization/resources/auth/types/TokenResponse.js +0 -43
- package/serialization/resources/auth/types/index.d.ts +0 -3
- package/serialization/resources/auth/types/index.js +0 -19
- package/serialization/resources/embedding/index.d.ts +0 -1
- package/serialization/resources/embedding/index.js +0 -17
- package/serialization/resources/embedding/types/Embedding.d.ts +0 -10
- package/serialization/resources/embedding/types/Embedding.js +0 -41
- package/serialization/resources/embedding/types/index.d.ts +0 -1
- package/serialization/resources/embedding/types/index.js +0 -17
- package/serialization/resources/index.d.ts +0 -14
- package/serialization/resources/index.js +0 -53
- package/serialization/resources/stt/index.d.ts +0 -1
- package/serialization/resources/stt/index.js +0 -17
- package/serialization/resources/stt/types/DoneMessage.d.ts +0 -12
- package/serialization/resources/stt/types/DoneMessage.js +0 -43
- package/serialization/resources/stt/types/ErrorMessage.d.ts +0 -13
- package/serialization/resources/stt/types/ErrorMessage.js +0 -44
- package/serialization/resources/stt/types/FlushDoneMessage.d.ts +0 -12
- package/serialization/resources/stt/types/FlushDoneMessage.js +0 -43
- package/serialization/resources/stt/types/StreamingTranscriptionResponse.d.ts +0 -26
- package/serialization/resources/stt/types/StreamingTranscriptionResponse.js +0 -55
- package/serialization/resources/stt/types/SttEncoding.d.ts +0 -10
- package/serialization/resources/stt/types/SttEncoding.js +0 -41
- package/serialization/resources/stt/types/TimestampGranularity.d.ts +0 -10
- package/serialization/resources/stt/types/TimestampGranularity.js +0 -41
- package/serialization/resources/stt/types/TranscriptMessage.d.ts +0 -18
- package/serialization/resources/stt/types/TranscriptMessage.js +0 -49
- package/serialization/resources/stt/types/TranscriptionResponse.d.ts +0 -16
- package/serialization/resources/stt/types/TranscriptionResponse.js +0 -47
- package/serialization/resources/stt/types/TranscriptionWord.d.ts +0 -14
- package/serialization/resources/stt/types/TranscriptionWord.js +0 -45
- package/serialization/resources/stt/types/index.d.ts +0 -9
- package/serialization/resources/stt/types/index.js +0 -25
- package/serialization/resources/tts/index.d.ts +0 -1
- package/serialization/resources/tts/index.js +0 -17
- package/serialization/resources/tts/types/CancelContextRequest.d.ts +0 -14
- package/serialization/resources/tts/types/CancelContextRequest.js +0 -45
- package/serialization/resources/tts/types/ContextId.d.ts +0 -10
- package/serialization/resources/tts/types/ContextId.js +0 -41
- package/serialization/resources/tts/types/Controls.d.ts +0 -15
- package/serialization/resources/tts/types/Controls.js +0 -46
- package/serialization/resources/tts/types/Emotion.d.ts +0 -10
- package/serialization/resources/tts/types/Emotion.js +0 -41
- package/serialization/resources/tts/types/EmotionDeprecated.d.ts +0 -10
- package/serialization/resources/tts/types/EmotionDeprecated.js +0 -67
- package/serialization/resources/tts/types/FlushId.d.ts +0 -10
- package/serialization/resources/tts/types/FlushId.js +0 -41
- package/serialization/resources/tts/types/GenerationConfig.d.ts +0 -15
- package/serialization/resources/tts/types/GenerationConfig.js +0 -46
- package/serialization/resources/tts/types/GenerationRequest.d.ts +0 -33
- package/serialization/resources/tts/types/GenerationRequest.js +0 -64
- package/serialization/resources/tts/types/ModelSpeed.d.ts +0 -10
- package/serialization/resources/tts/types/ModelSpeed.js +0 -41
- package/serialization/resources/tts/types/Mp3OutputFormat.d.ts +0 -13
- package/serialization/resources/tts/types/Mp3OutputFormat.js +0 -44
- package/serialization/resources/tts/types/NaturalSpecifier.d.ts +0 -10
- package/serialization/resources/tts/types/NaturalSpecifier.js +0 -41
- package/serialization/resources/tts/types/NumericalSpecifier.d.ts +0 -10
- package/serialization/resources/tts/types/NumericalSpecifier.js +0 -41
- package/serialization/resources/tts/types/OutputFormat.d.ts +0 -22
- package/serialization/resources/tts/types/OutputFormat.js +0 -53
- package/serialization/resources/tts/types/PhonemeTimestamps.d.ts +0 -14
- package/serialization/resources/tts/types/PhonemeTimestamps.js +0 -45
- package/serialization/resources/tts/types/RawEncoding.d.ts +0 -10
- package/serialization/resources/tts/types/RawEncoding.js +0 -41
- package/serialization/resources/tts/types/RawOutputFormat.d.ts +0 -15
- package/serialization/resources/tts/types/RawOutputFormat.js +0 -46
- package/serialization/resources/tts/types/Speed.d.ts +0 -12
- package/serialization/resources/tts/types/Speed.js +0 -43
- package/serialization/resources/tts/types/SseOutputFormat.d.ts +0 -15
- package/serialization/resources/tts/types/SseOutputFormat.js +0 -46
- package/serialization/resources/tts/types/SupportedLanguage.d.ts +0 -10
- package/serialization/resources/tts/types/SupportedLanguage.js +0 -57
- package/serialization/resources/tts/types/TtsRequest.d.ts +0 -25
- package/serialization/resources/tts/types/TtsRequest.js +0 -56
- package/serialization/resources/tts/types/TtsRequestEmbeddingSpecifier.d.ts +0 -16
- package/serialization/resources/tts/types/TtsRequestEmbeddingSpecifier.js +0 -47
- package/serialization/resources/tts/types/TtsRequestIdSpecifier.d.ts +0 -16
- package/serialization/resources/tts/types/TtsRequestIdSpecifier.js +0 -47
- package/serialization/resources/tts/types/TtsRequestVoiceSpecifier.d.ts +0 -12
- package/serialization/resources/tts/types/TtsRequestVoiceSpecifier.js +0 -43
- package/serialization/resources/tts/types/TtssseRequest.d.ts +0 -30
- package/serialization/resources/tts/types/TtssseRequest.js +0 -61
- package/serialization/resources/tts/types/WavOutputFormat.d.ts +0 -12
- package/serialization/resources/tts/types/WavOutputFormat.js +0 -42
- package/serialization/resources/tts/types/WebSocketBaseResponse.d.ts +0 -15
- package/serialization/resources/tts/types/WebSocketBaseResponse.js +0 -46
- package/serialization/resources/tts/types/WebSocketChunkResponse.d.ts +0 -14
- package/serialization/resources/tts/types/WebSocketChunkResponse.js +0 -47
- package/serialization/resources/tts/types/WebSocketDoneResponse.d.ts +0 -12
- package/serialization/resources/tts/types/WebSocketDoneResponse.js +0 -42
- package/serialization/resources/tts/types/WebSocketErrorResponse.d.ts +0 -13
- package/serialization/resources/tts/types/WebSocketErrorResponse.js +0 -46
- package/serialization/resources/tts/types/WebSocketFlushDoneResponse.d.ts +0 -15
- package/serialization/resources/tts/types/WebSocketFlushDoneResponse.js +0 -48
- package/serialization/resources/tts/types/WebSocketPhonemeTimestampsResponse.d.ts +0 -14
- package/serialization/resources/tts/types/WebSocketPhonemeTimestampsResponse.js +0 -47
- package/serialization/resources/tts/types/WebSocketRawOutputFormat.d.ts +0 -15
- package/serialization/resources/tts/types/WebSocketRawOutputFormat.js +0 -46
- package/serialization/resources/tts/types/WebSocketRequest.d.ts +0 -12
- package/serialization/resources/tts/types/WebSocketRequest.js +0 -43
- package/serialization/resources/tts/types/WebSocketResponse.d.ts +0 -34
- package/serialization/resources/tts/types/WebSocketResponse.js +0 -59
- package/serialization/resources/tts/types/WebSocketStreamOptions.d.ts +0 -12
- package/serialization/resources/tts/types/WebSocketStreamOptions.js +0 -43
- package/serialization/resources/tts/types/WebSocketTimestampsResponse.d.ts +0 -14
- package/serialization/resources/tts/types/WebSocketTimestampsResponse.js +0 -47
- package/serialization/resources/tts/types/WebSocketTtsOutput.d.ts +0 -21
- package/serialization/resources/tts/types/WebSocketTtsOutput.js +0 -52
- package/serialization/resources/tts/types/WebSocketTtsRequest.d.ts +0 -30
- package/serialization/resources/tts/types/WebSocketTtsRequest.js +0 -61
- package/serialization/resources/tts/types/WordTimestamps.d.ts +0 -14
- package/serialization/resources/tts/types/WordTimestamps.js +0 -45
- package/serialization/resources/tts/types/index.d.ts +0 -39
- package/serialization/resources/tts/types/index.js +0 -55
- package/serialization/resources/voiceChanger/index.d.ts +0 -1
- package/serialization/resources/voiceChanger/index.js +0 -17
- package/serialization/resources/voiceChanger/types/OutputFormatContainer.d.ts +0 -10
- package/serialization/resources/voiceChanger/types/OutputFormatContainer.js +0 -41
- package/serialization/resources/voiceChanger/types/StreamingResponse.d.ts +0 -22
- package/serialization/resources/voiceChanger/types/StreamingResponse.js +0 -53
- package/serialization/resources/voiceChanger/types/index.d.ts +0 -2
- package/serialization/resources/voiceChanger/types/index.js +0 -18
- package/serialization/resources/voices/client/index.d.ts +0 -1
- package/serialization/resources/voices/client/index.js +0 -37
- package/serialization/resources/voices/client/list.d.ts +0 -11
- package/serialization/resources/voices/client/list.js +0 -42
- package/serialization/resources/voices/index.d.ts +0 -2
- package/serialization/resources/voices/index.js +0 -18
- package/serialization/resources/voices/types/BaseVoiceId.d.ts +0 -11
- package/serialization/resources/voices/types/BaseVoiceId.js +0 -8
- package/serialization/resources/voices/types/CloneMode.d.ts +0 -10
- package/serialization/resources/voices/types/CloneMode.js +0 -41
- package/serialization/resources/voices/types/CreateVoiceRequest.d.ts +0 -19
- package/serialization/resources/voices/types/CreateVoiceRequest.js +0 -50
- package/serialization/resources/voices/types/EmbeddingResponse.d.ts +0 -13
- package/serialization/resources/voices/types/EmbeddingResponse.js +0 -44
- package/serialization/resources/voices/types/EmbeddingSpecifier.d.ts +0 -15
- package/serialization/resources/voices/types/EmbeddingSpecifier.js +0 -46
- package/serialization/resources/voices/types/Gender.d.ts +0 -10
- package/serialization/resources/voices/types/Gender.js +0 -44
- package/serialization/resources/voices/types/IdSpecifier.d.ts +0 -15
- package/serialization/resources/voices/types/IdSpecifier.js +0 -46
- package/serialization/resources/voices/types/LocalizeDialect.d.ts +0 -14
- package/serialization/resources/voices/types/LocalizeDialect.js +0 -50
- package/serialization/resources/voices/types/LocalizeEnglishDialect.d.ts +0 -10
- package/serialization/resources/voices/types/LocalizeEnglishDialect.js +0 -41
- package/serialization/resources/voices/types/LocalizeFrenchDialect.d.ts +0 -10
- package/serialization/resources/voices/types/LocalizeFrenchDialect.js +0 -41
- package/serialization/resources/voices/types/LocalizePortugueseDialect.d.ts +0 -10
- package/serialization/resources/voices/types/LocalizePortugueseDialect.js +0 -41
- package/serialization/resources/voices/types/LocalizeSpanishDialect.d.ts +0 -10
- package/serialization/resources/voices/types/LocalizeSpanishDialect.js +0 -41
- package/serialization/resources/voices/types/LocalizeTargetLanguage.d.ts +0 -10
- package/serialization/resources/voices/types/LocalizeTargetLanguage.js +0 -57
- package/serialization/resources/voices/types/LocalizeVoiceRequest.d.ts +0 -20
- package/serialization/resources/voices/types/LocalizeVoiceRequest.js +0 -51
- package/serialization/resources/voices/types/MixVoiceSpecifier.d.ts +0 -12
- package/serialization/resources/voices/types/MixVoiceSpecifier.js +0 -43
- package/serialization/resources/voices/types/MixVoicesRequest.d.ts +0 -13
- package/serialization/resources/voices/types/MixVoicesRequest.js +0 -44
- package/serialization/resources/voices/types/UpdateVoiceRequest.d.ts +0 -13
- package/serialization/resources/voices/types/UpdateVoiceRequest.js +0 -44
- package/serialization/resources/voices/types/Voice.d.ts +0 -22
- package/serialization/resources/voices/types/Voice.js +0 -53
- package/serialization/resources/voices/types/VoiceId.d.ts +0 -10
- package/serialization/resources/voices/types/VoiceId.js +0 -41
- package/serialization/resources/voices/types/VoiceMetadata.d.ts +0 -20
- package/serialization/resources/voices/types/VoiceMetadata.js +0 -51
- package/serialization/resources/voices/types/Weight.d.ts +0 -10
- package/serialization/resources/voices/types/Weight.js +0 -41
- package/serialization/resources/voices/types/index.d.ts +0 -21
- package/serialization/resources/voices/types/index.js +0 -37
- package/wrapper/Client.d.ts +0 -9
- package/wrapper/Client.js +0 -17
- package/wrapper/StreamingSTTClient.d.ts +0 -26
- package/wrapper/StreamingSTTClient.js +0 -140
- package/wrapper/StreamingTTSClient.d.ts +0 -16
- package/wrapper/StreamingTTSClient.js +0 -23
- package/wrapper/SttWebsocket.d.ts +0 -34
- package/wrapper/SttWebsocket.js +0 -219
- package/wrapper/WebPlayer.d.ts +0 -44
- package/wrapper/WebPlayer.js +0 -141
- package/wrapper/Websocket.d.ts +0 -40
- package/wrapper/Websocket.js +0 -243
- package/wrapper/source.d.ts +0 -65
- package/wrapper/source.js +0 -179
- package/wrapper/utils.d.ts +0 -105
- package/wrapper/utils.js +0 -173
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TTSWrapper = exports.WebSocketWrapper = void 0;
|
|
4
|
+
const tslib_1 = require("../internal/tslib.js");
|
|
5
|
+
const ws_1 = tslib_1.__importDefault(require("ws"));
|
|
6
|
+
const errors_1 = require("./errors.js");
|
|
7
|
+
const stream_1 = require("stream");
|
|
8
|
+
// Helper for generating UUIDs. Not cryptographically secure.
|
|
9
|
+
function uuidv4() {
|
|
10
|
+
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {
|
|
11
|
+
var r = Math.random() * 16 | 0, v = c === 'x' ? r : (r & 0x3 | 0x8);
|
|
12
|
+
return v.toString(16);
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
class AudioSource {
|
|
16
|
+
constructor() {
|
|
17
|
+
this.buffers = [];
|
|
18
|
+
this.waiter = null;
|
|
19
|
+
this.isDone = false;
|
|
20
|
+
}
|
|
21
|
+
push(data) {
|
|
22
|
+
this.buffers.push(data);
|
|
23
|
+
if (this.waiter) {
|
|
24
|
+
this.waiter();
|
|
25
|
+
this.waiter = null;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
markDone() {
|
|
29
|
+
this.isDone = true;
|
|
30
|
+
if (this.waiter) {
|
|
31
|
+
this.waiter();
|
|
32
|
+
this.waiter = null;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
async read(outBuffer) {
|
|
36
|
+
if (this.buffers.length === 0 && !this.isDone) {
|
|
37
|
+
await new Promise((resolve) => { this.waiter = resolve; });
|
|
38
|
+
}
|
|
39
|
+
if (this.buffers.length === 0 && this.isDone) {
|
|
40
|
+
return 0;
|
|
41
|
+
}
|
|
42
|
+
let totalFloatsRead = 0;
|
|
43
|
+
let outOffset = 0;
|
|
44
|
+
const maxFloats = outBuffer.length;
|
|
45
|
+
while (this.buffers.length > 0 && totalFloatsRead < maxFloats) {
|
|
46
|
+
const buf = this.buffers[0]; // ts not smart enough to check loop condition
|
|
47
|
+
const floatsInBuf = buf.length / 4;
|
|
48
|
+
const floatsNeeded = maxFloats - totalFloatsRead;
|
|
49
|
+
const floatsToCopy = Math.min(floatsInBuf, floatsNeeded);
|
|
50
|
+
const bytesToCopy = floatsToCopy * 4;
|
|
51
|
+
// Copy to outBuffer.
|
|
52
|
+
// Create a view on the buffer to read floats.
|
|
53
|
+
// We need to ensure byteOffset is a multiple of 4.
|
|
54
|
+
// If not, we must copy the buffer to a new one.
|
|
55
|
+
let srcFloats;
|
|
56
|
+
if (buf.byteOffset % 4 === 0) {
|
|
57
|
+
srcFloats = new Float32Array(buf.buffer, buf.byteOffset, floatsInBuf);
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
const alignedBuf = new Uint8Array(buf);
|
|
61
|
+
srcFloats = new Float32Array(alignedBuf.buffer, alignedBuf.byteOffset, floatsInBuf);
|
|
62
|
+
}
|
|
63
|
+
outBuffer.set(srcFloats.subarray(0, floatsToCopy), outOffset);
|
|
64
|
+
totalFloatsRead += floatsToCopy;
|
|
65
|
+
outOffset += floatsToCopy;
|
|
66
|
+
if (floatsToCopy < floatsInBuf) {
|
|
67
|
+
// We didn't use the whole buffer. Update it.
|
|
68
|
+
this.buffers[0] = buf.subarray(bytesToCopy);
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
// We used the whole buffer. Remove it.
|
|
72
|
+
this.buffers.shift();
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return totalFloatsRead;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
class WebSocketWrapper {
|
|
79
|
+
constructor(client, config) {
|
|
80
|
+
this.socket = null;
|
|
81
|
+
this.sources = new Map();
|
|
82
|
+
// Fallback source for messages without context_id or if we just want to capture everything (legacy behavior?)
|
|
83
|
+
// The original test didn't use context_id explicitly in send() but expected a response source.
|
|
84
|
+
// We'll map context_id to source.
|
|
85
|
+
this.defaultSource = null;
|
|
86
|
+
this.client = client;
|
|
87
|
+
this.config = config;
|
|
88
|
+
}
|
|
89
|
+
async connect() {
|
|
90
|
+
const baseURL = this.client.baseURL;
|
|
91
|
+
// Construct WebSocket URL
|
|
92
|
+
// baseURL is like https://api.cartesia.ai
|
|
93
|
+
let urlStr = baseURL.replace(/^http/, "ws");
|
|
94
|
+
if (!urlStr.includes("/tts/websocket")) {
|
|
95
|
+
if (urlStr.endsWith("/")) {
|
|
96
|
+
urlStr += "tts/websocket";
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
urlStr += "/tts/websocket";
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
const url = new URL(urlStr);
|
|
103
|
+
const headers = {
|
|
104
|
+
"cartesia-version": "2025-04-16",
|
|
105
|
+
};
|
|
106
|
+
if (this.client.apiKey) {
|
|
107
|
+
headers["Authorization"] = `Bearer ${this.client.apiKey}`;
|
|
108
|
+
}
|
|
109
|
+
this.socket = new ws_1.default(url.toString(), {
|
|
110
|
+
headers: headers,
|
|
111
|
+
});
|
|
112
|
+
return new Promise((resolve, reject) => {
|
|
113
|
+
this.socket.on("open", () => {
|
|
114
|
+
console.log("WebSocket connected.");
|
|
115
|
+
resolve();
|
|
116
|
+
});
|
|
117
|
+
this.socket.on("error", (err) => {
|
|
118
|
+
console.error("WebSocket error:", err);
|
|
119
|
+
reject(err);
|
|
120
|
+
});
|
|
121
|
+
this.socket.on("message", (data) => {
|
|
122
|
+
this.handleMessage(data);
|
|
123
|
+
});
|
|
124
|
+
this.socket.on("close", () => {
|
|
125
|
+
console.log("WebSocket closed.");
|
|
126
|
+
this.sources.forEach((s) => { s.markDone(); });
|
|
127
|
+
if (this.defaultSource)
|
|
128
|
+
this.defaultSource.markDone();
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
handleMessage(data) {
|
|
133
|
+
try {
|
|
134
|
+
const str = data.toString();
|
|
135
|
+
const msg = JSON.parse(str);
|
|
136
|
+
const contextId = msg.context_id;
|
|
137
|
+
let source = contextId ? this.sources.get(contextId) : this.defaultSource;
|
|
138
|
+
// If we received a message for a context we don't know about, and we have a default source, use it
|
|
139
|
+
if (!source && this.defaultSource) {
|
|
140
|
+
source = this.defaultSource;
|
|
141
|
+
}
|
|
142
|
+
if (msg.type === "chunk" && msg.data) {
|
|
143
|
+
const audioData = Buffer.from(msg.data, "base64");
|
|
144
|
+
if (source)
|
|
145
|
+
source.push(audioData);
|
|
146
|
+
}
|
|
147
|
+
else if (msg.type === "done") {
|
|
148
|
+
if (source)
|
|
149
|
+
source.markDone();
|
|
150
|
+
}
|
|
151
|
+
else if (msg.type === "error") {
|
|
152
|
+
console.error("Server error:", msg);
|
|
153
|
+
if (source)
|
|
154
|
+
source.markDone(); // Fail the stream?
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
catch (e) {
|
|
158
|
+
console.error("Error parsing message:", e);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
async send(request) {
|
|
162
|
+
if (!this.socket) {
|
|
163
|
+
throw new Error("WebSocket not connected");
|
|
164
|
+
}
|
|
165
|
+
// Ensure request has a context_id so we can route the response
|
|
166
|
+
const contextId = request.contextId || uuidv4();
|
|
167
|
+
const source = new AudioSource();
|
|
168
|
+
this.sources.set(contextId, source);
|
|
169
|
+
// Also set as default source if none exists, for compatibility with simple tests
|
|
170
|
+
if (!this.defaultSource) {
|
|
171
|
+
this.defaultSource = source;
|
|
172
|
+
}
|
|
173
|
+
// Construct payload
|
|
174
|
+
const payload = {
|
|
175
|
+
model_id: request.modelId,
|
|
176
|
+
transcript: request.transcript,
|
|
177
|
+
voice: request.voice,
|
|
178
|
+
context_id: contextId,
|
|
179
|
+
};
|
|
180
|
+
// Output Format
|
|
181
|
+
if (request.outputFormat) {
|
|
182
|
+
payload.output_format = {
|
|
183
|
+
container: request.outputFormat.container,
|
|
184
|
+
encoding: request.outputFormat.encoding,
|
|
185
|
+
sample_rate: request.outputFormat.sampleRate,
|
|
186
|
+
bit_rate: request.outputFormat.bitRate,
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
else if (this.config) {
|
|
190
|
+
payload.output_format = {
|
|
191
|
+
container: this.config.container,
|
|
192
|
+
encoding: this.config.encoding,
|
|
193
|
+
sample_rate: this.config.sampleRate,
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
// Generation Config
|
|
197
|
+
if (request.generationConfig) {
|
|
198
|
+
payload.generation_config = request.generationConfig;
|
|
199
|
+
}
|
|
200
|
+
// Other fields
|
|
201
|
+
if (request.continue !== undefined)
|
|
202
|
+
payload.continue = request.continue;
|
|
203
|
+
if (request.duration !== undefined)
|
|
204
|
+
payload.duration = request.duration;
|
|
205
|
+
if (request.addTimestamps !== undefined)
|
|
206
|
+
payload.add_timestamps = request.addTimestamps;
|
|
207
|
+
if (request.addPhonemeTimestamps !== undefined)
|
|
208
|
+
payload.add_phoneme_timestamps = request.addPhonemeTimestamps;
|
|
209
|
+
this.socket.send(JSON.stringify(payload));
|
|
210
|
+
return {
|
|
211
|
+
source: source
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
disconnect() {
|
|
215
|
+
if (this.socket) {
|
|
216
|
+
this.socket.close();
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
exports.WebSocketWrapper = WebSocketWrapper;
|
|
221
|
+
/** @deprecated Use the new SDK's tts methods on the {@link Cartesia} instance instead. */
|
|
222
|
+
class TTSWrapper {
|
|
223
|
+
constructor(client) {
|
|
224
|
+
this.client = client;
|
|
225
|
+
}
|
|
226
|
+
/** @deprecated Use {@link Cartesia.tts.websocket} instead. */
|
|
227
|
+
websocket(config) {
|
|
228
|
+
return new WebSocketWrapper(this.client, config);
|
|
229
|
+
}
|
|
230
|
+
/** @deprecated Use {@link Cartesia.tts.generate} instead. */
|
|
231
|
+
async bytes(request, requestOptions) {
|
|
232
|
+
const params = {
|
|
233
|
+
model_id: request.modelId,
|
|
234
|
+
transcript: request.transcript,
|
|
235
|
+
voice: request.voice,
|
|
236
|
+
generation_config: request.generationConfig,
|
|
237
|
+
duration: request.duration,
|
|
238
|
+
language: request.language,
|
|
239
|
+
speed: request.speed,
|
|
240
|
+
pronunciation_dict_id: request.pronunciationDictId,
|
|
241
|
+
};
|
|
242
|
+
if (request.outputFormat) {
|
|
243
|
+
params.output_format = {
|
|
244
|
+
container: request.outputFormat.container,
|
|
245
|
+
encoding: request.outputFormat.encoding,
|
|
246
|
+
sample_rate: request.outputFormat.sampleRate,
|
|
247
|
+
bit_rate: request.outputFormat.bitRate,
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
const options = {};
|
|
251
|
+
if (requestOptions) {
|
|
252
|
+
if (requestOptions.timeoutInSeconds) {
|
|
253
|
+
options.timeout = requestOptions.timeoutInSeconds * 1000;
|
|
254
|
+
}
|
|
255
|
+
if (requestOptions.maxRetries !== undefined) {
|
|
256
|
+
options.maxRetries = requestOptions.maxRetries;
|
|
257
|
+
}
|
|
258
|
+
options.headers = requestOptions.headers;
|
|
259
|
+
options.signal = requestOptions.abortSignal;
|
|
260
|
+
}
|
|
261
|
+
const response = await (0, errors_1.wrap)(this.client.tts.generate(params, options));
|
|
262
|
+
if (!response.body) {
|
|
263
|
+
throw new Error("Response body is null");
|
|
264
|
+
}
|
|
265
|
+
return stream_1.Readable.fromWeb(response.body);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
exports.TTSWrapper = TTSWrapper;
|
|
269
|
+
//# sourceMappingURL=tts-wrapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tts-wrapper.js","sourceRoot":"","sources":["../src/backcompat/tts-wrapper.ts"],"names":[],"mappings":";;;;AAAA,oDAA2B;AAI3B,wCAAgC;AAChC,mCAAkC;AAuDlC,6DAA6D;AAC7D,SAAS,MAAM;IACd,OAAO,sCAAsC,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;QACpE,IAAI,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC;QACpE,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IACvB,CAAC,CAAC,CAAC;AACJ,CAAC;AAED,MAAM,WAAW;IAAjB;QACS,YAAO,GAAa,EAAE,CAAC;QACvB,WAAM,GAAiC,IAAI,CAAC;QAC7C,WAAM,GAAG,KAAK,CAAC;IAoEvB,CAAC;IAlEA,IAAI,CAAC,IAAY;QAChB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACxB,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YACjB,IAAI,CAAC,MAAM,EAAE,CAAC;YACd,IAAI,CAAC,MAAM,GAA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AC;gBAC7C,OAAO,CAAC,UAAU,GAAG,cAAc,CAAC,UAAU,CAAC;YAChD,CAAC;YACD,OAAO,CAAC,OAAO,GAAG,cAAc,CAAC,OAAO,CAAC;YACzC,OAAO,CAAC,MAAM,GAAG,cAAc,CAAC,WAAW,CAAC;QAC7C,CAAC;QAED,MAAM,QAAQ,GAAG,MAAM,IAAA,aAAI,EAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;QACvE,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;YACpB,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;QAC1C,CAAC;QAED,OAAO,iBAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IACxC,CAAC;CACD;AArDD,gCAqDC"}
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
import WebSocket from "ws";
|
|
2
|
+
import { wrap } from "./errors.mjs";
|
|
3
|
+
import { Readable } from "stream";
|
|
4
|
+
// Helper for generating UUIDs. Not cryptographically secure.
|
|
5
|
+
function uuidv4() {
|
|
6
|
+
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {
|
|
7
|
+
var r = Math.random() * 16 | 0, v = c === 'x' ? r : (r & 0x3 | 0x8);
|
|
8
|
+
return v.toString(16);
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
class AudioSource {
|
|
12
|
+
constructor() {
|
|
13
|
+
this.buffers = [];
|
|
14
|
+
this.waiter = null;
|
|
15
|
+
this.isDone = false;
|
|
16
|
+
}
|
|
17
|
+
push(data) {
|
|
18
|
+
this.buffers.push(data);
|
|
19
|
+
if (this.waiter) {
|
|
20
|
+
this.waiter();
|
|
21
|
+
this.waiter = null;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
markDone() {
|
|
25
|
+
this.isDone = true;
|
|
26
|
+
if (this.waiter) {
|
|
27
|
+
this.waiter();
|
|
28
|
+
this.waiter = null;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
async read(outBuffer) {
|
|
32
|
+
if (this.buffers.length === 0 && !this.isDone) {
|
|
33
|
+
await new Promise((resolve) => { this.waiter = resolve; });
|
|
34
|
+
}
|
|
35
|
+
if (this.buffers.length === 0 && this.isDone) {
|
|
36
|
+
return 0;
|
|
37
|
+
}
|
|
38
|
+
let totalFloatsRead = 0;
|
|
39
|
+
let outOffset = 0;
|
|
40
|
+
const maxFloats = outBuffer.length;
|
|
41
|
+
while (this.buffers.length > 0 && totalFloatsRead < maxFloats) {
|
|
42
|
+
const buf = this.buffers[0]; // ts not smart enough to check loop condition
|
|
43
|
+
const floatsInBuf = buf.length / 4;
|
|
44
|
+
const floatsNeeded = maxFloats - totalFloatsRead;
|
|
45
|
+
const floatsToCopy = Math.min(floatsInBuf, floatsNeeded);
|
|
46
|
+
const bytesToCopy = floatsToCopy * 4;
|
|
47
|
+
// Copy to outBuffer.
|
|
48
|
+
// Create a view on the buffer to read floats.
|
|
49
|
+
// We need to ensure byteOffset is a multiple of 4.
|
|
50
|
+
// If not, we must copy the buffer to a new one.
|
|
51
|
+
let srcFloats;
|
|
52
|
+
if (buf.byteOffset % 4 === 0) {
|
|
53
|
+
srcFloats = new Float32Array(buf.buffer, buf.byteOffset, floatsInBuf);
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
const alignedBuf = new Uint8Array(buf);
|
|
57
|
+
srcFloats = new Float32Array(alignedBuf.buffer, alignedBuf.byteOffset, floatsInBuf);
|
|
58
|
+
}
|
|
59
|
+
outBuffer.set(srcFloats.subarray(0, floatsToCopy), outOffset);
|
|
60
|
+
totalFloatsRead += floatsToCopy;
|
|
61
|
+
outOffset += floatsToCopy;
|
|
62
|
+
if (floatsToCopy < floatsInBuf) {
|
|
63
|
+
// We didn't use the whole buffer. Update it.
|
|
64
|
+
this.buffers[0] = buf.subarray(bytesToCopy);
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
// We used the whole buffer. Remove it.
|
|
68
|
+
this.buffers.shift();
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return totalFloatsRead;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
export class WebSocketWrapper {
|
|
75
|
+
constructor(client, config) {
|
|
76
|
+
this.socket = null;
|
|
77
|
+
this.sources = new Map();
|
|
78
|
+
// Fallback source for messages without context_id or if we just want to capture everything (legacy behavior?)
|
|
79
|
+
// The original test didn't use context_id explicitly in send() but expected a response source.
|
|
80
|
+
// We'll map context_id to source.
|
|
81
|
+
this.defaultSource = null;
|
|
82
|
+
this.client = client;
|
|
83
|
+
this.config = config;
|
|
84
|
+
}
|
|
85
|
+
async connect() {
|
|
86
|
+
const baseURL = this.client.baseURL;
|
|
87
|
+
// Construct WebSocket URL
|
|
88
|
+
// baseURL is like https://api.cartesia.ai
|
|
89
|
+
let urlStr = baseURL.replace(/^http/, "ws");
|
|
90
|
+
if (!urlStr.includes("/tts/websocket")) {
|
|
91
|
+
if (urlStr.endsWith("/")) {
|
|
92
|
+
urlStr += "tts/websocket";
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
urlStr += "/tts/websocket";
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
const url = new URL(urlStr);
|
|
99
|
+
const headers = {
|
|
100
|
+
"cartesia-version": "2025-04-16",
|
|
101
|
+
};
|
|
102
|
+
if (this.client.apiKey) {
|
|
103
|
+
headers["Authorization"] = `Bearer ${this.client.apiKey}`;
|
|
104
|
+
}
|
|
105
|
+
this.socket = new WebSocket(url.toString(), {
|
|
106
|
+
headers: headers,
|
|
107
|
+
});
|
|
108
|
+
return new Promise((resolve, reject) => {
|
|
109
|
+
this.socket.on("open", () => {
|
|
110
|
+
console.log("WebSocket connected.");
|
|
111
|
+
resolve();
|
|
112
|
+
});
|
|
113
|
+
this.socket.on("error", (err) => {
|
|
114
|
+
console.error("WebSocket error:", err);
|
|
115
|
+
reject(err);
|
|
116
|
+
});
|
|
117
|
+
this.socket.on("message", (data) => {
|
|
118
|
+
this.handleMessage(data);
|
|
119
|
+
});
|
|
120
|
+
this.socket.on("close", () => {
|
|
121
|
+
console.log("WebSocket closed.");
|
|
122
|
+
this.sources.forEach((s) => { s.markDone(); });
|
|
123
|
+
if (this.defaultSource)
|
|
124
|
+
this.defaultSource.markDone();
|
|
125
|
+
});
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
handleMessage(data) {
|
|
129
|
+
try {
|
|
130
|
+
const str = data.toString();
|
|
131
|
+
const msg = JSON.parse(str);
|
|
132
|
+
const contextId = msg.context_id;
|
|
133
|
+
let source = contextId ? this.sources.get(contextId) : this.defaultSource;
|
|
134
|
+
// If we received a message for a context we don't know about, and we have a default source, use it
|
|
135
|
+
if (!source && this.defaultSource) {
|
|
136
|
+
source = this.defaultSource;
|
|
137
|
+
}
|
|
138
|
+
if (msg.type === "chunk" && msg.data) {
|
|
139
|
+
const audioData = Buffer.from(msg.data, "base64");
|
|
140
|
+
if (source)
|
|
141
|
+
source.push(audioData);
|
|
142
|
+
}
|
|
143
|
+
else if (msg.type === "done") {
|
|
144
|
+
if (source)
|
|
145
|
+
source.markDone();
|
|
146
|
+
}
|
|
147
|
+
else if (msg.type === "error") {
|
|
148
|
+
console.error("Server error:", msg);
|
|
149
|
+
if (source)
|
|
150
|
+
source.markDone(); // Fail the stream?
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
catch (e) {
|
|
154
|
+
console.error("Error parsing message:", e);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
async send(request) {
|
|
158
|
+
if (!this.socket) {
|
|
159
|
+
throw new Error("WebSocket not connected");
|
|
160
|
+
}
|
|
161
|
+
// Ensure request has a context_id so we can route the response
|
|
162
|
+
const contextId = request.contextId || uuidv4();
|
|
163
|
+
const source = new AudioSource();
|
|
164
|
+
this.sources.set(contextId, source);
|
|
165
|
+
// Also set as default source if none exists, for compatibility with simple tests
|
|
166
|
+
if (!this.defaultSource) {
|
|
167
|
+
this.defaultSource = source;
|
|
168
|
+
}
|
|
169
|
+
// Construct payload
|
|
170
|
+
const payload = {
|
|
171
|
+
model_id: request.modelId,
|
|
172
|
+
transcript: request.transcript,
|
|
173
|
+
voice: request.voice,
|
|
174
|
+
context_id: contextId,
|
|
175
|
+
};
|
|
176
|
+
// Output Format
|
|
177
|
+
if (request.outputFormat) {
|
|
178
|
+
payload.output_format = {
|
|
179
|
+
container: request.outputFormat.container,
|
|
180
|
+
encoding: request.outputFormat.encoding,
|
|
181
|
+
sample_rate: request.outputFormat.sampleRate,
|
|
182
|
+
bit_rate: request.outputFormat.bitRate,
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
else if (this.config) {
|
|
186
|
+
payload.output_format = {
|
|
187
|
+
container: this.config.container,
|
|
188
|
+
encoding: this.config.encoding,
|
|
189
|
+
sample_rate: this.config.sampleRate,
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
// Generation Config
|
|
193
|
+
if (request.generationConfig) {
|
|
194
|
+
payload.generation_config = request.generationConfig;
|
|
195
|
+
}
|
|
196
|
+
// Other fields
|
|
197
|
+
if (request.continue !== undefined)
|
|
198
|
+
payload.continue = request.continue;
|
|
199
|
+
if (request.duration !== undefined)
|
|
200
|
+
payload.duration = request.duration;
|
|
201
|
+
if (request.addTimestamps !== undefined)
|
|
202
|
+
payload.add_timestamps = request.addTimestamps;
|
|
203
|
+
if (request.addPhonemeTimestamps !== undefined)
|
|
204
|
+
payload.add_phoneme_timestamps = request.addPhonemeTimestamps;
|
|
205
|
+
this.socket.send(JSON.stringify(payload));
|
|
206
|
+
return {
|
|
207
|
+
source: source
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
disconnect() {
|
|
211
|
+
if (this.socket) {
|
|
212
|
+
this.socket.close();
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
/** @deprecated Use the new SDK's tts methods on the {@link Cartesia} instance instead. */
|
|
217
|
+
export class TTSWrapper {
|
|
218
|
+
constructor(client) {
|
|
219
|
+
this.client = client;
|
|
220
|
+
}
|
|
221
|
+
/** @deprecated Use {@link Cartesia.tts.websocket} instead. */
|
|
222
|
+
websocket(config) {
|
|
223
|
+
return new WebSocketWrapper(this.client, config);
|
|
224
|
+
}
|
|
225
|
+
/** @deprecated Use {@link Cartesia.tts.generate} instead. */
|
|
226
|
+
async bytes(request, requestOptions) {
|
|
227
|
+
const params = {
|
|
228
|
+
model_id: request.modelId,
|
|
229
|
+
transcript: request.transcript,
|
|
230
|
+
voice: request.voice,
|
|
231
|
+
generation_config: request.generationConfig,
|
|
232
|
+
duration: request.duration,
|
|
233
|
+
language: request.language,
|
|
234
|
+
speed: request.speed,
|
|
235
|
+
pronunciation_dict_id: request.pronunciationDictId,
|
|
236
|
+
};
|
|
237
|
+
if (request.outputFormat) {
|
|
238
|
+
params.output_format = {
|
|
239
|
+
container: request.outputFormat.container,
|
|
240
|
+
encoding: request.outputFormat.encoding,
|
|
241
|
+
sample_rate: request.outputFormat.sampleRate,
|
|
242
|
+
bit_rate: request.outputFormat.bitRate,
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
const options = {};
|
|
246
|
+
if (requestOptions) {
|
|
247
|
+
if (requestOptions.timeoutInSeconds) {
|
|
248
|
+
options.timeout = requestOptions.timeoutInSeconds * 1000;
|
|
249
|
+
}
|
|
250
|
+
if (requestOptions.maxRetries !== undefined) {
|
|
251
|
+
options.maxRetries = requestOptions.maxRetries;
|
|
252
|
+
}
|
|
253
|
+
options.headers = requestOptions.headers;
|
|
254
|
+
options.signal = requestOptions.abortSignal;
|
|
255
|
+
}
|
|
256
|
+
const response = await wrap(this.client.tts.generate(params, options));
|
|
257
|
+
if (!response.body) {
|
|
258
|
+
throw new Error("Response body is null");
|
|
259
|
+
}
|
|
260
|
+
return Readable.fromWeb(response.body);
|
|
261
|
+
}
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GAAG,CAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;QACvE,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;YACpB,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;QAC1C,CAAC;QAED,OAAO,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IACxC,CAAC;CACD"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type Supplier<T> = T | Promise<T> | (() => T | Promise<T>);
|
|
2
|
+
export interface CartesiaClientOptions {
|
|
3
|
+
environment?: Supplier<"https://api.cartesia.ai" | string>;
|
|
4
|
+
/** Specify a custom URL to connect the client to. */
|
|
5
|
+
baseUrl?: Supplier<string>;
|
|
6
|
+
apiKey?: Supplier<string | undefined>;
|
|
7
|
+
/** Override the Cartesia-Version header */
|
|
8
|
+
cartesiaVersion?: string;
|
|
9
|
+
fetcher?: any;
|
|
10
|
+
}
|
|
11
|
+
export interface BackCompatRequestOptions {
|
|
12
|
+
timeoutInSeconds?: number;
|
|
13
|
+
maxRetries?: number;
|
|
14
|
+
abortSignal?: AbortSignal;
|
|
15
|
+
cartesiaVersion?: string;
|
|
16
|
+
headers?: Record<string, string>;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=types.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.mts","sourceRoot":"","sources":["../src/backcompat/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;AAElE,MAAM,WAAW,qBAAqB;IACrC,WAAW,CAAC,EAAE,QAAQ,CAAC,yBAAyB,GAAG,MAAM,CAAC,CAAC;IAC3D,qDAAqD;IACrD,OAAO,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC3B,MAAM,CAAC,EAAE,QAAQ,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACtC,2CAA2C;IAC3C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,GAAG,CAAC;CACd;AAED,MAAM,WAAW,wBAAwB;IACxC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type Supplier<T> = T | Promise<T> | (() => T | Promise<T>);
|
|
2
|
+
export interface CartesiaClientOptions {
|
|
3
|
+
environment?: Supplier<"https://api.cartesia.ai" | string>;
|
|
4
|
+
/** Specify a custom URL to connect the client to. */
|
|
5
|
+
baseUrl?: Supplier<string>;
|
|
6
|
+
apiKey?: Supplier<string | undefined>;
|
|
7
|
+
/** Override the Cartesia-Version header */
|
|
8
|
+
cartesiaVersion?: string;
|
|
9
|
+
fetcher?: any;
|
|
10
|
+
}
|
|
11
|
+
export interface BackCompatRequestOptions {
|
|
12
|
+
timeoutInSeconds?: number;
|
|
13
|
+
maxRetries?: number;
|
|
14
|
+
abortSignal?: AbortSignal;
|
|
15
|
+
cartesiaVersion?: string;
|
|
16
|
+
headers?: Record<string, string>;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/backcompat/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;AAElE,MAAM,WAAW,qBAAqB;IACrC,WAAW,CAAC,EAAE,QAAQ,CAAC,yBAAyB,GAAG,MAAM,CAAC,CAAC;IAC3D,qDAAqD;IACrD,OAAO,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC3B,MAAM,CAAC,EAAE,QAAQ,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACtC,2CAA2C;IAC3C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,GAAG,CAAC;CACd;AAED,MAAM,WAAW,wBAAwB;IACxC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/backcompat/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.mjs","sourceRoot":"","sources":["../src/backcompat/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as fs from "fs";
|
|
2
|
+
import { Cartesia } from "../client.mjs";
|
|
3
|
+
import { Readable } from "stream";
|
|
4
|
+
import { BackCompatRequestOptions } from "./types.mjs";
|
|
5
|
+
export interface BackCompatVoiceChangerBytesRequest {
|
|
6
|
+
voiceId: string;
|
|
7
|
+
outputFormatContainer: "raw" | "wav" | "mp3";
|
|
8
|
+
outputFormatSampleRate: 8000 | 16000 | 22050 | 24000 | 44100 | 48000;
|
|
9
|
+
outputFormatEncoding?: "pcm_f32le" | "pcm_s16le" | "mulaw" | "alaw";
|
|
10
|
+
outputFormatBitRate?: 32000 | 64000 | 96000 | 128000 | 192000;
|
|
11
|
+
}
|
|
12
|
+
/** @deprecated Use the new SDK's voice changer methods on the {@link Cartesia} instance instead. */
|
|
13
|
+
export declare class VoiceChangerWrapper {
|
|
14
|
+
private client;
|
|
15
|
+
constructor(client: Cartesia);
|
|
16
|
+
/** @deprecated Use {@link Cartesia.voiceChanger.changeVoiceBytes} instead. */
|
|
17
|
+
bytes(clip: File | fs.ReadStream | Blob, request: BackCompatVoiceChangerBytesRequest, requestOptions?: BackCompatRequestOptions): Promise<Readable>;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=voice-changer-wrapper.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"voice-changer-wrapper.d.mts","sourceRoot":"","sources":["../src/backcompat/voice-changer-wrapper.ts"],"names":[],"mappings":"OAAO,KAAK,EAAE,MAAM,IAAI;OACjB,EAAE,QAAQ,EAAE;OAGZ,EAAE,QAAQ,EAAE,MAAM,QAAQ;OAC1B,EAAE,wBAAwB,EAAE;AAGnC,MAAM,WAAW,kCAAkC;IAClD,OAAO,EAAE,MAAM,CAAC;IAChB,qBAAqB,EAAE,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;IAC7C,sBAAsB,EAAE,IAAI,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;IACrE,oBAAoB,CAAC,EAAE,WAAW,GAAG,WAAW,GAAG,OAAO,GAAG,MAAM,CAAC;IACpE,mBAAmB,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;CAC9D;AAED,oGAAoG;AACpG,qBAAa,mBAAmB;IAC/B,OAAO,CAAC,MAAM,CAAW;gBAEb,MAAM,EAAE,QAAQ;IAI5B,8EAA8E;IACxE,KAAK,CACV,IAAI,EAAE,IAAI,GAAG,EAAE,CAAC,UAAU,GAAG,IAAI,EACjC,OAAO,EAAE,kCAAkC,EAC3C,cAAc,CAAC,EAAE,wBAAwB,GACvC,OAAO,CAAC,QAAQ,CAAC;CAyCpB"}
|