@cartesia/cartesia-js 2.2.8 → 3.0.0-b3
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 +61 -0
- package/LICENSE +201 -0
- package/README.md +269 -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/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 +7 -0
- package/index.d.mts.map +1 -0
- package/index.d.ts +7 -7
- package/index.d.ts.map +1 -0
- package/index.js +30 -51
- package/index.js.map +1 -0
- package/index.mjs +8 -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 +81 -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 +154 -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 +48 -0
- package/resources/access-token.d.mts.map +1 -0
- package/resources/access-token.d.ts +48 -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 +36 -0
- package/resources/agents/calls.js.map +1 -0
- package/resources/agents/calls.mjs +32 -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 +143 -0
- package/resources/agents/metrics/results.d.mts.map +1 -0
- package/resources/agents/metrics/results.d.ts +143 -0
- package/resources/agents/metrics/results.d.ts.map +1 -0
- package/resources/agents/metrics/results.js +33 -0
- package/resources/agents/metrics/results.js.map +1 -0
- package/resources/agents/metrics/results.mjs +29 -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 +72 -0
- package/resources/infill.d.mts.map +1 -0
- package/resources/infill.d.ts +72 -0
- package/resources/infill.d.ts.map +1 -0
- package/resources/infill.js +37 -0
- package/resources/infill.js.map +1 -0
- package/resources/infill.mjs +33 -0
- package/resources/infill.mjs.map +1 -0
- package/resources/pronunciation-dicts.d.mts +107 -0
- package/resources/pronunciation-dicts.d.mts.map +1 -0
- package/resources/pronunciation-dicts.d.ts +107 -0
- package/resources/pronunciation-dicts.d.ts.map +1 -0
- package/resources/pronunciation-dicts.js +66 -0
- package/resources/pronunciation-dicts.js.map +1 -0
- package/resources/pronunciation-dicts.mjs +62 -0
- package/resources/pronunciation-dicts.mjs.map +1 -0
- package/resources/stt.d.mts +208 -0
- package/resources/stt.d.mts.map +1 -0
- package/resources/stt.d.ts +208 -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 +409 -0
- package/resources/tts/tts.d.mts.map +1 -0
- package/resources/tts/tts.d.ts +409 -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 +26 -0
- package/resources/voice-changer.js.map +1 -0
- package/resources/voice-changer.mjs +22 -0
- package/resources/voice-changer.mjs.map +1 -0
- package/resources/voices.d.mts +213 -0
- package/resources/voices.d.mts.map +1 -0
- package/resources/voices.d.ts +213 -0
- package/resources/voices.d.ts.map +1 -0
- package/resources/voices.js +57 -0
- package/resources/voices.js.map +1 -0
- package/resources/voices.mjs +53 -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/client.ts +947 -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 +23 -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 +61 -0
- package/src/resources/agents/agents.ts +351 -0
- package/src/resources/agents/calls.ts +273 -0
- package/src/resources/agents/deployments.ts +119 -0
- package/src/resources/agents/index.ts +27 -0
- package/src/resources/agents/metrics/index.ts +18 -0
- package/src/resources/agents/metrics/metrics.ts +186 -0
- package/src/resources/agents/metrics/results.ts +192 -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 +68 -0
- package/src/resources/infill.ts +101 -0
- package/src/resources/pronunciation-dicts.ts +172 -0
- package/src/resources/stt.ts +234 -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 +533 -0
- package/src/resources/tts/ws.ts +79 -0
- package/src/resources/tts.ts +3 -0
- package/src/resources/voice-changer.ts +87 -0
- package/src/resources/voices.ts +325 -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 -42
- 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 -19
- 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 -27
- 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 -23
- 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 -42
- 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 -19
- 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 -27
- 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 -23
- 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 -32
- package/dist/serialization/resources/tts/types/GenerationRequest.js +0 -63
- 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 -24
- package/dist/serialization/resources/tts/types/TtsRequest.js +0 -55
- 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 -29
- package/dist/serialization/resources/tts/types/TtssseRequest.js +0 -60
- 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 -29
- package/dist/serialization/resources/tts/types/WebSocketTtsRequest.js +0 -60
- 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 -32
- package/serialization/resources/tts/types/GenerationRequest.js +0 -63
- 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 -24
- package/serialization/resources/tts/types/TtsRequest.js +0 -55
- 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 -29
- package/serialization/resources/tts/types/TtssseRequest.js +0 -60
- 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 -29
- package/serialization/resources/tts/types/WebSocketTtsRequest.js +0 -60
- 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
package/src/client.ts
ADDED
|
@@ -0,0 +1,947 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import type { RequestInit, RequestInfo, BodyInit } from './internal/builtin-types';
|
|
4
|
+
import type { HTTPMethod, PromiseOrValue, MergedRequestInit, FinalizedRequestInit } from './internal/types';
|
|
5
|
+
import { uuid4 } from './internal/utils/uuid';
|
|
6
|
+
import { validatePositiveInteger, isAbsoluteURL, safeJSON } from './internal/utils/values';
|
|
7
|
+
import { sleep } from './internal/utils/sleep';
|
|
8
|
+
export type { Logger, LogLevel } from './internal/utils/log';
|
|
9
|
+
import { castToError, isAbortError } from './internal/errors';
|
|
10
|
+
import type { APIResponseProps } from './internal/parse';
|
|
11
|
+
import { getPlatformHeaders } from './internal/detect-platform';
|
|
12
|
+
import * as Shims from './internal/shims';
|
|
13
|
+
import * as Opts from './internal/request-options';
|
|
14
|
+
import * as qs from './internal/qs';
|
|
15
|
+
import { VERSION } from './version';
|
|
16
|
+
import * as Errors from './core/error';
|
|
17
|
+
import * as Pagination from './core/pagination';
|
|
18
|
+
import { AbstractPage, type CursorIDPageParams, CursorIDPageResponse } from './core/pagination';
|
|
19
|
+
import * as Uploads from './core/uploads';
|
|
20
|
+
import * as API from './resources/index';
|
|
21
|
+
import * as TopLevelAPI from './resources/top-level';
|
|
22
|
+
import { GetStatusResponse } from './resources/top-level';
|
|
23
|
+
import { APIPromise } from './core/api-promise';
|
|
24
|
+
import { AccessToken, AccessTokenCreateParams, AccessTokenCreateResponse } from './resources/access-token';
|
|
25
|
+
import {
|
|
26
|
+
FineTune,
|
|
27
|
+
FineTuneCreateParams,
|
|
28
|
+
FineTuneListParams,
|
|
29
|
+
FineTuneListVoicesParams,
|
|
30
|
+
FineTunes,
|
|
31
|
+
FineTunesCursorIDPage,
|
|
32
|
+
} from './resources/fine-tunes';
|
|
33
|
+
import { Infill, InfillCreateParams, OutputFormatContainer, RawEncoding } from './resources/infill';
|
|
34
|
+
import {
|
|
35
|
+
PronunciationDict,
|
|
36
|
+
PronunciationDictCreateParams,
|
|
37
|
+
PronunciationDictItem,
|
|
38
|
+
PronunciationDictListParams,
|
|
39
|
+
PronunciationDictUpdateParams,
|
|
40
|
+
PronunciationDicts,
|
|
41
|
+
PronunciationDictsCursorIDPage,
|
|
42
|
+
} from './resources/pronunciation-dicts';
|
|
43
|
+
import { Stt, SttTranscribeParams, SttTranscribeResponse } from './resources/stt';
|
|
44
|
+
import {
|
|
45
|
+
VoiceChanger,
|
|
46
|
+
VoiceChangerChangeVoiceBytesParams,
|
|
47
|
+
VoiceChangerChangeVoiceSseParams,
|
|
48
|
+
} from './resources/voice-changer';
|
|
49
|
+
import {
|
|
50
|
+
GenderPresentation,
|
|
51
|
+
SupportedLanguage,
|
|
52
|
+
Voice,
|
|
53
|
+
VoiceCloneParams,
|
|
54
|
+
VoiceListParams,
|
|
55
|
+
VoiceLocalizeParams,
|
|
56
|
+
VoiceMetadata,
|
|
57
|
+
VoiceUpdateParams,
|
|
58
|
+
Voices,
|
|
59
|
+
VoicesCursorIDPage,
|
|
60
|
+
} from './resources/voices';
|
|
61
|
+
import {
|
|
62
|
+
AgentListPhoneNumbersResponse,
|
|
63
|
+
AgentListResponse,
|
|
64
|
+
AgentListTemplatesResponse,
|
|
65
|
+
AgentSummary,
|
|
66
|
+
AgentUpdateParams,
|
|
67
|
+
Agents,
|
|
68
|
+
} from './resources/agents/agents';
|
|
69
|
+
import {
|
|
70
|
+
Dataset,
|
|
71
|
+
DatasetCreateParams,
|
|
72
|
+
DatasetListParams,
|
|
73
|
+
DatasetUpdateParams,
|
|
74
|
+
Datasets,
|
|
75
|
+
DatasetsCursorIDPage,
|
|
76
|
+
} from './resources/datasets/datasets';
|
|
77
|
+
import {
|
|
78
|
+
GenerationConfig,
|
|
79
|
+
GenerationRequest,
|
|
80
|
+
ModelSpeed,
|
|
81
|
+
RawOutputFormat,
|
|
82
|
+
TTS,
|
|
83
|
+
TTSGenerateParams,
|
|
84
|
+
TTSGenerateSseParams,
|
|
85
|
+
VoiceSpecifier,
|
|
86
|
+
WebsocketClientEvent,
|
|
87
|
+
WebsocketResponse,
|
|
88
|
+
} from './resources/tts/tts';
|
|
89
|
+
import { type Fetch } from './internal/builtin-types';
|
|
90
|
+
import { HeadersLike, NullableHeaders, buildHeaders } from './internal/headers';
|
|
91
|
+
import { FinalRequestOptions, RequestOptions } from './internal/request-options';
|
|
92
|
+
import { readEnv } from './internal/utils/env';
|
|
93
|
+
import {
|
|
94
|
+
type LogLevel,
|
|
95
|
+
type Logger,
|
|
96
|
+
formatRequestDetails,
|
|
97
|
+
loggerFor,
|
|
98
|
+
parseLogLevel,
|
|
99
|
+
} from './internal/utils/log';
|
|
100
|
+
import { isEmptyObj } from './internal/utils/values';
|
|
101
|
+
|
|
102
|
+
export interface ClientOptions {
|
|
103
|
+
token?: string | null | undefined;
|
|
104
|
+
|
|
105
|
+
apiKey?: string | null | undefined;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Override the default base URL for the API, e.g., "https://api.example.com/v2/"
|
|
109
|
+
*
|
|
110
|
+
* Defaults to process.env['CARTESIA_BASE_URL'].
|
|
111
|
+
*/
|
|
112
|
+
baseURL?: string | null | undefined;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* The maximum amount of time (in milliseconds) that the client should wait for a response
|
|
116
|
+
* from the server before timing out a single request.
|
|
117
|
+
*
|
|
118
|
+
* Note that request timeouts are retried by default, so in a worst-case scenario you may wait
|
|
119
|
+
* much longer than this timeout before the promise succeeds or fails.
|
|
120
|
+
*
|
|
121
|
+
* @unit milliseconds
|
|
122
|
+
*/
|
|
123
|
+
timeout?: number | undefined;
|
|
124
|
+
/**
|
|
125
|
+
* Additional `RequestInit` options to be passed to `fetch` calls.
|
|
126
|
+
* Properties will be overridden by per-request `fetchOptions`.
|
|
127
|
+
*/
|
|
128
|
+
fetchOptions?: MergedRequestInit | undefined;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Specify a custom `fetch` function implementation.
|
|
132
|
+
*
|
|
133
|
+
* If not provided, we expect that `fetch` is defined globally.
|
|
134
|
+
*/
|
|
135
|
+
fetch?: Fetch | undefined;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* The maximum number of times that the client will retry a request in case of a
|
|
139
|
+
* temporary failure, like a network error or a 5XX error from the server.
|
|
140
|
+
*
|
|
141
|
+
* @default 2
|
|
142
|
+
*/
|
|
143
|
+
maxRetries?: number | undefined;
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Default headers to include with every request to the API.
|
|
147
|
+
*
|
|
148
|
+
* These can be removed in individual requests by explicitly setting the
|
|
149
|
+
* header to `null` in request options.
|
|
150
|
+
*/
|
|
151
|
+
defaultHeaders?: HeadersLike | undefined;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Default query parameters to include with every request to the API.
|
|
155
|
+
*
|
|
156
|
+
* These can be removed in individual requests by explicitly setting the
|
|
157
|
+
* param to `undefined` in request options.
|
|
158
|
+
*/
|
|
159
|
+
defaultQuery?: Record<string, string | undefined> | undefined;
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Set the log level.
|
|
163
|
+
*
|
|
164
|
+
* Defaults to process.env['CARTESIA_LOG'] or 'warn' if it isn't set.
|
|
165
|
+
*/
|
|
166
|
+
logLevel?: LogLevel | undefined;
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Set the logger.
|
|
170
|
+
*
|
|
171
|
+
* Defaults to globalThis.console.
|
|
172
|
+
*/
|
|
173
|
+
logger?: Logger | undefined;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* API Client for interfacing with the Cartesia API.
|
|
178
|
+
*/
|
|
179
|
+
export class Cartesia {
|
|
180
|
+
token: string | null;
|
|
181
|
+
apiKey: string | null;
|
|
182
|
+
|
|
183
|
+
baseURL: string;
|
|
184
|
+
maxRetries: number;
|
|
185
|
+
timeout: number;
|
|
186
|
+
logger: Logger;
|
|
187
|
+
logLevel: LogLevel | undefined;
|
|
188
|
+
fetchOptions: MergedRequestInit | undefined;
|
|
189
|
+
|
|
190
|
+
private fetch: Fetch;
|
|
191
|
+
#encoder: Opts.RequestEncoder;
|
|
192
|
+
protected idempotencyHeader?: string;
|
|
193
|
+
private _options: ClientOptions;
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* API Client for interfacing with the Cartesia API.
|
|
197
|
+
*
|
|
198
|
+
* @param {string | null | undefined} [opts.token]
|
|
199
|
+
* @param {string | null | undefined} [opts.apiKey]
|
|
200
|
+
* @param {string} [opts.baseURL=process.env['CARTESIA_BASE_URL'] ?? https://api.cartesia.ai] - Override the default base URL for the API.
|
|
201
|
+
* @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
|
|
202
|
+
* @param {MergedRequestInit} [opts.fetchOptions] - Additional `RequestInit` options to be passed to `fetch` calls.
|
|
203
|
+
* @param {Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
|
|
204
|
+
* @param {number} [opts.maxRetries=2] - The maximum number of times the client will retry a request.
|
|
205
|
+
* @param {HeadersLike} opts.defaultHeaders - Default headers to include with every request to the API.
|
|
206
|
+
* @param {Record<string, string | undefined>} opts.defaultQuery - Default query parameters to include with every request to the API.
|
|
207
|
+
*/
|
|
208
|
+
constructor({
|
|
209
|
+
baseURL = readEnv('CARTESIA_BASE_URL'),
|
|
210
|
+
token = null,
|
|
211
|
+
apiKey = null,
|
|
212
|
+
...opts
|
|
213
|
+
}: ClientOptions = {}) {
|
|
214
|
+
const options: ClientOptions = {
|
|
215
|
+
token,
|
|
216
|
+
apiKey,
|
|
217
|
+
...opts,
|
|
218
|
+
baseURL: baseURL || `https://api.cartesia.ai`,
|
|
219
|
+
};
|
|
220
|
+
|
|
221
|
+
this.baseURL = options.baseURL!;
|
|
222
|
+
this.timeout = options.timeout ?? Cartesia.DEFAULT_TIMEOUT /* 1 minute */;
|
|
223
|
+
this.logger = options.logger ?? console;
|
|
224
|
+
const defaultLogLevel = 'warn';
|
|
225
|
+
// Set default logLevel early so that we can log a warning in parseLogLevel.
|
|
226
|
+
this.logLevel = defaultLogLevel;
|
|
227
|
+
this.logLevel =
|
|
228
|
+
parseLogLevel(options.logLevel, 'ClientOptions.logLevel', this) ??
|
|
229
|
+
parseLogLevel(readEnv('CARTESIA_LOG'), "process.env['CARTESIA_LOG']", this) ??
|
|
230
|
+
defaultLogLevel;
|
|
231
|
+
this.fetchOptions = options.fetchOptions;
|
|
232
|
+
this.maxRetries = options.maxRetries ?? 2;
|
|
233
|
+
this.fetch = options.fetch ?? Shims.getDefaultFetch();
|
|
234
|
+
this.#encoder = Opts.FallbackEncoder;
|
|
235
|
+
|
|
236
|
+
this._options = options;
|
|
237
|
+
|
|
238
|
+
this.token = token;
|
|
239
|
+
this.apiKey = apiKey;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Create a new client instance re-using the same options given to the current client with optional overriding.
|
|
244
|
+
*/
|
|
245
|
+
withOptions(options: Partial<ClientOptions>): this {
|
|
246
|
+
const client = new (this.constructor as any as new (props: ClientOptions) => typeof this)({
|
|
247
|
+
...this._options,
|
|
248
|
+
baseURL: this.baseURL,
|
|
249
|
+
maxRetries: this.maxRetries,
|
|
250
|
+
timeout: this.timeout,
|
|
251
|
+
logger: this.logger,
|
|
252
|
+
logLevel: this.logLevel,
|
|
253
|
+
fetch: this.fetch,
|
|
254
|
+
fetchOptions: this.fetchOptions,
|
|
255
|
+
token: this.token,
|
|
256
|
+
apiKey: this.apiKey,
|
|
257
|
+
...options,
|
|
258
|
+
});
|
|
259
|
+
return client;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* Check whether the base URL is set to its default.
|
|
264
|
+
*/
|
|
265
|
+
#baseURLOverridden(): boolean {
|
|
266
|
+
return this.baseURL !== 'https://api.cartesia.ai';
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* API Status and Version
|
|
271
|
+
*/
|
|
272
|
+
getStatus(options?: RequestOptions): APIPromise<TopLevelAPI.GetStatusResponse> {
|
|
273
|
+
return this.get('/', options);
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
protected defaultQuery(): Record<string, string | undefined> | undefined {
|
|
277
|
+
return this._options.defaultQuery;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
protected validateHeaders({ values, nulls }: NullableHeaders) {
|
|
281
|
+
if (this.token && values.get('authorization')) {
|
|
282
|
+
return;
|
|
283
|
+
}
|
|
284
|
+
if (nulls.has('authorization')) {
|
|
285
|
+
return;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
if (this.apiKey && values.get('authorization')) {
|
|
289
|
+
return;
|
|
290
|
+
}
|
|
291
|
+
if (nulls.has('authorization')) {
|
|
292
|
+
return;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
throw new Error(
|
|
296
|
+
'Could not resolve authentication method. Expected either token or apiKey to be set. Or for one of the "Authorization" or "Authorization" headers to be explicitly omitted',
|
|
297
|
+
);
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
protected async authHeaders(opts: FinalRequestOptions): Promise<NullableHeaders | undefined> {
|
|
301
|
+
return buildHeaders([await this.tokenAuth(opts), await this.apiKeyAuth(opts)]);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
protected async tokenAuth(opts: FinalRequestOptions): Promise<NullableHeaders | undefined> {
|
|
305
|
+
if (this.token == null) {
|
|
306
|
+
return undefined;
|
|
307
|
+
}
|
|
308
|
+
return buildHeaders([{ Authorization: `Bearer ${this.token}` }]);
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
protected async apiKeyAuth(opts: FinalRequestOptions): Promise<NullableHeaders | undefined> {
|
|
312
|
+
if (this.apiKey == null) {
|
|
313
|
+
return undefined;
|
|
314
|
+
}
|
|
315
|
+
return buildHeaders([{ Authorization: `Bearer ${this.apiKey}` }]);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
protected stringifyQuery(query: Record<string, unknown>): string {
|
|
319
|
+
return qs.stringify(query, { arrayFormat: 'brackets' });
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
private getUserAgent(): string {
|
|
323
|
+
return `${this.constructor.name}/JS ${VERSION}`;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
protected defaultIdempotencyKey(): string {
|
|
327
|
+
return `stainless-node-retry-${uuid4()}`;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
protected makeStatusError(
|
|
331
|
+
status: number,
|
|
332
|
+
error: Object,
|
|
333
|
+
message: string | undefined,
|
|
334
|
+
headers: Headers,
|
|
335
|
+
): Errors.APIError {
|
|
336
|
+
return Errors.APIError.generate(status, error, message, headers);
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
buildURL(
|
|
340
|
+
path: string,
|
|
341
|
+
query: Record<string, unknown> | null | undefined,
|
|
342
|
+
defaultBaseURL?: string | undefined,
|
|
343
|
+
): string {
|
|
344
|
+
const baseURL = (!this.#baseURLOverridden() && defaultBaseURL) || this.baseURL;
|
|
345
|
+
const url =
|
|
346
|
+
isAbsoluteURL(path) ?
|
|
347
|
+
new URL(path)
|
|
348
|
+
: new URL(baseURL + (baseURL.endsWith('/') && path.startsWith('/') ? path.slice(1) : path));
|
|
349
|
+
|
|
350
|
+
const defaultQuery = this.defaultQuery();
|
|
351
|
+
if (!isEmptyObj(defaultQuery)) {
|
|
352
|
+
query = { ...defaultQuery, ...query };
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
if (typeof query === 'object' && query && !Array.isArray(query)) {
|
|
356
|
+
url.search = this.stringifyQuery(query as Record<string, unknown>);
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
return url.toString();
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
/**
|
|
363
|
+
* Used as a callback for mutating the given `FinalRequestOptions` object.
|
|
364
|
+
*/
|
|
365
|
+
protected async prepareOptions(options: FinalRequestOptions): Promise<void> {}
|
|
366
|
+
|
|
367
|
+
/**
|
|
368
|
+
* Used as a callback for mutating the given `RequestInit` object.
|
|
369
|
+
*
|
|
370
|
+
* This is useful for cases where you want to add certain headers based off of
|
|
371
|
+
* the request properties, e.g. `method` or `url`.
|
|
372
|
+
*/
|
|
373
|
+
protected async prepareRequest(
|
|
374
|
+
request: RequestInit,
|
|
375
|
+
{ url, options }: { url: string; options: FinalRequestOptions },
|
|
376
|
+
): Promise<void> {}
|
|
377
|
+
|
|
378
|
+
get<Rsp>(path: string, opts?: PromiseOrValue<RequestOptions>): APIPromise<Rsp> {
|
|
379
|
+
return this.methodRequest('get', path, opts);
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
post<Rsp>(path: string, opts?: PromiseOrValue<RequestOptions>): APIPromise<Rsp> {
|
|
383
|
+
return this.methodRequest('post', path, opts);
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
patch<Rsp>(path: string, opts?: PromiseOrValue<RequestOptions>): APIPromise<Rsp> {
|
|
387
|
+
return this.methodRequest('patch', path, opts);
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
put<Rsp>(path: string, opts?: PromiseOrValue<RequestOptions>): APIPromise<Rsp> {
|
|
391
|
+
return this.methodRequest('put', path, opts);
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
delete<Rsp>(path: string, opts?: PromiseOrValue<RequestOptions>): APIPromise<Rsp> {
|
|
395
|
+
return this.methodRequest('delete', path, opts);
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
private methodRequest<Rsp>(
|
|
399
|
+
method: HTTPMethod,
|
|
400
|
+
path: string,
|
|
401
|
+
opts?: PromiseOrValue<RequestOptions>,
|
|
402
|
+
): APIPromise<Rsp> {
|
|
403
|
+
return this.request(
|
|
404
|
+
Promise.resolve(opts).then((opts) => {
|
|
405
|
+
return { method, path, ...opts };
|
|
406
|
+
}),
|
|
407
|
+
);
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
request<Rsp>(
|
|
411
|
+
options: PromiseOrValue<FinalRequestOptions>,
|
|
412
|
+
remainingRetries: number | null = null,
|
|
413
|
+
): APIPromise<Rsp> {
|
|
414
|
+
return new APIPromise(this, this.makeRequest(options, remainingRetries, undefined));
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
private async makeRequest(
|
|
418
|
+
optionsInput: PromiseOrValue<FinalRequestOptions>,
|
|
419
|
+
retriesRemaining: number | null,
|
|
420
|
+
retryOfRequestLogID: string | undefined,
|
|
421
|
+
): Promise<APIResponseProps> {
|
|
422
|
+
const options = await optionsInput;
|
|
423
|
+
const maxRetries = options.maxRetries ?? this.maxRetries;
|
|
424
|
+
if (retriesRemaining == null) {
|
|
425
|
+
retriesRemaining = maxRetries;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
await this.prepareOptions(options);
|
|
429
|
+
|
|
430
|
+
const { req, url, timeout } = await this.buildRequest(options, {
|
|
431
|
+
retryCount: maxRetries - retriesRemaining,
|
|
432
|
+
});
|
|
433
|
+
|
|
434
|
+
await this.prepareRequest(req, { url, options });
|
|
435
|
+
|
|
436
|
+
/** Not an API request ID, just for correlating local log entries. */
|
|
437
|
+
const requestLogID = 'log_' + ((Math.random() * (1 << 24)) | 0).toString(16).padStart(6, '0');
|
|
438
|
+
const retryLogStr = retryOfRequestLogID === undefined ? '' : `, retryOf: ${retryOfRequestLogID}`;
|
|
439
|
+
const startTime = Date.now();
|
|
440
|
+
|
|
441
|
+
loggerFor(this).debug(
|
|
442
|
+
`[${requestLogID}] sending request`,
|
|
443
|
+
formatRequestDetails({
|
|
444
|
+
retryOfRequestLogID,
|
|
445
|
+
method: options.method,
|
|
446
|
+
url,
|
|
447
|
+
options,
|
|
448
|
+
headers: req.headers,
|
|
449
|
+
}),
|
|
450
|
+
);
|
|
451
|
+
|
|
452
|
+
if (options.signal?.aborted) {
|
|
453
|
+
throw new Errors.APIUserAbortError();
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
const controller = new AbortController();
|
|
457
|
+
const response = await this.fetchWithTimeout(url, req, timeout, controller).catch(castToError);
|
|
458
|
+
const headersTime = Date.now();
|
|
459
|
+
|
|
460
|
+
if (response instanceof globalThis.Error) {
|
|
461
|
+
const retryMessage = `retrying, ${retriesRemaining} attempts remaining`;
|
|
462
|
+
if (options.signal?.aborted) {
|
|
463
|
+
throw new Errors.APIUserAbortError();
|
|
464
|
+
}
|
|
465
|
+
// detect native connection timeout errors
|
|
466
|
+
// deno throws "TypeError: error sending request for url (https://example/): client error (Connect): tcp connect error: Operation timed out (os error 60): Operation timed out (os error 60)"
|
|
467
|
+
// undici throws "TypeError: fetch failed" with cause "ConnectTimeoutError: Connect Timeout Error (attempted address: example:443, timeout: 1ms)"
|
|
468
|
+
// others do not provide enough information to distinguish timeouts from other connection errors
|
|
469
|
+
const isTimeout =
|
|
470
|
+
isAbortError(response) ||
|
|
471
|
+
/timed? ?out/i.test(String(response) + ('cause' in response ? String(response.cause) : ''));
|
|
472
|
+
if (retriesRemaining) {
|
|
473
|
+
loggerFor(this).info(
|
|
474
|
+
`[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} - ${retryMessage}`,
|
|
475
|
+
);
|
|
476
|
+
loggerFor(this).debug(
|
|
477
|
+
`[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} (${retryMessage})`,
|
|
478
|
+
formatRequestDetails({
|
|
479
|
+
retryOfRequestLogID,
|
|
480
|
+
url,
|
|
481
|
+
durationMs: headersTime - startTime,
|
|
482
|
+
message: response.message,
|
|
483
|
+
}),
|
|
484
|
+
);
|
|
485
|
+
return this.retryRequest(options, retriesRemaining, retryOfRequestLogID ?? requestLogID);
|
|
486
|
+
}
|
|
487
|
+
loggerFor(this).info(
|
|
488
|
+
`[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} - error; no more retries left`,
|
|
489
|
+
);
|
|
490
|
+
loggerFor(this).debug(
|
|
491
|
+
`[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} (error; no more retries left)`,
|
|
492
|
+
formatRequestDetails({
|
|
493
|
+
retryOfRequestLogID,
|
|
494
|
+
url,
|
|
495
|
+
durationMs: headersTime - startTime,
|
|
496
|
+
message: response.message,
|
|
497
|
+
}),
|
|
498
|
+
);
|
|
499
|
+
if (isTimeout) {
|
|
500
|
+
throw new Errors.APIConnectionTimeoutError();
|
|
501
|
+
}
|
|
502
|
+
throw new Errors.APIConnectionError({ cause: response });
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
const responseInfo = `[${requestLogID}${retryLogStr}] ${req.method} ${url} ${
|
|
506
|
+
response.ok ? 'succeeded' : 'failed'
|
|
507
|
+
} with status ${response.status} in ${headersTime - startTime}ms`;
|
|
508
|
+
|
|
509
|
+
if (!response.ok) {
|
|
510
|
+
const shouldRetry = await this.shouldRetry(response);
|
|
511
|
+
if (retriesRemaining && shouldRetry) {
|
|
512
|
+
const retryMessage = `retrying, ${retriesRemaining} attempts remaining`;
|
|
513
|
+
|
|
514
|
+
// We don't need the body of this response.
|
|
515
|
+
await Shims.CancelReadableStream(response.body);
|
|
516
|
+
loggerFor(this).info(`${responseInfo} - ${retryMessage}`);
|
|
517
|
+
loggerFor(this).debug(
|
|
518
|
+
`[${requestLogID}] response error (${retryMessage})`,
|
|
519
|
+
formatRequestDetails({
|
|
520
|
+
retryOfRequestLogID,
|
|
521
|
+
url: response.url,
|
|
522
|
+
status: response.status,
|
|
523
|
+
headers: response.headers,
|
|
524
|
+
durationMs: headersTime - startTime,
|
|
525
|
+
}),
|
|
526
|
+
);
|
|
527
|
+
return this.retryRequest(
|
|
528
|
+
options,
|
|
529
|
+
retriesRemaining,
|
|
530
|
+
retryOfRequestLogID ?? requestLogID,
|
|
531
|
+
response.headers,
|
|
532
|
+
);
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
const retryMessage = shouldRetry ? `error; no more retries left` : `error; not retryable`;
|
|
536
|
+
|
|
537
|
+
loggerFor(this).info(`${responseInfo} - ${retryMessage}`);
|
|
538
|
+
|
|
539
|
+
const errText = await response.text().catch((err: any) => castToError(err).message);
|
|
540
|
+
const errJSON = safeJSON(errText);
|
|
541
|
+
const errMessage = errJSON ? undefined : errText;
|
|
542
|
+
|
|
543
|
+
loggerFor(this).debug(
|
|
544
|
+
`[${requestLogID}] response error (${retryMessage})`,
|
|
545
|
+
formatRequestDetails({
|
|
546
|
+
retryOfRequestLogID,
|
|
547
|
+
url: response.url,
|
|
548
|
+
status: response.status,
|
|
549
|
+
headers: response.headers,
|
|
550
|
+
message: errMessage,
|
|
551
|
+
durationMs: Date.now() - startTime,
|
|
552
|
+
}),
|
|
553
|
+
);
|
|
554
|
+
|
|
555
|
+
const err = this.makeStatusError(response.status, errJSON, errMessage, response.headers);
|
|
556
|
+
throw err;
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
loggerFor(this).info(responseInfo);
|
|
560
|
+
loggerFor(this).debug(
|
|
561
|
+
`[${requestLogID}] response start`,
|
|
562
|
+
formatRequestDetails({
|
|
563
|
+
retryOfRequestLogID,
|
|
564
|
+
url: response.url,
|
|
565
|
+
status: response.status,
|
|
566
|
+
headers: response.headers,
|
|
567
|
+
durationMs: headersTime - startTime,
|
|
568
|
+
}),
|
|
569
|
+
);
|
|
570
|
+
|
|
571
|
+
return { response, options, controller, requestLogID, retryOfRequestLogID, startTime };
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
getAPIList<Item, PageClass extends Pagination.AbstractPage<Item> = Pagination.AbstractPage<Item>>(
|
|
575
|
+
path: string,
|
|
576
|
+
Page: new (...args: any[]) => PageClass,
|
|
577
|
+
opts?: RequestOptions,
|
|
578
|
+
): Pagination.PagePromise<PageClass, Item> {
|
|
579
|
+
return this.requestAPIList(Page, { method: 'get', path, ...opts });
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
requestAPIList<
|
|
583
|
+
Item = unknown,
|
|
584
|
+
PageClass extends Pagination.AbstractPage<Item> = Pagination.AbstractPage<Item>,
|
|
585
|
+
>(
|
|
586
|
+
Page: new (...args: ConstructorParameters<typeof Pagination.AbstractPage>) => PageClass,
|
|
587
|
+
options: FinalRequestOptions,
|
|
588
|
+
): Pagination.PagePromise<PageClass, Item> {
|
|
589
|
+
const request = this.makeRequest(options, null, undefined);
|
|
590
|
+
return new Pagination.PagePromise<PageClass, Item>(this as any as Cartesia, request, Page);
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
async fetchWithTimeout(
|
|
594
|
+
url: RequestInfo,
|
|
595
|
+
init: RequestInit | undefined,
|
|
596
|
+
ms: number,
|
|
597
|
+
controller: AbortController,
|
|
598
|
+
): Promise<Response> {
|
|
599
|
+
const { signal, method, ...options } = init || {};
|
|
600
|
+
if (signal) signal.addEventListener('abort', () => controller.abort());
|
|
601
|
+
|
|
602
|
+
const timeout = setTimeout(() => controller.abort(), ms);
|
|
603
|
+
|
|
604
|
+
const isReadableBody =
|
|
605
|
+
((globalThis as any).ReadableStream && options.body instanceof (globalThis as any).ReadableStream) ||
|
|
606
|
+
(typeof options.body === 'object' && options.body !== null && Symbol.asyncIterator in options.body);
|
|
607
|
+
|
|
608
|
+
const fetchOptions: RequestInit = {
|
|
609
|
+
signal: controller.signal as any,
|
|
610
|
+
...(isReadableBody ? { duplex: 'half' } : {}),
|
|
611
|
+
method: 'GET',
|
|
612
|
+
...options,
|
|
613
|
+
};
|
|
614
|
+
if (method) {
|
|
615
|
+
// Custom methods like 'patch' need to be uppercased
|
|
616
|
+
// See https://github.com/nodejs/undici/issues/2294
|
|
617
|
+
fetchOptions.method = method.toUpperCase();
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
try {
|
|
621
|
+
// use undefined this binding; fetch errors if bound to something else in browser/cloudflare
|
|
622
|
+
return await this.fetch.call(undefined, url, fetchOptions);
|
|
623
|
+
} finally {
|
|
624
|
+
clearTimeout(timeout);
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
private async shouldRetry(response: Response): Promise<boolean> {
|
|
629
|
+
// Note this is not a standard header.
|
|
630
|
+
const shouldRetryHeader = response.headers.get('x-should-retry');
|
|
631
|
+
|
|
632
|
+
// If the server explicitly says whether or not to retry, obey.
|
|
633
|
+
if (shouldRetryHeader === 'true') return true;
|
|
634
|
+
if (shouldRetryHeader === 'false') return false;
|
|
635
|
+
|
|
636
|
+
// Retry on request timeouts.
|
|
637
|
+
if (response.status === 408) return true;
|
|
638
|
+
|
|
639
|
+
// Retry on lock timeouts.
|
|
640
|
+
if (response.status === 409) return true;
|
|
641
|
+
|
|
642
|
+
// Retry on rate limits.
|
|
643
|
+
if (response.status === 429) return true;
|
|
644
|
+
|
|
645
|
+
// Retry internal errors.
|
|
646
|
+
if (response.status >= 500) return true;
|
|
647
|
+
|
|
648
|
+
return false;
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
private async retryRequest(
|
|
652
|
+
options: FinalRequestOptions,
|
|
653
|
+
retriesRemaining: number,
|
|
654
|
+
requestLogID: string,
|
|
655
|
+
responseHeaders?: Headers | undefined,
|
|
656
|
+
): Promise<APIResponseProps> {
|
|
657
|
+
let timeoutMillis: number | undefined;
|
|
658
|
+
|
|
659
|
+
// Note the `retry-after-ms` header may not be standard, but is a good idea and we'd like proactive support for it.
|
|
660
|
+
const retryAfterMillisHeader = responseHeaders?.get('retry-after-ms');
|
|
661
|
+
if (retryAfterMillisHeader) {
|
|
662
|
+
const timeoutMs = parseFloat(retryAfterMillisHeader);
|
|
663
|
+
if (!Number.isNaN(timeoutMs)) {
|
|
664
|
+
timeoutMillis = timeoutMs;
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
// About the Retry-After header: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After
|
|
669
|
+
const retryAfterHeader = responseHeaders?.get('retry-after');
|
|
670
|
+
if (retryAfterHeader && !timeoutMillis) {
|
|
671
|
+
const timeoutSeconds = parseFloat(retryAfterHeader);
|
|
672
|
+
if (!Number.isNaN(timeoutSeconds)) {
|
|
673
|
+
timeoutMillis = timeoutSeconds * 1000;
|
|
674
|
+
} else {
|
|
675
|
+
timeoutMillis = Date.parse(retryAfterHeader) - Date.now();
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
// If the API asks us to wait a certain amount of time (and it's a reasonable amount),
|
|
680
|
+
// just do what it says, but otherwise calculate a default
|
|
681
|
+
if (!(timeoutMillis && 0 <= timeoutMillis && timeoutMillis < 60 * 1000)) {
|
|
682
|
+
const maxRetries = options.maxRetries ?? this.maxRetries;
|
|
683
|
+
timeoutMillis = this.calculateDefaultRetryTimeoutMillis(retriesRemaining, maxRetries);
|
|
684
|
+
}
|
|
685
|
+
await sleep(timeoutMillis);
|
|
686
|
+
|
|
687
|
+
return this.makeRequest(options, retriesRemaining - 1, requestLogID);
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
private calculateDefaultRetryTimeoutMillis(retriesRemaining: number, maxRetries: number): number {
|
|
691
|
+
const initialRetryDelay = 0.5;
|
|
692
|
+
const maxRetryDelay = 8.0;
|
|
693
|
+
|
|
694
|
+
const numRetries = maxRetries - retriesRemaining;
|
|
695
|
+
|
|
696
|
+
// Apply exponential backoff, but not more than the max.
|
|
697
|
+
const sleepSeconds = Math.min(initialRetryDelay * Math.pow(2, numRetries), maxRetryDelay);
|
|
698
|
+
|
|
699
|
+
// Apply some jitter, take up to at most 25 percent of the retry time.
|
|
700
|
+
const jitter = 1 - Math.random() * 0.25;
|
|
701
|
+
|
|
702
|
+
return sleepSeconds * jitter * 1000;
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
async buildRequest(
|
|
706
|
+
inputOptions: FinalRequestOptions,
|
|
707
|
+
{ retryCount = 0 }: { retryCount?: number } = {},
|
|
708
|
+
): Promise<{ req: FinalizedRequestInit; url: string; timeout: number }> {
|
|
709
|
+
const options = { ...inputOptions };
|
|
710
|
+
const { method, path, query, defaultBaseURL } = options;
|
|
711
|
+
|
|
712
|
+
const url = this.buildURL(path!, query as Record<string, unknown>, defaultBaseURL);
|
|
713
|
+
if ('timeout' in options) validatePositiveInteger('timeout', options.timeout);
|
|
714
|
+
options.timeout = options.timeout ?? this.timeout;
|
|
715
|
+
const { bodyHeaders, body } = this.buildBody({ options });
|
|
716
|
+
const reqHeaders = await this.buildHeaders({ options: inputOptions, method, bodyHeaders, retryCount });
|
|
717
|
+
|
|
718
|
+
const req: FinalizedRequestInit = {
|
|
719
|
+
method,
|
|
720
|
+
headers: reqHeaders,
|
|
721
|
+
...(options.signal && { signal: options.signal }),
|
|
722
|
+
...((globalThis as any).ReadableStream &&
|
|
723
|
+
body instanceof (globalThis as any).ReadableStream && { duplex: 'half' }),
|
|
724
|
+
...(body && { body }),
|
|
725
|
+
...((this.fetchOptions as any) ?? {}),
|
|
726
|
+
...((options.fetchOptions as any) ?? {}),
|
|
727
|
+
};
|
|
728
|
+
|
|
729
|
+
return { req, url, timeout: options.timeout };
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
private async buildHeaders({
|
|
733
|
+
options,
|
|
734
|
+
method,
|
|
735
|
+
bodyHeaders,
|
|
736
|
+
retryCount,
|
|
737
|
+
}: {
|
|
738
|
+
options: FinalRequestOptions;
|
|
739
|
+
method: HTTPMethod;
|
|
740
|
+
bodyHeaders: HeadersLike;
|
|
741
|
+
retryCount: number;
|
|
742
|
+
}): Promise<Headers> {
|
|
743
|
+
let idempotencyHeaders: HeadersLike = {};
|
|
744
|
+
if (this.idempotencyHeader && method !== 'get') {
|
|
745
|
+
if (!options.idempotencyKey) options.idempotencyKey = this.defaultIdempotencyKey();
|
|
746
|
+
idempotencyHeaders[this.idempotencyHeader] = options.idempotencyKey;
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
const headers = buildHeaders([
|
|
750
|
+
idempotencyHeaders,
|
|
751
|
+
{
|
|
752
|
+
Accept: 'application/json',
|
|
753
|
+
'User-Agent': this.getUserAgent(),
|
|
754
|
+
'X-Stainless-Retry-Count': String(retryCount),
|
|
755
|
+
...(options.timeout ? { 'X-Stainless-Timeout': String(Math.trunc(options.timeout / 1000)) } : {}),
|
|
756
|
+
...getPlatformHeaders(),
|
|
757
|
+
'cartesia-version': '2025-04-16',
|
|
758
|
+
},
|
|
759
|
+
await this.authHeaders(options),
|
|
760
|
+
this._options.defaultHeaders,
|
|
761
|
+
bodyHeaders,
|
|
762
|
+
options.headers,
|
|
763
|
+
]);
|
|
764
|
+
|
|
765
|
+
this.validateHeaders(headers);
|
|
766
|
+
|
|
767
|
+
return headers.values;
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
private buildBody({ options: { body, headers: rawHeaders } }: { options: FinalRequestOptions }): {
|
|
771
|
+
bodyHeaders: HeadersLike;
|
|
772
|
+
body: BodyInit | undefined;
|
|
773
|
+
} {
|
|
774
|
+
if (!body) {
|
|
775
|
+
return { bodyHeaders: undefined, body: undefined };
|
|
776
|
+
}
|
|
777
|
+
const headers = buildHeaders([rawHeaders]);
|
|
778
|
+
if (
|
|
779
|
+
// Pass raw type verbatim
|
|
780
|
+
ArrayBuffer.isView(body) ||
|
|
781
|
+
body instanceof ArrayBuffer ||
|
|
782
|
+
body instanceof DataView ||
|
|
783
|
+
(typeof body === 'string' &&
|
|
784
|
+
// Preserve legacy string encoding behavior for now
|
|
785
|
+
headers.values.has('content-type')) ||
|
|
786
|
+
// `Blob` is superset of `File`
|
|
787
|
+
((globalThis as any).Blob && body instanceof (globalThis as any).Blob) ||
|
|
788
|
+
// `FormData` -> `multipart/form-data`
|
|
789
|
+
body instanceof FormData ||
|
|
790
|
+
// `URLSearchParams` -> `application/x-www-form-urlencoded`
|
|
791
|
+
body instanceof URLSearchParams ||
|
|
792
|
+
// Send chunked stream (each chunk has own `length`)
|
|
793
|
+
((globalThis as any).ReadableStream && body instanceof (globalThis as any).ReadableStream)
|
|
794
|
+
) {
|
|
795
|
+
return { bodyHeaders: undefined, body: body as BodyInit };
|
|
796
|
+
} else if (
|
|
797
|
+
typeof body === 'object' &&
|
|
798
|
+
(Symbol.asyncIterator in body ||
|
|
799
|
+
(Symbol.iterator in body && 'next' in body && typeof body.next === 'function'))
|
|
800
|
+
) {
|
|
801
|
+
return { bodyHeaders: undefined, body: Shims.ReadableStreamFrom(body as AsyncIterable<Uint8Array>) };
|
|
802
|
+
} else {
|
|
803
|
+
return this.#encoder({ body, headers });
|
|
804
|
+
}
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
static Cartesia = this;
|
|
808
|
+
static DEFAULT_TIMEOUT = 60000; // 1 minute
|
|
809
|
+
|
|
810
|
+
static CartesiaError = Errors.CartesiaError;
|
|
811
|
+
static APIError = Errors.APIError;
|
|
812
|
+
static APIConnectionError = Errors.APIConnectionError;
|
|
813
|
+
static APIConnectionTimeoutError = Errors.APIConnectionTimeoutError;
|
|
814
|
+
static APIUserAbortError = Errors.APIUserAbortError;
|
|
815
|
+
static NotFoundError = Errors.NotFoundError;
|
|
816
|
+
static ConflictError = Errors.ConflictError;
|
|
817
|
+
static RateLimitError = Errors.RateLimitError;
|
|
818
|
+
static BadRequestError = Errors.BadRequestError;
|
|
819
|
+
static AuthenticationError = Errors.AuthenticationError;
|
|
820
|
+
static InternalServerError = Errors.InternalServerError;
|
|
821
|
+
static PermissionDeniedError = Errors.PermissionDeniedError;
|
|
822
|
+
static UnprocessableEntityError = Errors.UnprocessableEntityError;
|
|
823
|
+
|
|
824
|
+
static toFile = Uploads.toFile;
|
|
825
|
+
|
|
826
|
+
agents: API.Agents = new API.Agents(this);
|
|
827
|
+
accessToken: API.AccessToken = new API.AccessToken(this);
|
|
828
|
+
datasets: API.Datasets = new API.Datasets(this);
|
|
829
|
+
fineTunes: API.FineTunes = new API.FineTunes(this);
|
|
830
|
+
infill: API.Infill = new API.Infill(this);
|
|
831
|
+
pronunciationDicts: API.PronunciationDicts = new API.PronunciationDicts(this);
|
|
832
|
+
stt: API.Stt = new API.Stt(this);
|
|
833
|
+
tts: API.TTS = new API.TTS(this);
|
|
834
|
+
voiceChanger: API.VoiceChanger = new API.VoiceChanger(this);
|
|
835
|
+
voices: API.Voices = new API.Voices(this);
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
Cartesia.Agents = Agents;
|
|
839
|
+
Cartesia.AccessToken = AccessToken;
|
|
840
|
+
Cartesia.Datasets = Datasets;
|
|
841
|
+
Cartesia.FineTunes = FineTunes;
|
|
842
|
+
Cartesia.Infill = Infill;
|
|
843
|
+
Cartesia.PronunciationDicts = PronunciationDicts;
|
|
844
|
+
Cartesia.Stt = Stt;
|
|
845
|
+
Cartesia.TTS = TTS;
|
|
846
|
+
Cartesia.VoiceChanger = VoiceChanger;
|
|
847
|
+
Cartesia.Voices = Voices;
|
|
848
|
+
|
|
849
|
+
// backcompat for main client name:
|
|
850
|
+
export const CartesiaClient = Cartesia;
|
|
851
|
+
|
|
852
|
+
export declare namespace Cartesia {
|
|
853
|
+
export type RequestOptions = Opts.RequestOptions;
|
|
854
|
+
|
|
855
|
+
export import CursorIDPage = Pagination.CursorIDPage;
|
|
856
|
+
export { type CursorIDPageParams as CursorIDPageParams, type CursorIDPageResponse as CursorIDPageResponse };
|
|
857
|
+
|
|
858
|
+
export { type GetStatusResponse as GetStatusResponse };
|
|
859
|
+
|
|
860
|
+
export {
|
|
861
|
+
Agents as Agents,
|
|
862
|
+
type AgentSummary as AgentSummary,
|
|
863
|
+
type AgentListResponse as AgentListResponse,
|
|
864
|
+
type AgentListPhoneNumbersResponse as AgentListPhoneNumbersResponse,
|
|
865
|
+
type AgentListTemplatesResponse as AgentListTemplatesResponse,
|
|
866
|
+
type AgentUpdateParams as AgentUpdateParams,
|
|
867
|
+
};
|
|
868
|
+
|
|
869
|
+
export {
|
|
870
|
+
AccessToken as AccessToken,
|
|
871
|
+
type AccessTokenCreateResponse as AccessTokenCreateResponse,
|
|
872
|
+
type AccessTokenCreateParams as AccessTokenCreateParams,
|
|
873
|
+
};
|
|
874
|
+
|
|
875
|
+
export {
|
|
876
|
+
Datasets as Datasets,
|
|
877
|
+
type Dataset as Dataset,
|
|
878
|
+
type DatasetsCursorIDPage as DatasetsCursorIDPage,
|
|
879
|
+
type DatasetCreateParams as DatasetCreateParams,
|
|
880
|
+
type DatasetUpdateParams as DatasetUpdateParams,
|
|
881
|
+
type DatasetListParams as DatasetListParams,
|
|
882
|
+
};
|
|
883
|
+
|
|
884
|
+
export {
|
|
885
|
+
FineTunes as FineTunes,
|
|
886
|
+
type FineTune as FineTune,
|
|
887
|
+
type FineTunesCursorIDPage as FineTunesCursorIDPage,
|
|
888
|
+
type FineTuneCreateParams as FineTuneCreateParams,
|
|
889
|
+
type FineTuneListParams as FineTuneListParams,
|
|
890
|
+
type FineTuneListVoicesParams as FineTuneListVoicesParams,
|
|
891
|
+
};
|
|
892
|
+
|
|
893
|
+
export {
|
|
894
|
+
Infill as Infill,
|
|
895
|
+
type OutputFormatContainer as OutputFormatContainer,
|
|
896
|
+
type RawEncoding as RawEncoding,
|
|
897
|
+
type InfillCreateParams as InfillCreateParams,
|
|
898
|
+
};
|
|
899
|
+
|
|
900
|
+
export {
|
|
901
|
+
PronunciationDicts as PronunciationDicts,
|
|
902
|
+
type PronunciationDict as PronunciationDict,
|
|
903
|
+
type PronunciationDictItem as PronunciationDictItem,
|
|
904
|
+
type PronunciationDictsCursorIDPage as PronunciationDictsCursorIDPage,
|
|
905
|
+
type PronunciationDictCreateParams as PronunciationDictCreateParams,
|
|
906
|
+
type PronunciationDictUpdateParams as PronunciationDictUpdateParams,
|
|
907
|
+
type PronunciationDictListParams as PronunciationDictListParams,
|
|
908
|
+
};
|
|
909
|
+
|
|
910
|
+
export {
|
|
911
|
+
Stt as Stt,
|
|
912
|
+
type SttTranscribeResponse as SttTranscribeResponse,
|
|
913
|
+
type SttTranscribeParams as SttTranscribeParams,
|
|
914
|
+
};
|
|
915
|
+
|
|
916
|
+
export {
|
|
917
|
+
TTS as TTS,
|
|
918
|
+
type GenerationConfig as GenerationConfig,
|
|
919
|
+
type GenerationRequest as GenerationRequest,
|
|
920
|
+
type ModelSpeed as ModelSpeed,
|
|
921
|
+
type RawOutputFormat as RawOutputFormat,
|
|
922
|
+
type VoiceSpecifier as VoiceSpecifier,
|
|
923
|
+
type WebsocketClientEvent as WebsocketClientEvent,
|
|
924
|
+
type WebsocketResponse as WebsocketResponse,
|
|
925
|
+
type TTSGenerateParams as TTSGenerateParams,
|
|
926
|
+
type TTSGenerateSseParams as TTSGenerateSseParams,
|
|
927
|
+
};
|
|
928
|
+
|
|
929
|
+
export {
|
|
930
|
+
VoiceChanger as VoiceChanger,
|
|
931
|
+
type VoiceChangerChangeVoiceBytesParams as VoiceChangerChangeVoiceBytesParams,
|
|
932
|
+
type VoiceChangerChangeVoiceSseParams as VoiceChangerChangeVoiceSseParams,
|
|
933
|
+
};
|
|
934
|
+
|
|
935
|
+
export {
|
|
936
|
+
Voices as Voices,
|
|
937
|
+
type GenderPresentation as GenderPresentation,
|
|
938
|
+
type SupportedLanguage as SupportedLanguage,
|
|
939
|
+
type Voice as Voice,
|
|
940
|
+
type VoiceMetadata as VoiceMetadata,
|
|
941
|
+
type VoicesCursorIDPage as VoicesCursorIDPage,
|
|
942
|
+
type VoiceUpdateParams as VoiceUpdateParams,
|
|
943
|
+
type VoiceListParams as VoiceListParams,
|
|
944
|
+
type VoiceCloneParams as VoiceCloneParams,
|
|
945
|
+
type VoiceLocalizeParams as VoiceLocalizeParams,
|
|
946
|
+
};
|
|
947
|
+
}
|