@cartesia/cartesia-js 1.3.0 → 2.0.0
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/Client.d.ts +40 -0
- package/Client.js +32 -0
- package/README.md +170 -197
- package/api/index.d.ts +1 -0
- package/api/index.js +17 -0
- package/api/resources/apiStatus/client/Client.d.ts +39 -0
- package/api/resources/apiStatus/client/Client.js +103 -0
- package/api/resources/apiStatus/client/index.d.ts +1 -0
- package/api/resources/apiStatus/client/index.js +2 -0
- package/api/resources/apiStatus/index.d.ts +2 -0
- package/api/resources/apiStatus/index.js +18 -0
- package/api/resources/apiStatus/types/ApiInfo.d.ts +7 -0
- package/api/resources/apiStatus/types/ApiInfo.js +5 -0
- package/api/resources/apiStatus/types/index.d.ts +1 -0
- package/api/resources/apiStatus/types/index.js +17 -0
- package/api/resources/embedding/index.d.ts +1 -0
- package/api/resources/embedding/index.js +17 -0
- package/api/resources/embedding/types/Embedding.d.ts +10 -0
- package/api/resources/embedding/types/Embedding.js +5 -0
- package/api/resources/embedding/types/index.d.ts +1 -0
- package/api/resources/embedding/types/index.js +17 -0
- package/api/resources/index.d.ts +12 -0
- package/api/resources/index.js +41 -0
- package/api/resources/tts/client/Client.d.ts +36 -0
- package/api/resources/tts/client/Client.js +152 -0
- package/api/resources/tts/client/index.d.ts +1 -0
- package/api/resources/tts/client/index.js +2 -0
- package/api/resources/tts/index.d.ts +2 -0
- package/api/resources/tts/index.js +18 -0
- package/api/resources/tts/types/CancelContextRequest.d.ts +10 -0
- package/api/resources/tts/types/CancelContextRequest.js +5 -0
- package/api/resources/tts/types/ContextId.d.ts +9 -0
- package/api/resources/tts/types/ContextId.js +5 -0
- package/api/resources/tts/types/Controls.d.ts +8 -0
- package/api/resources/tts/types/Controls.js +5 -0
- package/api/resources/tts/types/Emotion.d.ts +33 -0
- package/api/resources/tts/types/Emotion.js +28 -0
- package/api/resources/tts/types/GenerationRequest.d.ts +25 -0
- package/api/resources/tts/types/GenerationRequest.js +5 -0
- package/api/resources/tts/types/Mp3OutputFormat.d.ts +7 -0
- package/api/resources/tts/types/Mp3OutputFormat.js +5 -0
- package/api/resources/tts/types/NaturalSpecifier.d.ts +11 -0
- package/api/resources/tts/types/NaturalSpecifier.js +13 -0
- package/api/resources/tts/types/NumericalSpecifier.d.ts +4 -0
- package/api/resources/tts/types/NumericalSpecifier.js +5 -0
- package/api/resources/tts/types/OutputFormat.d.ts +16 -0
- package/api/resources/tts/types/OutputFormat.js +5 -0
- package/api/resources/tts/types/RawEncoding.d.ts +10 -0
- package/api/resources/tts/types/RawEncoding.js +12 -0
- package/api/resources/tts/types/RawOutputFormat.d.ts +8 -0
- package/api/resources/tts/types/RawOutputFormat.js +5 -0
- package/api/resources/tts/types/Speed.d.ts +10 -0
- package/api/resources/tts/types/Speed.js +5 -0
- package/api/resources/tts/types/SupportedLanguage.d.ts +26 -0
- package/api/resources/tts/types/SupportedLanguage.js +23 -0
- package/api/resources/tts/types/TtsRequest.d.ts +17 -0
- package/api/resources/tts/types/TtsRequest.js +5 -0
- package/api/resources/tts/types/TtsRequestEmbeddingSpecifier.d.ts +9 -0
- package/api/resources/tts/types/TtsRequestEmbeddingSpecifier.js +5 -0
- package/api/resources/tts/types/TtsRequestIdSpecifier.d.ts +9 -0
- package/api/resources/tts/types/TtsRequestIdSpecifier.js +5 -0
- package/api/resources/tts/types/TtsRequestVoiceSpecifier.d.ts +5 -0
- package/api/resources/tts/types/TtsRequestVoiceSpecifier.js +5 -0
- package/api/resources/tts/types/WavOutputFormat.d.ts +6 -0
- package/api/resources/tts/types/WavOutputFormat.js +5 -0
- package/api/resources/tts/types/WebSocketBaseResponse.d.ts +9 -0
- package/api/resources/tts/types/WebSocketBaseResponse.js +5 -0
- package/api/resources/tts/types/WebSocketChunkResponse.d.ts +8 -0
- package/api/resources/tts/types/WebSocketChunkResponse.js +5 -0
- package/api/resources/tts/types/WebSocketDoneResponse.d.ts +6 -0
- package/api/resources/tts/types/WebSocketDoneResponse.js +5 -0
- package/api/resources/tts/types/WebSocketErrorResponse.d.ts +7 -0
- package/api/resources/tts/types/WebSocketErrorResponse.js +5 -0
- package/api/resources/tts/types/WebSocketRawOutputFormat.d.ts +9 -0
- package/api/resources/tts/types/WebSocketRawOutputFormat.js +5 -0
- package/api/resources/tts/types/WebSocketRequest.d.ts +13 -0
- package/api/resources/tts/types/WebSocketRequest.js +5 -0
- package/api/resources/tts/types/WebSocketResponse.d.ts +19 -0
- package/api/resources/tts/types/WebSocketResponse.js +5 -0
- package/api/resources/tts/types/WebSocketStreamOptions.d.ts +6 -0
- package/api/resources/tts/types/WebSocketStreamOptions.js +5 -0
- package/api/resources/tts/types/WebSocketTimestampsResponse.d.ts +7 -0
- package/api/resources/tts/types/WebSocketTimestampsResponse.js +5 -0
- package/api/resources/tts/types/WebSocketTtsOutput.d.ts +9 -0
- package/api/resources/tts/types/WebSocketTtsOutput.js +5 -0
- package/api/resources/tts/types/WebSocketTtsRequest.d.ts +15 -0
- package/api/resources/tts/types/WebSocketTtsRequest.js +5 -0
- package/api/resources/tts/types/WordTimestamps.d.ts +8 -0
- package/api/resources/tts/types/WordTimestamps.js +5 -0
- package/api/resources/tts/types/index.d.ts +30 -0
- package/api/resources/tts/types/index.js +46 -0
- package/api/resources/voiceChanger/client/Client.d.ts +43 -0
- package/api/resources/voiceChanger/client/Client.js +181 -0
- package/api/resources/voiceChanger/client/index.d.ts +1 -0
- package/api/resources/voiceChanger/client/index.js +17 -0
- package/api/resources/voiceChanger/client/requests/VoiceChangerBytesRequest.d.ts +44 -0
- package/api/resources/voiceChanger/client/requests/VoiceChangerBytesRequest.js +5 -0
- package/api/resources/voiceChanger/client/requests/VoiceChangerSseRequest.d.ts +44 -0
- package/api/resources/voiceChanger/client/requests/VoiceChangerSseRequest.js +5 -0
- package/api/resources/voiceChanger/client/requests/index.d.ts +2 -0
- package/api/resources/voiceChanger/client/requests/index.js +2 -0
- package/api/resources/voiceChanger/index.d.ts +2 -0
- package/api/resources/voiceChanger/index.js +18 -0
- package/api/resources/voiceChanger/types/OutputFormatContainer.d.ts +9 -0
- package/api/resources/voiceChanger/types/OutputFormatContainer.js +11 -0
- package/api/resources/voiceChanger/types/StreamingResponse.d.ts +16 -0
- package/api/resources/voiceChanger/types/StreamingResponse.js +5 -0
- package/api/resources/voiceChanger/types/index.d.ts +2 -0
- package/api/resources/voiceChanger/types/index.js +18 -0
- package/api/resources/voices/client/Client.d.ts +141 -0
- package/api/resources/voices/client/Client.js +512 -0
- package/api/resources/voices/client/index.d.ts +1 -0
- package/api/resources/voices/client/index.js +17 -0
- package/api/resources/voices/client/requests/CloneVoiceRequest.d.ts +56 -0
- package/api/resources/voices/client/requests/CloneVoiceRequest.js +5 -0
- package/api/resources/voices/client/requests/index.d.ts +1 -0
- package/api/resources/voices/client/requests/index.js +2 -0
- package/api/resources/voices/index.d.ts +2 -0
- package/api/resources/voices/index.js +18 -0
- package/api/resources/voices/types/BaseVoiceId.d.ts +8 -0
- package/api/resources/voices/types/BaseVoiceId.js +5 -0
- package/api/resources/voices/types/CloneMode.d.ts +8 -0
- package/api/resources/voices/types/CloneMode.js +10 -0
- package/api/resources/voices/types/CreateVoiceRequest.d.ts +13 -0
- package/api/resources/voices/types/CreateVoiceRequest.js +5 -0
- package/api/resources/voices/types/EmbeddingResponse.d.ts +7 -0
- package/api/resources/voices/types/EmbeddingResponse.js +5 -0
- package/api/resources/voices/types/EmbeddingSpecifier.d.ts +8 -0
- package/api/resources/voices/types/EmbeddingSpecifier.js +5 -0
- package/api/resources/voices/types/Gender.d.ts +8 -0
- package/api/resources/voices/types/Gender.js +10 -0
- package/api/resources/voices/types/IdSpecifier.d.ts +8 -0
- package/api/resources/voices/types/IdSpecifier.js +5 -0
- package/api/resources/voices/types/LocalizeDialect.d.ts +16 -0
- package/api/resources/voices/types/LocalizeDialect.js +13 -0
- package/api/resources/voices/types/LocalizeTargetLanguage.d.ts +26 -0
- package/api/resources/voices/types/LocalizeTargetLanguage.js +23 -0
- package/api/resources/voices/types/LocalizeVoiceRequest.d.ts +10 -0
- package/api/resources/voices/types/LocalizeVoiceRequest.js +5 -0
- package/api/resources/voices/types/MixVoiceSpecifier.d.ts +5 -0
- package/api/resources/voices/types/MixVoiceSpecifier.js +5 -0
- package/api/resources/voices/types/MixVoicesRequest.d.ts +7 -0
- package/api/resources/voices/types/MixVoicesRequest.js +5 -0
- package/api/resources/voices/types/UpdateVoiceRequest.d.ts +9 -0
- package/api/resources/voices/types/UpdateVoiceRequest.js +5 -0
- package/api/resources/voices/types/Voice.d.ts +20 -0
- package/api/resources/voices/types/Voice.js +5 -0
- package/api/resources/voices/types/VoiceId.d.ts +7 -0
- package/api/resources/voices/types/VoiceId.js +5 -0
- package/api/resources/voices/types/VoiceMetadata.d.ts +18 -0
- package/api/resources/voices/types/VoiceMetadata.js +5 -0
- package/api/resources/voices/types/Weight.d.ts +7 -0
- package/api/resources/voices/types/Weight.js +5 -0
- package/api/resources/voices/types/index.d.ts +17 -0
- package/api/resources/voices/types/index.js +33 -0
- package/core/fetcher/APIResponse.d.ts +10 -0
- package/core/fetcher/APIResponse.js +2 -0
- package/core/fetcher/Fetcher.d.ts +39 -0
- package/core/fetcher/Fetcher.js +99 -0
- package/core/fetcher/Supplier.d.ts +4 -0
- package/core/fetcher/Supplier.js +22 -0
- package/core/fetcher/createRequestUrl.d.ts +1 -0
- package/core/fetcher/createRequestUrl.js +13 -0
- package/core/fetcher/getFetchFn.d.ts +4 -0
- package/core/fetcher/getFetchFn.js +59 -0
- package/core/fetcher/getHeader.d.ts +1 -0
- package/core/fetcher/getHeader.js +12 -0
- package/core/fetcher/getRequestBody.d.ts +7 -0
- package/core/fetcher/getRequestBody.js +23 -0
- package/core/fetcher/getResponseBody.d.ts +1 -0
- package/core/fetcher/getResponseBody.js +52 -0
- package/core/fetcher/index.d.ts +5 -0
- package/core/fetcher/index.js +9 -0
- package/core/fetcher/makeRequest.d.ts +1 -0
- package/core/fetcher/makeRequest.js +42 -0
- package/core/fetcher/requestWithRetries.d.ts +1 -0
- package/core/fetcher/requestWithRetries.js +41 -0
- package/core/fetcher/signals.d.ts +12 -0
- package/core/fetcher/signals.js +37 -0
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +30 -0
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +247 -0
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +22 -0
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +124 -0
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +229 -0
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +50 -0
- package/core/form-data-utils/FormDataWrapper.d.ts +60 -0
- package/core/form-data-utils/FormDataWrapper.js +174 -0
- package/core/form-data-utils/index.d.ts +1 -0
- package/core/form-data-utils/index.js +17 -0
- package/core/index.d.ts +5 -0
- package/core/index.js +34 -0
- package/core/runtime/index.d.ts +1 -0
- package/core/runtime/index.js +5 -0
- package/core/runtime/runtime.d.ts +9 -0
- package/core/runtime/runtime.js +93 -0
- package/core/schemas/Schema.d.ts +85 -0
- package/core/schemas/Schema.js +22 -0
- package/core/schemas/builders/bigint/bigint.d.ts +2 -0
- package/core/schemas/builders/bigint/bigint.js +50 -0
- package/core/schemas/builders/bigint/index.d.ts +1 -0
- package/core/schemas/builders/bigint/index.js +5 -0
- package/core/schemas/builders/date/date.d.ts +2 -0
- package/core/schemas/builders/date/date.js +63 -0
- package/core/schemas/builders/date/index.d.ts +1 -0
- package/core/schemas/builders/date/index.js +5 -0
- package/core/schemas/builders/enum/enum.d.ts +2 -0
- package/core/schemas/builders/enum/enum.js +39 -0
- package/core/schemas/builders/enum/index.d.ts +1 -0
- package/core/schemas/builders/enum/index.js +5 -0
- package/core/schemas/builders/index.d.ts +14 -0
- package/core/schemas/builders/index.js +30 -0
- package/core/schemas/builders/lazy/index.d.ts +3 -0
- package/core/schemas/builders/lazy/index.js +7 -0
- package/core/schemas/builders/lazy/lazy.d.ts +5 -0
- package/core/schemas/builders/lazy/lazy.js +25 -0
- package/core/schemas/builders/lazy/lazyObject.d.ts +3 -0
- package/core/schemas/builders/lazy/lazyObject.js +12 -0
- package/core/schemas/builders/list/index.d.ts +1 -0
- package/core/schemas/builders/list/index.js +5 -0
- package/core/schemas/builders/list/list.d.ts +2 -0
- package/core/schemas/builders/list/list.js +55 -0
- package/core/schemas/builders/literals/booleanLiteral.d.ts +2 -0
- package/core/schemas/builders/literals/booleanLiteral.js +29 -0
- package/core/schemas/builders/literals/index.d.ts +2 -0
- package/core/schemas/builders/literals/index.js +7 -0
- package/core/schemas/builders/literals/stringLiteral.d.ts +2 -0
- package/core/schemas/builders/literals/stringLiteral.js +29 -0
- package/core/schemas/builders/object/index.d.ts +6 -0
- package/core/schemas/builders/object/index.js +11 -0
- package/core/schemas/builders/object/object.d.ts +3 -0
- package/core/schemas/builders/object/object.js +233 -0
- package/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +6 -0
- package/core/schemas/builders/object/objectWithoutOptionalProperties.js +8 -0
- package/core/schemas/builders/object/property.d.ts +8 -0
- package/core/schemas/builders/object/property.js +16 -0
- package/core/schemas/builders/object/types.d.ts +26 -0
- package/core/schemas/builders/object/types.js +2 -0
- package/core/schemas/builders/object-like/getObjectLikeUtils.d.ts +9 -0
- package/core/schemas/builders/object-like/getObjectLikeUtils.js +54 -0
- package/core/schemas/builders/object-like/index.d.ts +2 -0
- package/core/schemas/builders/object-like/index.js +6 -0
- package/core/schemas/builders/object-like/types.d.ts +7 -0
- package/core/schemas/builders/object-like/types.js +2 -0
- package/core/schemas/builders/primitives/any.d.ts +1 -0
- package/core/schemas/builders/primitives/any.js +6 -0
- package/core/schemas/builders/primitives/boolean.d.ts +1 -0
- package/core/schemas/builders/primitives/boolean.js +25 -0
- package/core/schemas/builders/primitives/index.d.ts +5 -0
- package/core/schemas/builders/primitives/index.js +13 -0
- package/core/schemas/builders/primitives/number.d.ts +1 -0
- package/core/schemas/builders/primitives/number.js +25 -0
- package/core/schemas/builders/primitives/string.d.ts +1 -0
- package/core/schemas/builders/primitives/string.js +25 -0
- package/core/schemas/builders/primitives/unknown.d.ts +1 -0
- package/core/schemas/builders/primitives/unknown.js +6 -0
- package/core/schemas/builders/record/index.d.ts +2 -0
- package/core/schemas/builders/record/index.js +5 -0
- package/core/schemas/builders/record/record.d.ts +3 -0
- package/core/schemas/builders/record/record.js +95 -0
- package/core/schemas/builders/record/types.d.ts +4 -0
- package/core/schemas/builders/record/types.js +2 -0
- package/core/schemas/builders/schema-utils/JsonError.d.ts +5 -0
- package/core/schemas/builders/schema-utils/JsonError.js +12 -0
- package/core/schemas/builders/schema-utils/ParseError.d.ts +5 -0
- package/core/schemas/builders/schema-utils/ParseError.js +12 -0
- package/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +17 -0
- package/core/schemas/builders/schema-utils/getSchemaUtils.js +82 -0
- package/core/schemas/builders/schema-utils/index.d.ts +4 -0
- package/core/schemas/builders/schema-utils/index.js +11 -0
- package/core/schemas/builders/schema-utils/stringifyValidationErrors.d.ts +2 -0
- package/core/schemas/builders/schema-utils/stringifyValidationErrors.js +10 -0
- package/core/schemas/builders/set/index.d.ts +1 -0
- package/core/schemas/builders/set/index.js +5 -0
- package/core/schemas/builders/set/set.d.ts +2 -0
- package/core/schemas/builders/set/set.js +44 -0
- package/core/schemas/builders/undiscriminated-union/index.d.ts +2 -0
- package/core/schemas/builders/undiscriminated-union/index.js +5 -0
- package/core/schemas/builders/undiscriminated-union/types.d.ts +4 -0
- package/core/schemas/builders/undiscriminated-union/types.js +2 -0
- package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.d.ts +3 -0
- package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +40 -0
- package/core/schemas/builders/union/discriminant.d.ts +5 -0
- package/core/schemas/builders/union/discriminant.js +10 -0
- package/core/schemas/builders/union/index.d.ts +4 -0
- package/core/schemas/builders/union/index.js +7 -0
- package/core/schemas/builders/union/types.d.ts +13 -0
- package/core/schemas/builders/union/types.js +2 -0
- package/core/schemas/builders/union/union.d.ts +4 -0
- package/core/schemas/builders/union/union.js +130 -0
- package/core/schemas/index.d.ts +2 -0
- package/core/schemas/index.js +17 -0
- package/core/schemas/utils/MaybePromise.d.ts +1 -0
- package/core/schemas/utils/MaybePromise.js +2 -0
- package/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +7 -0
- package/core/schemas/utils/addQuestionMarksToNullableProperties.js +2 -0
- package/core/schemas/utils/createIdentitySchemaCreator.d.ts +2 -0
- package/core/schemas/utils/createIdentitySchemaCreator.js +16 -0
- package/core/schemas/utils/entries.d.ts +1 -0
- package/core/schemas/utils/entries.js +7 -0
- package/core/schemas/utils/filterObject.d.ts +1 -0
- package/core/schemas/utils/filterObject.js +14 -0
- package/core/schemas/utils/getErrorMessageForIncorrectType.d.ts +1 -0
- package/core/schemas/utils/getErrorMessageForIncorrectType.js +28 -0
- package/core/schemas/utils/isPlainObject.d.ts +1 -0
- package/core/schemas/utils/isPlainObject.js +18 -0
- package/core/schemas/utils/keys.d.ts +1 -0
- package/core/schemas/utils/keys.js +7 -0
- package/core/schemas/utils/maybeSkipValidation.d.ts +2 -0
- package/core/schemas/utils/maybeSkipValidation.js +28 -0
- package/core/schemas/utils/partition.d.ts +1 -0
- package/core/schemas/utils/partition.js +16 -0
- package/core/streaming-fetcher/Stream.d.ts +48 -0
- package/core/streaming-fetcher/Stream.js +170 -0
- package/core/streaming-fetcher/index.d.ts +1 -0
- package/core/streaming-fetcher/index.js +5 -0
- package/core/websocket/events.d.ts +36 -0
- package/core/websocket/events.js +27 -0
- package/core/websocket/index.d.ts +1 -0
- package/core/websocket/index.js +17 -0
- package/core/websocket/ws.d.ts +136 -0
- package/core/websocket/ws.js +438 -0
- package/dist/Client.d.ts +40 -0
- package/dist/Client.js +32 -0
- package/dist/api/index.d.ts +1 -0
- package/dist/api/index.js +17 -0
- package/dist/api/resources/apiStatus/client/Client.d.ts +39 -0
- package/dist/api/resources/apiStatus/client/Client.js +103 -0
- package/dist/api/resources/apiStatus/client/index.d.ts +1 -0
- package/dist/api/resources/apiStatus/client/index.js +2 -0
- package/dist/api/resources/apiStatus/index.d.ts +2 -0
- package/dist/api/resources/apiStatus/index.js +18 -0
- package/dist/api/resources/apiStatus/types/ApiInfo.d.ts +7 -0
- package/dist/api/resources/apiStatus/types/ApiInfo.js +5 -0
- package/dist/api/resources/apiStatus/types/index.d.ts +1 -0
- package/dist/api/resources/apiStatus/types/index.js +17 -0
- package/dist/api/resources/embedding/index.d.ts +1 -0
- package/dist/api/resources/embedding/index.js +17 -0
- package/dist/api/resources/embedding/types/Embedding.d.ts +10 -0
- package/dist/api/resources/embedding/types/Embedding.js +5 -0
- package/dist/api/resources/embedding/types/index.d.ts +1 -0
- package/dist/api/resources/embedding/types/index.js +17 -0
- package/dist/api/resources/index.d.ts +12 -0
- package/dist/api/resources/index.js +41 -0
- package/dist/api/resources/tts/client/Client.d.ts +36 -0
- package/dist/api/resources/tts/client/Client.js +152 -0
- package/dist/api/resources/tts/client/index.d.ts +1 -0
- package/dist/api/resources/tts/client/index.js +2 -0
- package/dist/api/resources/tts/index.d.ts +2 -0
- package/dist/api/resources/tts/index.js +18 -0
- package/dist/api/resources/tts/types/CancelContextRequest.d.ts +10 -0
- package/dist/api/resources/tts/types/CancelContextRequest.js +5 -0
- package/dist/api/resources/tts/types/ContextId.d.ts +9 -0
- package/dist/api/resources/tts/types/ContextId.js +5 -0
- package/dist/api/resources/tts/types/Controls.d.ts +8 -0
- package/dist/api/resources/tts/types/Controls.js +5 -0
- package/dist/api/resources/tts/types/Emotion.d.ts +33 -0
- package/dist/api/resources/tts/types/Emotion.js +28 -0
- package/dist/api/resources/tts/types/GenerationRequest.d.ts +25 -0
- package/dist/api/resources/tts/types/GenerationRequest.js +5 -0
- package/dist/api/resources/tts/types/Mp3OutputFormat.d.ts +7 -0
- package/dist/api/resources/tts/types/Mp3OutputFormat.js +5 -0
- package/dist/api/resources/tts/types/NaturalSpecifier.d.ts +11 -0
- package/dist/api/resources/tts/types/NaturalSpecifier.js +13 -0
- package/dist/api/resources/tts/types/NumericalSpecifier.d.ts +4 -0
- package/dist/api/resources/tts/types/NumericalSpecifier.js +5 -0
- package/dist/api/resources/tts/types/OutputFormat.d.ts +16 -0
- package/dist/api/resources/tts/types/OutputFormat.js +5 -0
- package/dist/api/resources/tts/types/RawEncoding.d.ts +10 -0
- package/dist/api/resources/tts/types/RawEncoding.js +12 -0
- package/dist/api/resources/tts/types/RawOutputFormat.d.ts +8 -0
- package/dist/api/resources/tts/types/RawOutputFormat.js +5 -0
- package/dist/api/resources/tts/types/Speed.d.ts +10 -0
- package/dist/api/resources/tts/types/Speed.js +5 -0
- package/dist/api/resources/tts/types/SupportedLanguage.d.ts +26 -0
- package/dist/api/resources/tts/types/SupportedLanguage.js +23 -0
- package/dist/api/resources/tts/types/TtsRequest.d.ts +17 -0
- package/dist/api/resources/tts/types/TtsRequest.js +5 -0
- package/dist/api/resources/tts/types/TtsRequestEmbeddingSpecifier.d.ts +9 -0
- package/dist/api/resources/tts/types/TtsRequestEmbeddingSpecifier.js +5 -0
- package/dist/api/resources/tts/types/TtsRequestIdSpecifier.d.ts +9 -0
- package/dist/api/resources/tts/types/TtsRequestIdSpecifier.js +5 -0
- package/dist/api/resources/tts/types/TtsRequestVoiceSpecifier.d.ts +5 -0
- package/dist/api/resources/tts/types/TtsRequestVoiceSpecifier.js +5 -0
- package/dist/api/resources/tts/types/WavOutputFormat.d.ts +6 -0
- package/dist/api/resources/tts/types/WavOutputFormat.js +5 -0
- package/dist/api/resources/tts/types/WebSocketBaseResponse.d.ts +9 -0
- package/dist/api/resources/tts/types/WebSocketBaseResponse.js +5 -0
- package/dist/api/resources/tts/types/WebSocketChunkResponse.d.ts +8 -0
- package/dist/api/resources/tts/types/WebSocketChunkResponse.js +5 -0
- package/dist/api/resources/tts/types/WebSocketDoneResponse.d.ts +6 -0
- package/dist/api/resources/tts/types/WebSocketDoneResponse.js +5 -0
- package/dist/api/resources/tts/types/WebSocketErrorResponse.d.ts +7 -0
- package/dist/api/resources/tts/types/WebSocketErrorResponse.js +5 -0
- package/dist/api/resources/tts/types/WebSocketRawOutputFormat.d.ts +9 -0
- package/dist/api/resources/tts/types/WebSocketRawOutputFormat.js +5 -0
- package/dist/api/resources/tts/types/WebSocketRequest.d.ts +13 -0
- package/dist/api/resources/tts/types/WebSocketRequest.js +5 -0
- package/dist/api/resources/tts/types/WebSocketResponse.d.ts +19 -0
- package/dist/api/resources/tts/types/WebSocketResponse.js +5 -0
- package/dist/api/resources/tts/types/WebSocketStreamOptions.d.ts +6 -0
- package/dist/api/resources/tts/types/WebSocketStreamOptions.js +5 -0
- package/dist/api/resources/tts/types/WebSocketTimestampsResponse.d.ts +7 -0
- package/dist/api/resources/tts/types/WebSocketTimestampsResponse.js +5 -0
- package/dist/api/resources/tts/types/WebSocketTtsOutput.d.ts +9 -0
- package/dist/api/resources/tts/types/WebSocketTtsOutput.js +5 -0
- package/dist/api/resources/tts/types/WebSocketTtsRequest.d.ts +15 -0
- package/dist/api/resources/tts/types/WebSocketTtsRequest.js +5 -0
- package/dist/api/resources/tts/types/WordTimestamps.d.ts +8 -0
- package/dist/api/resources/tts/types/WordTimestamps.js +5 -0
- package/dist/api/resources/tts/types/index.d.ts +30 -0
- package/dist/api/resources/tts/types/index.js +46 -0
- package/dist/api/resources/voiceChanger/client/Client.d.ts +43 -0
- package/dist/api/resources/voiceChanger/client/Client.js +181 -0
- package/dist/api/resources/voiceChanger/client/index.d.ts +1 -0
- package/dist/api/resources/voiceChanger/client/index.js +17 -0
- package/dist/api/resources/voiceChanger/client/requests/VoiceChangerBytesRequest.d.ts +44 -0
- package/dist/api/resources/voiceChanger/client/requests/VoiceChangerBytesRequest.js +5 -0
- package/dist/api/resources/voiceChanger/client/requests/VoiceChangerSseRequest.d.ts +44 -0
- package/dist/api/resources/voiceChanger/client/requests/VoiceChangerSseRequest.js +5 -0
- package/dist/api/resources/voiceChanger/client/requests/index.d.ts +2 -0
- package/dist/api/resources/voiceChanger/client/requests/index.js +2 -0
- package/dist/api/resources/voiceChanger/index.d.ts +2 -0
- package/dist/api/resources/voiceChanger/index.js +18 -0
- package/dist/api/resources/voiceChanger/types/OutputFormatContainer.d.ts +9 -0
- package/dist/api/resources/voiceChanger/types/OutputFormatContainer.js +11 -0
- package/dist/api/resources/voiceChanger/types/StreamingResponse.d.ts +16 -0
- package/dist/api/resources/voiceChanger/types/StreamingResponse.js +5 -0
- package/dist/api/resources/voiceChanger/types/index.d.ts +2 -0
- package/dist/api/resources/voiceChanger/types/index.js +18 -0
- package/dist/api/resources/voices/client/Client.d.ts +141 -0
- package/dist/api/resources/voices/client/Client.js +512 -0
- package/dist/api/resources/voices/client/index.d.ts +1 -0
- package/dist/api/resources/voices/client/index.js +17 -0
- package/dist/api/resources/voices/client/requests/CloneVoiceRequest.d.ts +56 -0
- package/dist/api/resources/voices/client/requests/CloneVoiceRequest.js +5 -0
- package/dist/api/resources/voices/client/requests/index.d.ts +1 -0
- package/dist/api/resources/voices/client/requests/index.js +2 -0
- package/dist/api/resources/voices/index.d.ts +2 -0
- package/dist/api/resources/voices/index.js +18 -0
- package/dist/api/resources/voices/types/BaseVoiceId.d.ts +8 -0
- package/dist/api/resources/voices/types/BaseVoiceId.js +5 -0
- package/dist/api/resources/voices/types/CloneMode.d.ts +8 -0
- package/dist/api/resources/voices/types/CloneMode.js +10 -0
- package/dist/api/resources/voices/types/CreateVoiceRequest.d.ts +13 -0
- package/dist/api/resources/voices/types/CreateVoiceRequest.js +5 -0
- package/dist/api/resources/voices/types/EmbeddingResponse.d.ts +7 -0
- package/dist/api/resources/voices/types/EmbeddingResponse.js +5 -0
- package/dist/api/resources/voices/types/EmbeddingSpecifier.d.ts +8 -0
- package/dist/api/resources/voices/types/EmbeddingSpecifier.js +5 -0
- package/dist/api/resources/voices/types/Gender.d.ts +8 -0
- package/dist/api/resources/voices/types/Gender.js +10 -0
- package/dist/api/resources/voices/types/IdSpecifier.d.ts +8 -0
- package/dist/api/resources/voices/types/IdSpecifier.js +5 -0
- package/dist/api/resources/voices/types/LocalizeDialect.d.ts +16 -0
- package/dist/api/resources/voices/types/LocalizeDialect.js +13 -0
- package/dist/api/resources/voices/types/LocalizeTargetLanguage.d.ts +26 -0
- package/dist/api/resources/voices/types/LocalizeTargetLanguage.js +23 -0
- package/dist/api/resources/voices/types/LocalizeVoiceRequest.d.ts +10 -0
- package/dist/api/resources/voices/types/LocalizeVoiceRequest.js +5 -0
- package/dist/api/resources/voices/types/MixVoiceSpecifier.d.ts +5 -0
- package/dist/api/resources/voices/types/MixVoiceSpecifier.js +5 -0
- package/dist/api/resources/voices/types/MixVoicesRequest.d.ts +7 -0
- package/dist/api/resources/voices/types/MixVoicesRequest.js +5 -0
- package/dist/api/resources/voices/types/UpdateVoiceRequest.d.ts +9 -0
- package/dist/api/resources/voices/types/UpdateVoiceRequest.js +5 -0
- package/dist/api/resources/voices/types/Voice.d.ts +20 -0
- package/dist/api/resources/voices/types/Voice.js +5 -0
- package/dist/api/resources/voices/types/VoiceId.d.ts +7 -0
- package/dist/api/resources/voices/types/VoiceId.js +5 -0
- package/dist/api/resources/voices/types/VoiceMetadata.d.ts +18 -0
- package/dist/api/resources/voices/types/VoiceMetadata.js +5 -0
- package/dist/api/resources/voices/types/Weight.d.ts +7 -0
- package/dist/api/resources/voices/types/Weight.js +5 -0
- package/dist/api/resources/voices/types/index.d.ts +17 -0
- package/dist/api/resources/voices/types/index.js +33 -0
- package/dist/core/fetcher/APIResponse.d.ts +10 -0
- package/dist/core/fetcher/APIResponse.js +2 -0
- package/dist/core/fetcher/Fetcher.d.ts +39 -0
- package/dist/core/fetcher/Fetcher.js +99 -0
- package/dist/core/fetcher/Supplier.d.ts +4 -0
- package/dist/core/fetcher/Supplier.js +22 -0
- package/dist/core/fetcher/createRequestUrl.d.ts +1 -0
- package/dist/core/fetcher/createRequestUrl.js +13 -0
- package/dist/core/fetcher/getFetchFn.d.ts +4 -0
- package/dist/core/fetcher/getFetchFn.js +59 -0
- package/dist/core/fetcher/getHeader.d.ts +1 -0
- package/dist/core/fetcher/getHeader.js +12 -0
- package/dist/core/fetcher/getRequestBody.d.ts +7 -0
- package/dist/core/fetcher/getRequestBody.js +23 -0
- package/dist/core/fetcher/getResponseBody.d.ts +1 -0
- package/dist/core/fetcher/getResponseBody.js +52 -0
- package/dist/core/fetcher/index.d.ts +5 -0
- package/dist/core/fetcher/index.js +9 -0
- package/dist/core/fetcher/makeRequest.d.ts +1 -0
- package/dist/core/fetcher/makeRequest.js +42 -0
- package/dist/core/fetcher/requestWithRetries.d.ts +1 -0
- package/dist/core/fetcher/requestWithRetries.js +41 -0
- package/dist/core/fetcher/signals.d.ts +12 -0
- package/dist/core/fetcher/signals.js +37 -0
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +30 -0
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +247 -0
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +22 -0
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +124 -0
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +229 -0
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +50 -0
- package/dist/core/form-data-utils/FormDataWrapper.d.ts +60 -0
- package/dist/core/form-data-utils/FormDataWrapper.js +174 -0
- package/dist/core/form-data-utils/index.d.ts +1 -0
- package/dist/core/form-data-utils/index.js +17 -0
- package/dist/core/index.d.ts +5 -0
- package/dist/core/index.js +34 -0
- package/dist/core/runtime/index.d.ts +1 -0
- package/dist/core/runtime/index.js +5 -0
- package/dist/core/runtime/runtime.d.ts +9 -0
- package/dist/core/runtime/runtime.js +93 -0
- package/dist/core/schemas/Schema.d.ts +85 -0
- package/dist/core/schemas/Schema.js +22 -0
- package/dist/core/schemas/builders/bigint/bigint.d.ts +2 -0
- package/dist/core/schemas/builders/bigint/bigint.js +50 -0
- package/dist/core/schemas/builders/bigint/index.d.ts +1 -0
- package/dist/core/schemas/builders/bigint/index.js +5 -0
- package/dist/core/schemas/builders/date/date.d.ts +2 -0
- package/dist/core/schemas/builders/date/date.js +63 -0
- package/dist/core/schemas/builders/date/index.d.ts +1 -0
- package/dist/core/schemas/builders/date/index.js +5 -0
- package/dist/core/schemas/builders/enum/enum.d.ts +2 -0
- package/dist/core/schemas/builders/enum/enum.js +39 -0
- package/dist/core/schemas/builders/enum/index.d.ts +1 -0
- package/dist/core/schemas/builders/enum/index.js +5 -0
- package/dist/core/schemas/builders/index.d.ts +14 -0
- package/dist/core/schemas/builders/index.js +30 -0
- package/dist/core/schemas/builders/lazy/index.d.ts +3 -0
- package/dist/core/schemas/builders/lazy/index.js +7 -0
- package/dist/core/schemas/builders/lazy/lazy.d.ts +5 -0
- package/dist/core/schemas/builders/lazy/lazy.js +25 -0
- package/dist/core/schemas/builders/lazy/lazyObject.d.ts +3 -0
- package/dist/core/schemas/builders/lazy/lazyObject.js +12 -0
- package/dist/core/schemas/builders/list/index.d.ts +1 -0
- package/dist/core/schemas/builders/list/index.js +5 -0
- package/dist/core/schemas/builders/list/list.d.ts +2 -0
- package/dist/core/schemas/builders/list/list.js +55 -0
- package/dist/core/schemas/builders/literals/booleanLiteral.d.ts +2 -0
- package/dist/core/schemas/builders/literals/booleanLiteral.js +29 -0
- package/dist/core/schemas/builders/literals/index.d.ts +2 -0
- package/dist/core/schemas/builders/literals/index.js +7 -0
- package/dist/core/schemas/builders/literals/stringLiteral.d.ts +2 -0
- package/dist/core/schemas/builders/literals/stringLiteral.js +29 -0
- package/dist/core/schemas/builders/object/index.d.ts +6 -0
- package/dist/core/schemas/builders/object/index.js +11 -0
- package/dist/core/schemas/builders/object/object.d.ts +3 -0
- package/dist/core/schemas/builders/object/object.js +233 -0
- package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +6 -0
- package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.js +8 -0
- package/dist/core/schemas/builders/object/property.d.ts +8 -0
- package/dist/core/schemas/builders/object/property.js +16 -0
- package/dist/core/schemas/builders/object/types.d.ts +26 -0
- package/dist/core/schemas/builders/object/types.js +2 -0
- package/dist/core/schemas/builders/object-like/getObjectLikeUtils.d.ts +9 -0
- package/dist/core/schemas/builders/object-like/getObjectLikeUtils.js +54 -0
- package/dist/core/schemas/builders/object-like/index.d.ts +2 -0
- package/dist/core/schemas/builders/object-like/index.js +6 -0
- package/dist/core/schemas/builders/object-like/types.d.ts +7 -0
- package/dist/core/schemas/builders/object-like/types.js +2 -0
- package/dist/core/schemas/builders/primitives/any.d.ts +1 -0
- package/dist/core/schemas/builders/primitives/any.js +6 -0
- package/dist/core/schemas/builders/primitives/boolean.d.ts +1 -0
- package/dist/core/schemas/builders/primitives/boolean.js +25 -0
- package/dist/core/schemas/builders/primitives/index.d.ts +5 -0
- package/dist/core/schemas/builders/primitives/index.js +13 -0
- package/dist/core/schemas/builders/primitives/number.d.ts +1 -0
- package/dist/core/schemas/builders/primitives/number.js +25 -0
- package/dist/core/schemas/builders/primitives/string.d.ts +1 -0
- package/dist/core/schemas/builders/primitives/string.js +25 -0
- package/dist/core/schemas/builders/primitives/unknown.d.ts +1 -0
- package/dist/core/schemas/builders/primitives/unknown.js +6 -0
- package/dist/core/schemas/builders/record/index.d.ts +2 -0
- package/dist/core/schemas/builders/record/index.js +5 -0
- package/dist/core/schemas/builders/record/record.d.ts +3 -0
- package/dist/core/schemas/builders/record/record.js +95 -0
- package/dist/core/schemas/builders/record/types.d.ts +4 -0
- package/dist/core/schemas/builders/record/types.js +2 -0
- package/dist/core/schemas/builders/schema-utils/JsonError.d.ts +5 -0
- package/dist/core/schemas/builders/schema-utils/JsonError.js +12 -0
- package/dist/core/schemas/builders/schema-utils/ParseError.d.ts +5 -0
- package/dist/core/schemas/builders/schema-utils/ParseError.js +12 -0
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +17 -0
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +82 -0
- package/dist/core/schemas/builders/schema-utils/index.d.ts +4 -0
- package/dist/core/schemas/builders/schema-utils/index.js +11 -0
- package/dist/core/schemas/builders/schema-utils/stringifyValidationErrors.d.ts +2 -0
- package/dist/core/schemas/builders/schema-utils/stringifyValidationErrors.js +10 -0
- package/dist/core/schemas/builders/set/index.d.ts +1 -0
- package/dist/core/schemas/builders/set/index.js +5 -0
- package/dist/core/schemas/builders/set/set.d.ts +2 -0
- package/dist/core/schemas/builders/set/set.js +44 -0
- package/dist/core/schemas/builders/undiscriminated-union/index.d.ts +2 -0
- package/dist/core/schemas/builders/undiscriminated-union/index.js +5 -0
- package/dist/core/schemas/builders/undiscriminated-union/types.d.ts +4 -0
- package/dist/core/schemas/builders/undiscriminated-union/types.js +2 -0
- package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.d.ts +3 -0
- package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +40 -0
- package/dist/core/schemas/builders/union/discriminant.d.ts +5 -0
- package/dist/core/schemas/builders/union/discriminant.js +10 -0
- package/dist/core/schemas/builders/union/index.d.ts +4 -0
- package/dist/core/schemas/builders/union/index.js +7 -0
- package/dist/core/schemas/builders/union/types.d.ts +13 -0
- package/dist/core/schemas/builders/union/types.js +2 -0
- package/dist/core/schemas/builders/union/union.d.ts +4 -0
- package/dist/core/schemas/builders/union/union.js +130 -0
- package/dist/core/schemas/index.d.ts +2 -0
- package/dist/core/schemas/index.js +17 -0
- package/dist/core/schemas/utils/MaybePromise.d.ts +1 -0
- package/dist/core/schemas/utils/MaybePromise.js +2 -0
- package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +7 -0
- package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.js +2 -0
- package/dist/core/schemas/utils/createIdentitySchemaCreator.d.ts +2 -0
- package/dist/core/schemas/utils/createIdentitySchemaCreator.js +16 -0
- package/dist/core/schemas/utils/entries.d.ts +1 -0
- package/dist/core/schemas/utils/entries.js +7 -0
- package/dist/core/schemas/utils/filterObject.d.ts +1 -0
- package/dist/core/schemas/utils/filterObject.js +14 -0
- package/dist/core/schemas/utils/getErrorMessageForIncorrectType.d.ts +1 -0
- package/dist/core/schemas/utils/getErrorMessageForIncorrectType.js +28 -0
- package/dist/core/schemas/utils/isPlainObject.d.ts +1 -0
- package/dist/core/schemas/utils/isPlainObject.js +18 -0
- package/dist/core/schemas/utils/keys.d.ts +1 -0
- package/dist/core/schemas/utils/keys.js +7 -0
- package/dist/core/schemas/utils/maybeSkipValidation.d.ts +2 -0
- package/dist/core/schemas/utils/maybeSkipValidation.js +28 -0
- package/dist/core/schemas/utils/partition.d.ts +1 -0
- package/dist/core/schemas/utils/partition.js +16 -0
- package/dist/core/streaming-fetcher/Stream.d.ts +48 -0
- package/dist/core/streaming-fetcher/Stream.js +170 -0
- package/dist/core/streaming-fetcher/index.d.ts +1 -0
- package/dist/core/streaming-fetcher/index.js +5 -0
- package/dist/core/websocket/events.d.ts +36 -0
- package/dist/core/websocket/events.js +27 -0
- package/dist/core/websocket/index.d.ts +1 -0
- package/dist/core/websocket/index.js +17 -0
- package/dist/core/websocket/ws.d.ts +136 -0
- package/dist/core/websocket/ws.js +438 -0
- package/dist/environments.d.ts +7 -0
- package/dist/environments.js +9 -0
- package/dist/errors/CartesiaError.d.ts +12 -0
- package/dist/errors/CartesiaError.js +32 -0
- package/dist/errors/CartesiaTimeoutError.d.ts +6 -0
- package/dist/errors/CartesiaTimeoutError.js +13 -0
- package/dist/errors/index.d.ts +2 -0
- package/dist/errors/index.js +7 -0
- package/dist/index.d.ts +4 -12
- package/dist/index.js +33 -26
- package/dist/serialization/index.d.ts +1 -0
- package/dist/serialization/index.js +17 -0
- package/dist/serialization/resources/apiStatus/index.d.ts +1 -0
- package/dist/serialization/resources/apiStatus/index.js +17 -0
- package/dist/serialization/resources/apiStatus/types/ApiInfo.d.ts +13 -0
- package/dist/serialization/resources/apiStatus/types/ApiInfo.js +34 -0
- package/dist/serialization/resources/apiStatus/types/index.d.ts +1 -0
- package/dist/serialization/resources/apiStatus/types/index.js +17 -0
- package/dist/serialization/resources/embedding/index.d.ts +1 -0
- package/dist/serialization/resources/embedding/index.js +17 -0
- package/dist/serialization/resources/embedding/types/Embedding.d.ts +10 -0
- package/dist/serialization/resources/embedding/types/Embedding.js +31 -0
- package/dist/serialization/resources/embedding/types/index.d.ts +1 -0
- package/dist/serialization/resources/embedding/types/index.js +17 -0
- package/dist/serialization/resources/index.d.ts +10 -0
- package/dist/serialization/resources/index.js +39 -0
- package/dist/serialization/resources/tts/index.d.ts +1 -0
- package/dist/serialization/resources/tts/index.js +17 -0
- package/dist/serialization/resources/tts/types/CancelContextRequest.d.ts +14 -0
- package/dist/serialization/resources/tts/types/CancelContextRequest.js +35 -0
- package/dist/serialization/resources/tts/types/ContextId.d.ts +10 -0
- package/dist/serialization/resources/tts/types/ContextId.js +31 -0
- package/dist/serialization/resources/tts/types/Controls.d.ts +15 -0
- package/dist/serialization/resources/tts/types/Controls.js +36 -0
- package/dist/serialization/resources/tts/types/Emotion.d.ts +10 -0
- package/dist/serialization/resources/tts/types/Emotion.js +52 -0
- package/dist/serialization/resources/tts/types/GenerationRequest.d.ts +24 -0
- package/dist/serialization/resources/tts/types/GenerationRequest.js +45 -0
- package/dist/serialization/resources/tts/types/Mp3OutputFormat.d.ts +13 -0
- package/dist/serialization/resources/tts/types/Mp3OutputFormat.js +34 -0
- package/dist/serialization/resources/tts/types/NaturalSpecifier.d.ts +10 -0
- package/dist/serialization/resources/tts/types/NaturalSpecifier.js +31 -0
- package/dist/serialization/resources/tts/types/NumericalSpecifier.d.ts +10 -0
- package/dist/serialization/resources/tts/types/NumericalSpecifier.js +31 -0
- package/dist/serialization/resources/tts/types/OutputFormat.d.ts +22 -0
- package/dist/serialization/resources/tts/types/OutputFormat.js +43 -0
- package/dist/serialization/resources/tts/types/RawEncoding.d.ts +10 -0
- package/dist/serialization/resources/tts/types/RawEncoding.js +31 -0
- package/dist/serialization/resources/tts/types/RawOutputFormat.d.ts +14 -0
- package/dist/serialization/resources/tts/types/RawOutputFormat.js +35 -0
- package/dist/serialization/resources/tts/types/Speed.d.ts +12 -0
- package/dist/serialization/resources/tts/types/Speed.js +33 -0
- package/dist/serialization/resources/tts/types/SupportedLanguage.d.ts +10 -0
- package/dist/serialization/resources/tts/types/SupportedLanguage.js +47 -0
- package/dist/serialization/resources/tts/types/TtsRequest.d.ts +20 -0
- package/dist/serialization/resources/tts/types/TtsRequest.js +41 -0
- package/dist/serialization/resources/tts/types/TtsRequestEmbeddingSpecifier.d.ts +16 -0
- package/dist/serialization/resources/tts/types/TtsRequestEmbeddingSpecifier.js +37 -0
- package/dist/serialization/resources/tts/types/TtsRequestIdSpecifier.d.ts +16 -0
- package/dist/serialization/resources/tts/types/TtsRequestIdSpecifier.js +37 -0
- package/dist/serialization/resources/tts/types/TtsRequestVoiceSpecifier.d.ts +12 -0
- package/dist/serialization/resources/tts/types/TtsRequestVoiceSpecifier.js +33 -0
- package/dist/serialization/resources/tts/types/WavOutputFormat.d.ts +12 -0
- package/dist/serialization/resources/tts/types/WavOutputFormat.js +32 -0
- package/dist/serialization/resources/tts/types/WebSocketBaseResponse.d.ts +15 -0
- package/dist/serialization/resources/tts/types/WebSocketBaseResponse.js +36 -0
- package/dist/serialization/resources/tts/types/WebSocketChunkResponse.d.ts +14 -0
- package/dist/serialization/resources/tts/types/WebSocketChunkResponse.js +37 -0
- package/dist/serialization/resources/tts/types/WebSocketDoneResponse.d.ts +12 -0
- package/dist/serialization/resources/tts/types/WebSocketDoneResponse.js +32 -0
- package/dist/serialization/resources/tts/types/WebSocketErrorResponse.d.ts +13 -0
- package/dist/serialization/resources/tts/types/WebSocketErrorResponse.js +36 -0
- package/dist/serialization/resources/tts/types/WebSocketRawOutputFormat.d.ts +15 -0
- package/dist/serialization/resources/tts/types/WebSocketRawOutputFormat.js +36 -0
- package/dist/serialization/resources/tts/types/WebSocketRequest.d.ts +12 -0
- package/dist/serialization/resources/tts/types/WebSocketRequest.js +33 -0
- package/dist/serialization/resources/tts/types/WebSocketResponse.d.ts +26 -0
- package/dist/serialization/resources/tts/types/WebSocketResponse.js +45 -0
- package/dist/serialization/resources/tts/types/WebSocketStreamOptions.d.ts +12 -0
- package/dist/serialization/resources/tts/types/WebSocketStreamOptions.js +33 -0
- package/dist/serialization/resources/tts/types/WebSocketTimestampsResponse.d.ts +14 -0
- package/dist/serialization/resources/tts/types/WebSocketTimestampsResponse.js +37 -0
- package/dist/serialization/resources/tts/types/WebSocketTtsOutput.d.ts +16 -0
- package/dist/serialization/resources/tts/types/WebSocketTtsOutput.js +37 -0
- package/dist/serialization/resources/tts/types/WebSocketTtsRequest.d.ts +21 -0
- package/dist/serialization/resources/tts/types/WebSocketTtsRequest.js +42 -0
- package/dist/serialization/resources/tts/types/WordTimestamps.d.ts +14 -0
- package/dist/serialization/resources/tts/types/WordTimestamps.js +35 -0
- package/dist/serialization/resources/tts/types/index.d.ts +30 -0
- package/dist/serialization/resources/tts/types/index.js +46 -0
- package/dist/serialization/resources/voiceChanger/index.d.ts +1 -0
- package/dist/serialization/resources/voiceChanger/index.js +17 -0
- package/dist/serialization/resources/voiceChanger/types/OutputFormatContainer.d.ts +10 -0
- package/dist/serialization/resources/voiceChanger/types/OutputFormatContainer.js +31 -0
- package/dist/serialization/resources/voiceChanger/types/StreamingResponse.d.ts +22 -0
- package/dist/serialization/resources/voiceChanger/types/StreamingResponse.js +43 -0
- package/dist/serialization/resources/voiceChanger/types/index.d.ts +2 -0
- package/dist/serialization/resources/voiceChanger/types/index.js +18 -0
- package/dist/serialization/resources/voices/client/index.d.ts +1 -0
- package/dist/serialization/resources/voices/client/index.js +27 -0
- package/dist/serialization/resources/voices/client/list.d.ts +11 -0
- package/dist/serialization/resources/voices/client/list.js +32 -0
- package/dist/serialization/resources/voices/index.d.ts +2 -0
- package/dist/serialization/resources/voices/index.js +18 -0
- package/dist/serialization/resources/voices/types/BaseVoiceId.d.ts +11 -0
- package/dist/serialization/resources/voices/types/BaseVoiceId.js +8 -0
- package/dist/serialization/resources/voices/types/CloneMode.d.ts +10 -0
- package/dist/serialization/resources/voices/types/CloneMode.js +31 -0
- package/dist/serialization/resources/voices/types/CreateVoiceRequest.d.ts +19 -0
- package/dist/serialization/resources/voices/types/CreateVoiceRequest.js +40 -0
- package/dist/serialization/resources/voices/types/EmbeddingResponse.d.ts +13 -0
- package/dist/serialization/resources/voices/types/EmbeddingResponse.js +34 -0
- package/dist/serialization/resources/voices/types/EmbeddingSpecifier.d.ts +15 -0
- package/dist/serialization/resources/voices/types/EmbeddingSpecifier.js +36 -0
- package/dist/serialization/resources/voices/types/Gender.d.ts +10 -0
- package/dist/serialization/resources/voices/types/Gender.js +34 -0
- package/dist/serialization/resources/voices/types/IdSpecifier.d.ts +15 -0
- package/dist/serialization/resources/voices/types/IdSpecifier.js +36 -0
- package/dist/serialization/resources/voices/types/LocalizeDialect.d.ts +10 -0
- package/dist/serialization/resources/voices/types/LocalizeDialect.js +31 -0
- package/dist/serialization/resources/voices/types/LocalizeTargetLanguage.d.ts +10 -0
- package/dist/serialization/resources/voices/types/LocalizeTargetLanguage.js +47 -0
- package/dist/serialization/resources/voices/types/LocalizeVoiceRequest.d.ts +19 -0
- package/dist/serialization/resources/voices/types/LocalizeVoiceRequest.js +40 -0
- package/dist/serialization/resources/voices/types/MixVoiceSpecifier.d.ts +12 -0
- package/dist/serialization/resources/voices/types/MixVoiceSpecifier.js +33 -0
- package/dist/serialization/resources/voices/types/MixVoicesRequest.d.ts +13 -0
- package/dist/serialization/resources/voices/types/MixVoicesRequest.js +34 -0
- package/dist/serialization/resources/voices/types/UpdateVoiceRequest.d.ts +13 -0
- package/dist/serialization/resources/voices/types/UpdateVoiceRequest.js +34 -0
- package/dist/serialization/resources/voices/types/Voice.d.ts +24 -0
- package/dist/serialization/resources/voices/types/Voice.js +45 -0
- package/dist/serialization/resources/voices/types/VoiceId.d.ts +10 -0
- package/dist/serialization/resources/voices/types/VoiceId.js +31 -0
- package/dist/serialization/resources/voices/types/VoiceMetadata.d.ts +20 -0
- package/dist/serialization/resources/voices/types/VoiceMetadata.js +41 -0
- package/dist/serialization/resources/voices/types/Weight.d.ts +10 -0
- package/dist/serialization/resources/voices/types/Weight.js +31 -0
- package/dist/serialization/resources/voices/types/index.d.ts +17 -0
- package/dist/serialization/resources/voices/types/index.js +33 -0
- package/dist/version.d.ts +1 -0
- package/dist/version.js +4 -0
- package/dist/wrapper/Client.d.ts +6 -0
- package/dist/wrapper/Client.js +12 -0
- package/dist/wrapper/StreamingTTSClient.d.ts +16 -0
- package/dist/wrapper/StreamingTTSClient.js +23 -0
- package/dist/{tts/player.d.ts → wrapper/WebPlayer.d.ts} +2 -8
- package/dist/wrapper/WebPlayer.js +141 -0
- package/dist/wrapper/Websocket.d.ts +57 -0
- package/dist/wrapper/Websocket.js +218 -0
- package/dist/{tts → wrapper}/source.d.ts +8 -17
- package/dist/wrapper/source.js +179 -0
- package/dist/wrapper/utils.d.ts +105 -0
- package/dist/wrapper/utils.js +173 -0
- package/environments.d.ts +7 -0
- package/environments.js +9 -0
- package/errors/CartesiaError.d.ts +12 -0
- package/errors/CartesiaError.js +32 -0
- package/errors/CartesiaTimeoutError.d.ts +6 -0
- package/errors/CartesiaTimeoutError.js +13 -0
- package/errors/index.d.ts +2 -0
- package/errors/index.js +7 -0
- package/index.d.ts +4 -0
- package/index.js +34 -0
- package/jest.config.js +5 -0
- package/package.json +45 -46
- package/reference.md +771 -0
- package/serialization/index.d.ts +1 -0
- package/serialization/index.js +17 -0
- package/serialization/resources/apiStatus/index.d.ts +1 -0
- package/serialization/resources/apiStatus/index.js +17 -0
- package/serialization/resources/apiStatus/types/ApiInfo.d.ts +13 -0
- package/serialization/resources/apiStatus/types/ApiInfo.js +34 -0
- package/serialization/resources/apiStatus/types/index.d.ts +1 -0
- package/serialization/resources/apiStatus/types/index.js +17 -0
- package/serialization/resources/embedding/index.d.ts +1 -0
- package/serialization/resources/embedding/index.js +17 -0
- package/serialization/resources/embedding/types/Embedding.d.ts +10 -0
- package/serialization/resources/embedding/types/Embedding.js +31 -0
- package/serialization/resources/embedding/types/index.d.ts +1 -0
- package/serialization/resources/embedding/types/index.js +17 -0
- package/serialization/resources/index.d.ts +10 -0
- package/serialization/resources/index.js +39 -0
- package/serialization/resources/tts/index.d.ts +1 -0
- package/serialization/resources/tts/index.js +17 -0
- package/serialization/resources/tts/types/CancelContextRequest.d.ts +14 -0
- package/serialization/resources/tts/types/CancelContextRequest.js +35 -0
- package/serialization/resources/tts/types/ContextId.d.ts +10 -0
- package/serialization/resources/tts/types/ContextId.js +31 -0
- package/serialization/resources/tts/types/Controls.d.ts +15 -0
- package/serialization/resources/tts/types/Controls.js +36 -0
- package/serialization/resources/tts/types/Emotion.d.ts +10 -0
- package/serialization/resources/tts/types/Emotion.js +52 -0
- package/serialization/resources/tts/types/GenerationRequest.d.ts +24 -0
- package/serialization/resources/tts/types/GenerationRequest.js +45 -0
- package/serialization/resources/tts/types/Mp3OutputFormat.d.ts +13 -0
- package/serialization/resources/tts/types/Mp3OutputFormat.js +34 -0
- package/serialization/resources/tts/types/NaturalSpecifier.d.ts +10 -0
- package/serialization/resources/tts/types/NaturalSpecifier.js +31 -0
- package/serialization/resources/tts/types/NumericalSpecifier.d.ts +10 -0
- package/serialization/resources/tts/types/NumericalSpecifier.js +31 -0
- package/serialization/resources/tts/types/OutputFormat.d.ts +22 -0
- package/serialization/resources/tts/types/OutputFormat.js +43 -0
- package/serialization/resources/tts/types/RawEncoding.d.ts +10 -0
- package/serialization/resources/tts/types/RawEncoding.js +31 -0
- package/serialization/resources/tts/types/RawOutputFormat.d.ts +14 -0
- package/serialization/resources/tts/types/RawOutputFormat.js +35 -0
- package/serialization/resources/tts/types/Speed.d.ts +12 -0
- package/serialization/resources/tts/types/Speed.js +33 -0
- package/serialization/resources/tts/types/SupportedLanguage.d.ts +10 -0
- package/serialization/resources/tts/types/SupportedLanguage.js +47 -0
- package/serialization/resources/tts/types/TtsRequest.d.ts +20 -0
- package/serialization/resources/tts/types/TtsRequest.js +41 -0
- package/serialization/resources/tts/types/TtsRequestEmbeddingSpecifier.d.ts +16 -0
- package/serialization/resources/tts/types/TtsRequestEmbeddingSpecifier.js +37 -0
- package/serialization/resources/tts/types/TtsRequestIdSpecifier.d.ts +16 -0
- package/serialization/resources/tts/types/TtsRequestIdSpecifier.js +37 -0
- package/serialization/resources/tts/types/TtsRequestVoiceSpecifier.d.ts +12 -0
- package/serialization/resources/tts/types/TtsRequestVoiceSpecifier.js +33 -0
- package/serialization/resources/tts/types/WavOutputFormat.d.ts +12 -0
- package/serialization/resources/tts/types/WavOutputFormat.js +32 -0
- package/serialization/resources/tts/types/WebSocketBaseResponse.d.ts +15 -0
- package/serialization/resources/tts/types/WebSocketBaseResponse.js +36 -0
- package/serialization/resources/tts/types/WebSocketChunkResponse.d.ts +14 -0
- package/serialization/resources/tts/types/WebSocketChunkResponse.js +37 -0
- package/serialization/resources/tts/types/WebSocketDoneResponse.d.ts +12 -0
- package/serialization/resources/tts/types/WebSocketDoneResponse.js +32 -0
- package/serialization/resources/tts/types/WebSocketErrorResponse.d.ts +13 -0
- package/serialization/resources/tts/types/WebSocketErrorResponse.js +36 -0
- package/serialization/resources/tts/types/WebSocketRawOutputFormat.d.ts +15 -0
- package/serialization/resources/tts/types/WebSocketRawOutputFormat.js +36 -0
- package/serialization/resources/tts/types/WebSocketRequest.d.ts +12 -0
- package/serialization/resources/tts/types/WebSocketRequest.js +33 -0
- package/serialization/resources/tts/types/WebSocketResponse.d.ts +26 -0
- package/serialization/resources/tts/types/WebSocketResponse.js +45 -0
- package/serialization/resources/tts/types/WebSocketStreamOptions.d.ts +12 -0
- package/serialization/resources/tts/types/WebSocketStreamOptions.js +33 -0
- package/serialization/resources/tts/types/WebSocketTimestampsResponse.d.ts +14 -0
- package/serialization/resources/tts/types/WebSocketTimestampsResponse.js +37 -0
- package/serialization/resources/tts/types/WebSocketTtsOutput.d.ts +16 -0
- package/serialization/resources/tts/types/WebSocketTtsOutput.js +37 -0
- package/serialization/resources/tts/types/WebSocketTtsRequest.d.ts +21 -0
- package/serialization/resources/tts/types/WebSocketTtsRequest.js +42 -0
- package/serialization/resources/tts/types/WordTimestamps.d.ts +14 -0
- package/serialization/resources/tts/types/WordTimestamps.js +35 -0
- package/serialization/resources/tts/types/index.d.ts +30 -0
- package/serialization/resources/tts/types/index.js +46 -0
- package/serialization/resources/voiceChanger/index.d.ts +1 -0
- package/serialization/resources/voiceChanger/index.js +17 -0
- package/serialization/resources/voiceChanger/types/OutputFormatContainer.d.ts +10 -0
- package/serialization/resources/voiceChanger/types/OutputFormatContainer.js +31 -0
- package/serialization/resources/voiceChanger/types/StreamingResponse.d.ts +22 -0
- package/serialization/resources/voiceChanger/types/StreamingResponse.js +43 -0
- package/serialization/resources/voiceChanger/types/index.d.ts +2 -0
- package/serialization/resources/voiceChanger/types/index.js +18 -0
- package/serialization/resources/voices/client/index.d.ts +1 -0
- package/serialization/resources/voices/client/index.js +27 -0
- package/serialization/resources/voices/client/list.d.ts +11 -0
- package/serialization/resources/voices/client/list.js +32 -0
- package/serialization/resources/voices/index.d.ts +2 -0
- package/serialization/resources/voices/index.js +18 -0
- package/serialization/resources/voices/types/BaseVoiceId.d.ts +11 -0
- package/serialization/resources/voices/types/BaseVoiceId.js +8 -0
- package/serialization/resources/voices/types/CloneMode.d.ts +10 -0
- package/serialization/resources/voices/types/CloneMode.js +31 -0
- package/serialization/resources/voices/types/CreateVoiceRequest.d.ts +19 -0
- package/serialization/resources/voices/types/CreateVoiceRequest.js +40 -0
- package/serialization/resources/voices/types/EmbeddingResponse.d.ts +13 -0
- package/serialization/resources/voices/types/EmbeddingResponse.js +34 -0
- package/serialization/resources/voices/types/EmbeddingSpecifier.d.ts +15 -0
- package/serialization/resources/voices/types/EmbeddingSpecifier.js +36 -0
- package/serialization/resources/voices/types/Gender.d.ts +10 -0
- package/serialization/resources/voices/types/Gender.js +34 -0
- package/serialization/resources/voices/types/IdSpecifier.d.ts +15 -0
- package/serialization/resources/voices/types/IdSpecifier.js +36 -0
- package/serialization/resources/voices/types/LocalizeDialect.d.ts +10 -0
- package/serialization/resources/voices/types/LocalizeDialect.js +31 -0
- package/serialization/resources/voices/types/LocalizeTargetLanguage.d.ts +10 -0
- package/serialization/resources/voices/types/LocalizeTargetLanguage.js +47 -0
- package/serialization/resources/voices/types/LocalizeVoiceRequest.d.ts +19 -0
- package/serialization/resources/voices/types/LocalizeVoiceRequest.js +40 -0
- package/serialization/resources/voices/types/MixVoiceSpecifier.d.ts +12 -0
- package/serialization/resources/voices/types/MixVoiceSpecifier.js +33 -0
- package/serialization/resources/voices/types/MixVoicesRequest.d.ts +13 -0
- package/serialization/resources/voices/types/MixVoicesRequest.js +34 -0
- package/serialization/resources/voices/types/UpdateVoiceRequest.d.ts +13 -0
- package/serialization/resources/voices/types/UpdateVoiceRequest.js +34 -0
- package/serialization/resources/voices/types/Voice.d.ts +24 -0
- package/serialization/resources/voices/types/Voice.js +45 -0
- package/serialization/resources/voices/types/VoiceId.d.ts +10 -0
- package/serialization/resources/voices/types/VoiceId.js +31 -0
- package/serialization/resources/voices/types/VoiceMetadata.d.ts +20 -0
- package/serialization/resources/voices/types/VoiceMetadata.js +41 -0
- package/serialization/resources/voices/types/Weight.d.ts +10 -0
- package/serialization/resources/voices/types/Weight.js +31 -0
- package/serialization/resources/voices/types/index.d.ts +17 -0
- package/serialization/resources/voices/types/index.js +33 -0
- package/version.d.ts +1 -0
- package/version.js +4 -0
- package/wrapper/Client.d.ts +6 -0
- package/wrapper/Client.js +12 -0
- package/wrapper/StreamingTTSClient.d.ts +16 -0
- package/wrapper/StreamingTTSClient.js +23 -0
- package/{dist/tts/player.d.cts → wrapper/WebPlayer.d.ts} +2 -8
- package/wrapper/WebPlayer.js +141 -0
- package/wrapper/Websocket.d.ts +57 -0
- package/wrapper/Websocket.js +218 -0
- package/{dist/tts/source.d.cts → wrapper/source.d.ts} +8 -17
- package/wrapper/source.js +179 -0
- package/wrapper/utils.d.ts +105 -0
- package/wrapper/utils.js +173 -0
- package/CHANGELOG.md +0 -90
- package/LICENSE.md +0 -21
- package/dist/chunk-2BFEKY3F.js +0 -16
- package/dist/chunk-5SBAQNWQ.js +0 -86
- package/dist/chunk-CJZSHIRI.js +0 -274
- package/dist/chunk-CSOXALSC.js +0 -132
- package/dist/chunk-FLWYXP5Z.js +0 -40
- package/dist/chunk-FXPGR372.js +0 -0
- package/dist/chunk-I5YVYTNK.js +0 -190
- package/dist/chunk-LKKWJLUG.js +0 -17
- package/dist/chunk-NJDRWDQ3.js +0 -57
- package/dist/chunk-QT5LHJ3D.js +0 -43
- package/dist/chunk-RJICGVPL.js +0 -79
- package/dist/chunk-RYHHRY64.js +0 -26
- package/dist/chunk-WLEVU3HN.js +0 -42
- package/dist/index.cjs +0 -883
- package/dist/index.d.cts +0 -12
- package/dist/lib/client.cjs +0 -113
- package/dist/lib/client.d.cts +0 -12
- package/dist/lib/client.d.ts +0 -12
- package/dist/lib/client.js +0 -8
- package/dist/lib/constants.cjs +0 -42
- package/dist/lib/constants.d.cts +0 -16
- package/dist/lib/constants.d.ts +0 -16
- package/dist/lib/constants.js +0 -11
- package/dist/lib/index.cjs +0 -745
- package/dist/lib/index.d.cts +0 -19
- package/dist/lib/index.d.ts +0 -19
- package/dist/lib/index.js +0 -15
- package/dist/react/index.cjs +0 -1137
- package/dist/react/index.d.cts +0 -35
- package/dist/react/index.d.ts +0 -35
- package/dist/react/index.js +0 -274
- package/dist/react/utils.cjs +0 -57
- package/dist/react/utils.d.cts +0 -7
- package/dist/react/utils.d.ts +0 -7
- package/dist/react/utils.js +0 -7
- package/dist/tts/index.cjs +0 -630
- package/dist/tts/index.d.cts +0 -25
- package/dist/tts/index.d.ts +0 -25
- package/dist/tts/index.js +0 -12
- package/dist/tts/player.cjs +0 -202
- package/dist/tts/player.js +0 -9
- package/dist/tts/source.cjs +0 -244
- package/dist/tts/source.js +0 -9
- package/dist/tts/utils.cjs +0 -134
- package/dist/tts/utils.d.cts +0 -70
- package/dist/tts/utils.d.ts +0 -70
- package/dist/tts/utils.js +0 -22
- package/dist/tts/websocket.cjs +0 -598
- package/dist/tts/websocket.d.cts +0 -70
- package/dist/tts/websocket.d.ts +0 -70
- package/dist/tts/websocket.js +0 -11
- package/dist/types/index.cjs +0 -18
- package/dist/types/index.d.cts +0 -167
- package/dist/types/index.d.ts +0 -167
- package/dist/types/index.js +0 -1
- package/dist/voice-changer/index.cjs +0 -143
- package/dist/voice-changer/index.d.cts +0 -10
- package/dist/voice-changer/index.d.ts +0 -10
- package/dist/voice-changer/index.js +0 -9
- package/dist/voices/index.cjs +0 -180
- package/dist/voices/index.d.cts +0 -16
- package/dist/voices/index.d.ts +0 -16
- package/dist/voices/index.js +0 -9
- package/src/index.ts +0 -6
- package/src/lib/client.ts +0 -31
- package/src/lib/constants.ts +0 -25
- package/src/lib/index.ts +0 -19
- package/src/react/index.ts +0 -303
- package/src/react/utils.ts +0 -11
- package/src/tts/index.ts +0 -32
- package/src/tts/player.ts +0 -117
- package/src/tts/source.ts +0 -196
- package/src/tts/utils.ts +0 -164
- package/src/tts/websocket.ts +0 -283
- package/src/types/index.ts +0 -227
- package/src/voice-changer/index.ts +0 -37
- package/src/voices/index.ts +0 -76
package/Client.d.ts
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as environments from "./environments";
|
|
5
|
+
import * as core from "./core";
|
|
6
|
+
import { ApiStatus } from "./api/resources/apiStatus/client/Client";
|
|
7
|
+
import { Tts } from "./api/resources/tts/client/Client";
|
|
8
|
+
import { VoiceChanger } from "./api/resources/voiceChanger/client/Client";
|
|
9
|
+
import { Voices } from "./api/resources/voices/client/Client";
|
|
10
|
+
export declare namespace CartesiaClient {
|
|
11
|
+
interface Options {
|
|
12
|
+
environment?: core.Supplier<environments.CartesiaEnvironment | string>;
|
|
13
|
+
apiKey?: core.Supplier<string | undefined>;
|
|
14
|
+
/** Override the Cartesia-Version header */
|
|
15
|
+
cartesiaVersion?: "2024-06-10";
|
|
16
|
+
fetcher?: core.FetchFunction;
|
|
17
|
+
}
|
|
18
|
+
interface RequestOptions {
|
|
19
|
+
/** The maximum time to wait for a response in seconds. */
|
|
20
|
+
timeoutInSeconds?: number;
|
|
21
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
22
|
+
maxRetries?: number;
|
|
23
|
+
/** A hook to abort the request. */
|
|
24
|
+
abortSignal?: AbortSignal;
|
|
25
|
+
/** Override the Cartesia-Version header */
|
|
26
|
+
cartesiaVersion?: "2024-06-10";
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
export declare class CartesiaClient {
|
|
30
|
+
protected readonly _options: CartesiaClient.Options;
|
|
31
|
+
constructor(_options?: CartesiaClient.Options);
|
|
32
|
+
protected _apiStatus: ApiStatus | undefined;
|
|
33
|
+
get apiStatus(): ApiStatus;
|
|
34
|
+
protected _tts: Tts | undefined;
|
|
35
|
+
get tts(): Tts;
|
|
36
|
+
protected _voiceChanger: VoiceChanger | undefined;
|
|
37
|
+
get voiceChanger(): VoiceChanger;
|
|
38
|
+
protected _voices: Voices | undefined;
|
|
39
|
+
get voices(): Voices;
|
|
40
|
+
}
|
package/Client.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.CartesiaClient = void 0;
|
|
7
|
+
const Client_1 = require("./api/resources/apiStatus/client/Client");
|
|
8
|
+
const Client_2 = require("./api/resources/tts/client/Client");
|
|
9
|
+
const Client_3 = require("./api/resources/voiceChanger/client/Client");
|
|
10
|
+
const Client_4 = require("./api/resources/voices/client/Client");
|
|
11
|
+
class CartesiaClient {
|
|
12
|
+
constructor(_options = {}) {
|
|
13
|
+
this._options = _options;
|
|
14
|
+
}
|
|
15
|
+
get apiStatus() {
|
|
16
|
+
var _a;
|
|
17
|
+
return ((_a = this._apiStatus) !== null && _a !== void 0 ? _a : (this._apiStatus = new Client_1.ApiStatus(this._options)));
|
|
18
|
+
}
|
|
19
|
+
get tts() {
|
|
20
|
+
var _a;
|
|
21
|
+
return ((_a = this._tts) !== null && _a !== void 0 ? _a : (this._tts = new Client_2.Tts(this._options)));
|
|
22
|
+
}
|
|
23
|
+
get voiceChanger() {
|
|
24
|
+
var _a;
|
|
25
|
+
return ((_a = this._voiceChanger) !== null && _a !== void 0 ? _a : (this._voiceChanger = new Client_3.VoiceChanger(this._options)));
|
|
26
|
+
}
|
|
27
|
+
get voices() {
|
|
28
|
+
var _a;
|
|
29
|
+
return ((_a = this._voices) !== null && _a !== void 0 ? _a : (this._voices = new Client_4.Voices(this._options)));
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.CartesiaClient = CartesiaClient;
|
package/README.md
CHANGED
|
@@ -1,131 +1,93 @@
|
|
|
1
|
-
# Cartesia
|
|
1
|
+
# Cartesia TypeScript Library
|
|
2
2
|
|
|
3
|
-
. Sonic is the fastest text-to-speech model around—it can generate a second of audio in just 650ms, and it can stream out the first audio chunk in just 135ms. Alongside Sonic, we also offer an extensive prebuilt voice library for a variety of use cases.
|
|
7
|
-
|
|
8
|
-
The JavaScript client is a thin wrapper around the Cartesia API. You can view docs for the API at [docs.cartesia.ai](https://docs.cartesia.ai/).
|
|
9
|
-
|
|
10
|
-
- [Cartesia JavaScript Client](#cartesia-javascript-client)
|
|
11
|
-
- [Installation](#installation)
|
|
12
|
-
- [Usage](#usage)
|
|
13
|
-
- [CRUD on Voices](#crud-on-voices)
|
|
14
|
-
- [TTS over WebSocket](#tts-over-websocket)
|
|
15
|
-
- [Input Streaming with Contexts](#input-streaming-with-contexts)
|
|
16
|
-
- [Timestamps](#timestamps)
|
|
17
|
-
- [Speed and emotion controls \[Alpha\]](#speed-and-emotion-controls-alpha)
|
|
18
|
-
- [Multilingual TTS \[Alpha\]](#multilingual-tts-alpha)
|
|
19
|
-
- [Playing audio in the browser](#playing-audio-in-the-browser)
|
|
20
|
-
- [React](#react)
|
|
3
|
+
[](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2Fcartesia-ai%2Fcartesia-js)
|
|
4
|
+
[](https://www.npmjs.com/package/@cartesia/cartesia-js)
|
|
21
5
|
|
|
6
|
+
The Cartesia TypeScript library provides convenient access to the Cartesia API from TypeScript.
|
|
22
7
|
|
|
23
8
|
## Installation
|
|
24
9
|
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
npm install @cartesia/cartesia-js
|
|
28
|
-
# Yarn
|
|
29
|
-
yarn add @cartesia/cartesia-js
|
|
30
|
-
# PNPM
|
|
31
|
-
pnpm add @cartesia/cartesia-js
|
|
32
|
-
# Bun
|
|
33
|
-
bun add @cartesia/cartesia-js
|
|
10
|
+
```sh
|
|
11
|
+
npm i -s @cartesia/cartesia-js
|
|
34
12
|
```
|
|
35
13
|
|
|
36
|
-
##
|
|
37
|
-
|
|
38
|
-
### CRUD on Voices
|
|
39
|
-
|
|
40
|
-
```js
|
|
41
|
-
import Cartesia from "@cartesia/cartesia-js";
|
|
42
|
-
|
|
43
|
-
const cartesia = new Cartesia({
|
|
44
|
-
apiKey: "your-api-key",
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
// List all voices.
|
|
48
|
-
const voices = await cartesia.voices.list();
|
|
49
|
-
console.log(voices);
|
|
14
|
+
## Reference
|
|
50
15
|
|
|
51
|
-
|
|
52
|
-
const voice = await cartesia.voices.get("<voice-id>");
|
|
53
|
-
console.log(voice);
|
|
16
|
+
A full reference for this library is available [here](./reference.md).
|
|
54
17
|
|
|
55
|
-
|
|
56
|
-
const clonedVoiceEmbedding = await cartesia.voices.clone({
|
|
57
|
-
mode: "clip",
|
|
58
|
-
clip: myFile, // Pass a File object or a Blob.
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
// Mix voices together.
|
|
62
|
-
const mixedVoiceEmbedding = await cartesia.voices.mix({
|
|
63
|
-
voices: [{ id: "<voice-id-1>", weight: 0.6 }, { id: "<voice-id-2>", weight: 0.4 }],
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
// Localize a voice.
|
|
67
|
-
const localizedVoiceEmbedding = await cartesia.voices.localize({
|
|
68
|
-
embedding: Array(192).fill(1.0),
|
|
69
|
-
original_speaker_gender: "female",
|
|
70
|
-
language: "es",
|
|
71
|
-
});
|
|
18
|
+
## Usage
|
|
72
19
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
20
|
+
### Instantiation
|
|
21
|
+
|
|
22
|
+
Instantiate and use the client with the following:
|
|
23
|
+
|
|
24
|
+
```typescript
|
|
25
|
+
import { CartesiaClient } from "@cartesia/cartesia-js";
|
|
26
|
+
|
|
27
|
+
const client = new CartesiaClient({ apiKey: "YOUR_API_KEY_HEADER" });
|
|
28
|
+
await client.tts.bytes({
|
|
29
|
+
modelId: "sonic-english",
|
|
30
|
+
transcript: "Hello, world!",
|
|
31
|
+
voice: {
|
|
32
|
+
mode: "id",
|
|
33
|
+
id: "694f9389-aac1-45b6-b726-9d9369183238",
|
|
34
|
+
},
|
|
35
|
+
language: "en",
|
|
36
|
+
outputFormat: {
|
|
37
|
+
container: "raw",
|
|
38
|
+
sampleRate: 44100,
|
|
39
|
+
encoding: "pcm_f32le",
|
|
40
|
+
},
|
|
78
41
|
});
|
|
79
|
-
console.log(newVoice);
|
|
80
42
|
```
|
|
81
43
|
|
|
82
44
|
### TTS over WebSocket
|
|
83
45
|
|
|
84
46
|
```js
|
|
85
|
-
import
|
|
47
|
+
import { CartesiaClient } from "@cartesia/cartesia-js";
|
|
86
48
|
|
|
87
|
-
const cartesia = new
|
|
88
|
-
|
|
49
|
+
const cartesia = new CartesiaClient({
|
|
50
|
+
apiKey: "your-api-key",
|
|
89
51
|
});
|
|
90
52
|
|
|
91
53
|
// Initialize the WebSocket. Make sure the output format you specify is supported.
|
|
92
54
|
const websocket = cartesia.tts.websocket({
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
55
|
+
container: "raw",
|
|
56
|
+
encoding: "pcm_f32le",
|
|
57
|
+
sampleRate: 44100,
|
|
96
58
|
});
|
|
97
59
|
|
|
98
60
|
try {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
61
|
+
await websocket.connect({
|
|
62
|
+
// If using Node.js, you can pass a custom WebSocket constructor, such as from `ws`.
|
|
63
|
+
// This is not needed for browser usage, so you can call connect() without any arguments.
|
|
64
|
+
WebSocket: WS,
|
|
65
|
+
});
|
|
104
66
|
} catch (error) {
|
|
105
|
-
|
|
67
|
+
console.error(`Failed to connect to Cartesia: ${error}`);
|
|
106
68
|
}
|
|
107
69
|
|
|
108
70
|
// Create a stream.
|
|
109
71
|
const response = await websocket.send({
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
72
|
+
modelId: "sonic-english",
|
|
73
|
+
voice: {
|
|
74
|
+
mode: "id",
|
|
75
|
+
id: "a0e99841-438c-4a64-b679-ae501e7d6091",
|
|
76
|
+
},
|
|
77
|
+
transcript: "Hello, world!",
|
|
78
|
+
// The WebSocket sets output_format on your behalf.
|
|
117
79
|
});
|
|
118
80
|
|
|
119
81
|
// Access the raw messages from the WebSocket.
|
|
120
82
|
response.on("message", (message) => {
|
|
121
|
-
|
|
122
|
-
|
|
83
|
+
// Raw message.
|
|
84
|
+
console.log("Received message:", message);
|
|
123
85
|
});
|
|
124
86
|
|
|
125
87
|
// You can also access messages using a for-await-of loop.
|
|
126
|
-
for await (const message of response.events(
|
|
127
|
-
|
|
128
|
-
|
|
88
|
+
for await (const message of response.events("message")) {
|
|
89
|
+
// Raw message.
|
|
90
|
+
console.log("Received message:", message);
|
|
129
91
|
}
|
|
130
92
|
```
|
|
131
93
|
|
|
@@ -133,147 +95,158 @@ for await (const message of response.events('message')) {
|
|
|
133
95
|
|
|
134
96
|
```js
|
|
135
97
|
const contextOptions = {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
}
|
|
98
|
+
contextId: "my-context",
|
|
99
|
+
modelId: "sonic-english",
|
|
100
|
+
voice: {
|
|
101
|
+
mode: "id",
|
|
102
|
+
id: "a0e99841-438c-4a64-b679-ae501e7d6091",
|
|
103
|
+
},
|
|
104
|
+
};
|
|
143
105
|
|
|
144
106
|
// Initial request on the context uses websocket.send().
|
|
145
107
|
// This response object will aggregate the results of all the inputs sent on the context.
|
|
146
108
|
const response = await websocket.send({
|
|
147
|
-
|
|
148
|
-
|
|
109
|
+
...contextOptions,
|
|
110
|
+
transcript: "Hello, world!",
|
|
149
111
|
});
|
|
150
112
|
|
|
151
113
|
// Subsequent requests on the same context use websocket.continue().
|
|
152
114
|
await websocket.continue({
|
|
153
|
-
|
|
154
|
-
|
|
115
|
+
...contextOptions,
|
|
116
|
+
transcript: " How are you today?",
|
|
155
117
|
});
|
|
156
118
|
```
|
|
157
119
|
|
|
158
120
|
See the [input streaming docs](https://docs.cartesia.ai/reference/web-socket/stream-speech/working-with-web-sockets#input-streaming-with-contexts) for more information.
|
|
159
121
|
|
|
160
|
-
|
|
122
|
+
### Playing audio in the browser
|
|
161
123
|
|
|
162
|
-
|
|
124
|
+
(The `WebPlayer` class only supports playing audio in the browser and the raw PCM format with fp32le encoding.)
|
|
163
125
|
|
|
164
126
|
```js
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
127
|
+
// If you're using the client in the browser, you can control audio playback using our WebPlayer:
|
|
128
|
+
import { WebPlayer } from "@cartesia/cartesia-js";
|
|
129
|
+
|
|
130
|
+
console.log("Playing stream...");
|
|
131
|
+
|
|
132
|
+
// Create a Player object.
|
|
133
|
+
const player = new WebPlayer();
|
|
134
|
+
|
|
135
|
+
// Play the audio. (`response` includes a custom Source object that the Player can play.)
|
|
136
|
+
// The call resolves when the audio finishes playing.
|
|
137
|
+
await player.play(response.source);
|
|
138
|
+
|
|
139
|
+
console.log("Done playing.");
|
|
174
140
|
```
|
|
175
141
|
|
|
176
|
-
|
|
142
|
+
## Request And Response Types
|
|
177
143
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
});
|
|
144
|
+
The SDK exports all request and response types as TypeScript interfaces. Simply import them with the
|
|
145
|
+
following namespace:
|
|
146
|
+
|
|
147
|
+
```typescript
|
|
148
|
+
import { Cartesia } from "@cartesia/cartesia-js";
|
|
184
149
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
150
|
+
const request: Cartesia.VoiceChangerBytesRequest = {
|
|
151
|
+
...
|
|
152
|
+
};
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## Exception Handling
|
|
156
|
+
|
|
157
|
+
When the API returns a non-success status code (4xx or 5xx response), a subclass of the following error
|
|
158
|
+
will be thrown.
|
|
159
|
+
|
|
160
|
+
```typescript
|
|
161
|
+
import { CartesiaError } from "@cartesia/cartesia-js";
|
|
162
|
+
|
|
163
|
+
try {
|
|
164
|
+
await client.tts.bytes(...);
|
|
165
|
+
} catch (err) {
|
|
166
|
+
if (err instanceof CartesiaError) {
|
|
167
|
+
console.log(err.statusCode);
|
|
168
|
+
console.log(err.message);
|
|
169
|
+
console.log(err.body);
|
|
170
|
+
}
|
|
190
171
|
}
|
|
191
172
|
```
|
|
192
173
|
|
|
193
|
-
|
|
174
|
+
## Advanced
|
|
194
175
|
|
|
195
|
-
|
|
176
|
+
### Retries
|
|
196
177
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
178
|
+
The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long
|
|
179
|
+
as the request is deemed retriable and the number of retry attempts has not grown larger than the configured
|
|
180
|
+
retry limit (default: 2).
|
|
181
|
+
|
|
182
|
+
A request is deemed retriable when any of the following HTTP status codes is returned:
|
|
183
|
+
|
|
184
|
+
- [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout)
|
|
185
|
+
- [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests)
|
|
186
|
+
- [5XX](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500) (Internal Server Errors)
|
|
187
|
+
|
|
188
|
+
Use the `maxRetries` request option to configure this behavior.
|
|
189
|
+
|
|
190
|
+
```typescript
|
|
191
|
+
const response = await client.tts.bytes(..., {
|
|
192
|
+
maxRetries: 0 // override maxRetries at the request level
|
|
209
193
|
});
|
|
210
194
|
```
|
|
211
195
|
|
|
212
|
-
###
|
|
196
|
+
### Timeouts
|
|
213
197
|
|
|
214
|
-
|
|
198
|
+
The SDK defaults to a 60 second timeout. Use the `timeoutInSeconds` option to configure this behavior.
|
|
215
199
|
|
|
216
|
-
|
|
200
|
+
```typescript
|
|
201
|
+
const response = await client.tts.bytes(..., {
|
|
202
|
+
timeoutInSeconds: 30 // override timeout to 30s
|
|
203
|
+
});
|
|
204
|
+
```
|
|
217
205
|
|
|
218
|
-
###
|
|
206
|
+
### Aborting Requests
|
|
219
207
|
|
|
220
|
-
|
|
208
|
+
The SDK allows users to abort requests at any point by passing in an abort signal.
|
|
221
209
|
|
|
222
|
-
```
|
|
223
|
-
|
|
224
|
-
|
|
210
|
+
```typescript
|
|
211
|
+
const controller = new AbortController();
|
|
212
|
+
const response = await client.tts.bytes(..., {
|
|
213
|
+
abortSignal: controller.signal
|
|
214
|
+
});
|
|
215
|
+
controller.abort(); // aborts the request
|
|
216
|
+
```
|
|
225
217
|
|
|
226
|
-
|
|
218
|
+
### Runtime Compatibility
|
|
227
219
|
|
|
228
|
-
|
|
229
|
-
|
|
220
|
+
The SDK defaults to `node-fetch` but will use the global fetch client if present. The SDK works in the following
|
|
221
|
+
runtimes:
|
|
230
222
|
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
223
|
+
- Node.js 18+
|
|
224
|
+
- Vercel
|
|
225
|
+
- Cloudflare Workers
|
|
226
|
+
- Deno v1.25+
|
|
227
|
+
- Bun 1.0+
|
|
228
|
+
- React Native
|
|
234
229
|
|
|
235
|
-
|
|
236
|
-
```
|
|
230
|
+
### Customizing Fetch Client
|
|
237
231
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
sampleRate: 44100,
|
|
249
|
-
})
|
|
250
|
-
|
|
251
|
-
const [text, setText] = useState("");
|
|
252
|
-
|
|
253
|
-
const handlePlay = async () => {
|
|
254
|
-
// Begin buffering the audio.
|
|
255
|
-
const response = await tts.buffer({
|
|
256
|
-
model_id: "sonic-english",
|
|
257
|
-
voice: {
|
|
258
|
-
mode: "id",
|
|
259
|
-
id: "a0e99841-438c-4a64-b679-ae501e7d6091",
|
|
260
|
-
},
|
|
261
|
-
transcript: text,
|
|
262
|
-
});
|
|
263
|
-
|
|
264
|
-
// Immediately play the audio. (You can also buffer in advance and play later.)
|
|
265
|
-
await tts.play();
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
return (
|
|
269
|
-
<div>
|
|
270
|
-
<input type="text" value={text} onChange={(event) => setText(event.target.value)} />
|
|
271
|
-
<button onClick={handlePlay}>Play</button>
|
|
272
|
-
|
|
273
|
-
<div>
|
|
274
|
-
{tts.playbackStatus} | {tts.bufferStatus} | {tts.isWaiting}
|
|
275
|
-
</div>
|
|
276
|
-
</div>
|
|
277
|
-
);
|
|
278
|
-
}
|
|
232
|
+
The SDK provides a way for your to customize the underlying HTTP client / Fetch function. If you're running in an
|
|
233
|
+
unsupported environment, this provides a way for you to break glass and ensure the SDK works.
|
|
234
|
+
|
|
235
|
+
```typescript
|
|
236
|
+
import { CartesiaClient } from "@cartesia/cartesia-js";
|
|
237
|
+
|
|
238
|
+
const client = new CartesiaClient({
|
|
239
|
+
...
|
|
240
|
+
fetcher: // provide your implementation here
|
|
241
|
+
});
|
|
279
242
|
```
|
|
243
|
+
|
|
244
|
+
## Contributing
|
|
245
|
+
|
|
246
|
+
While we value open-source contributions to this SDK, this library is generated programmatically.
|
|
247
|
+
Additions made directly to this library would have to be moved over to our generation code,
|
|
248
|
+
otherwise they would be overwritten upon the next generated release. Feel free to open a PR as
|
|
249
|
+
a proof of concept, but know that we will not be able to merge it as-is. We suggest opening
|
|
250
|
+
an issue first to discuss with us!
|
|
251
|
+
|
|
252
|
+
On the other hand, contributions to the README are always very welcome!
|
package/api/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./resources";
|
package/api/index.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./resources"), exports);
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as environments from "../../../../environments";
|
|
5
|
+
import * as core from "../../../../core";
|
|
6
|
+
import * as Cartesia from "../../../index";
|
|
7
|
+
export declare namespace ApiStatus {
|
|
8
|
+
interface Options {
|
|
9
|
+
environment?: core.Supplier<environments.CartesiaEnvironment | string>;
|
|
10
|
+
apiKey?: core.Supplier<string | undefined>;
|
|
11
|
+
/** Override the Cartesia-Version header */
|
|
12
|
+
cartesiaVersion?: "2024-06-10";
|
|
13
|
+
fetcher?: core.FetchFunction;
|
|
14
|
+
}
|
|
15
|
+
interface RequestOptions {
|
|
16
|
+
/** The maximum time to wait for a response in seconds. */
|
|
17
|
+
timeoutInSeconds?: number;
|
|
18
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
19
|
+
maxRetries?: number;
|
|
20
|
+
/** A hook to abort the request. */
|
|
21
|
+
abortSignal?: AbortSignal;
|
|
22
|
+
/** Override the Cartesia-Version header */
|
|
23
|
+
cartesiaVersion?: "2024-06-10";
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
export declare class ApiStatus {
|
|
27
|
+
protected readonly _options: ApiStatus.Options;
|
|
28
|
+
constructor(_options?: ApiStatus.Options);
|
|
29
|
+
/**
|
|
30
|
+
* @param {ApiStatus.RequestOptions} requestOptions - Request-specific configuration.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* await client.apiStatus.get()
|
|
34
|
+
*/
|
|
35
|
+
get(requestOptions?: ApiStatus.RequestOptions): Promise<Cartesia.ApiInfo>;
|
|
36
|
+
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
37
|
+
"X-API-Key": string | undefined;
|
|
38
|
+
}>;
|
|
39
|
+
}
|