@cartesia/cartesia-js 2.0.0 → 2.0.2
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.js +9 -13
- package/api/index.js +1 -17
- package/api/resources/apiStatus/client/Client.js +6 -33
- package/api/resources/apiStatus/client/index.js +1 -2
- package/api/resources/apiStatus/index.js +2 -18
- package/api/resources/apiStatus/types/ApiInfo.js +1 -2
- package/api/resources/apiStatus/types/index.js +1 -17
- package/api/resources/embedding/index.js +1 -17
- package/api/resources/embedding/types/Embedding.js +1 -2
- package/api/resources/embedding/types/index.js +1 -17
- package/api/resources/index.js +12 -41
- package/api/resources/tts/client/Client.js +10 -40
- package/api/resources/tts/client/index.js +1 -2
- package/api/resources/tts/index.js +2 -18
- package/api/resources/tts/types/CancelContextRequest.js +1 -2
- package/api/resources/tts/types/ContextId.js +1 -2
- package/api/resources/tts/types/Controls.js +1 -2
- package/api/resources/tts/types/Emotion.js +1 -4
- package/api/resources/tts/types/GenerationRequest.js +1 -2
- package/api/resources/tts/types/Mp3OutputFormat.js +1 -2
- package/api/resources/tts/types/NaturalSpecifier.js +1 -4
- package/api/resources/tts/types/NumericalSpecifier.js +1 -2
- package/api/resources/tts/types/OutputFormat.js +1 -2
- package/api/resources/tts/types/RawEncoding.js +1 -4
- package/api/resources/tts/types/RawOutputFormat.js +1 -2
- package/api/resources/tts/types/Speed.js +1 -2
- package/api/resources/tts/types/SupportedLanguage.js +1 -4
- package/api/resources/tts/types/TtsRequest.js +1 -2
- package/api/resources/tts/types/TtsRequestEmbeddingSpecifier.js +1 -2
- package/api/resources/tts/types/TtsRequestIdSpecifier.js +1 -2
- package/api/resources/tts/types/TtsRequestVoiceSpecifier.js +1 -2
- package/api/resources/tts/types/WavOutputFormat.js +1 -2
- package/api/resources/tts/types/WebSocketBaseResponse.js +1 -2
- package/api/resources/tts/types/WebSocketChunkResponse.js +1 -2
- package/api/resources/tts/types/WebSocketDoneResponse.js +1 -2
- package/api/resources/tts/types/WebSocketErrorResponse.js +1 -2
- package/api/resources/tts/types/WebSocketRawOutputFormat.js +1 -2
- package/api/resources/tts/types/WebSocketRequest.js +1 -2
- package/api/resources/tts/types/WebSocketResponse.js +1 -2
- package/api/resources/tts/types/WebSocketStreamOptions.js +1 -2
- package/api/resources/tts/types/WebSocketTimestampsResponse.js +1 -2
- package/api/resources/tts/types/WebSocketTtsOutput.js +1 -2
- package/api/resources/tts/types/WebSocketTtsRequest.js +1 -2
- package/api/resources/tts/types/WordTimestamps.js +1 -2
- package/api/resources/tts/types/index.js +30 -46
- package/api/resources/voiceChanger/client/Client.js +10 -40
- package/api/resources/voiceChanger/client/index.js +1 -17
- package/api/resources/voiceChanger/client/requests/VoiceChangerBytesRequest.js +1 -2
- package/api/resources/voiceChanger/client/requests/VoiceChangerSseRequest.js +1 -2
- package/api/resources/voiceChanger/client/requests/index.js +1 -2
- package/api/resources/voiceChanger/index.js +2 -18
- package/api/resources/voiceChanger/types/OutputFormatContainer.js +1 -4
- package/api/resources/voiceChanger/types/StreamingResponse.js +1 -2
- package/api/resources/voiceChanger/types/index.js +2 -18
- package/api/resources/voices/client/Client.js +22 -52
- package/api/resources/voices/client/index.js +1 -17
- package/api/resources/voices/client/requests/CloneVoiceRequest.js +1 -2
- package/api/resources/voices/client/requests/index.js +1 -2
- package/api/resources/voices/index.js +2 -18
- package/api/resources/voices/types/BaseVoiceId.js +1 -2
- package/api/resources/voices/types/CloneMode.js +1 -4
- package/api/resources/voices/types/CreateVoiceRequest.js +1 -2
- package/api/resources/voices/types/EmbeddingResponse.js +1 -2
- package/api/resources/voices/types/EmbeddingSpecifier.js +1 -2
- package/api/resources/voices/types/Gender.js +1 -4
- package/api/resources/voices/types/IdSpecifier.js +1 -2
- package/api/resources/voices/types/LocalizeDialect.js +1 -4
- package/api/resources/voices/types/LocalizeTargetLanguage.js +1 -4
- package/api/resources/voices/types/LocalizeVoiceRequest.js +1 -2
- package/api/resources/voices/types/MixVoiceSpecifier.js +1 -2
- package/api/resources/voices/types/MixVoicesRequest.js +1 -2
- package/api/resources/voices/types/UpdateVoiceRequest.js +1 -2
- package/api/resources/voices/types/Voice.js +1 -2
- package/api/resources/voices/types/VoiceId.js +1 -2
- package/api/resources/voices/types/VoiceMetadata.js +1 -2
- package/api/resources/voices/types/Weight.js +1 -2
- package/api/resources/voices/types/index.js +17 -33
- package/core/fetcher/APIResponse.js +1 -2
- package/core/fetcher/Fetcher.js +14 -18
- package/core/fetcher/Supplier.js +1 -4
- package/core/fetcher/createRequestUrl.js +3 -10
- package/core/fetcher/getFetchFn.js +6 -33
- package/core/fetcher/getHeader.js +1 -5
- package/core/fetcher/getRequestBody.js +1 -5
- package/core/fetcher/getResponseBody.js +3 -7
- package/core/fetcher/index.js +3 -9
- package/core/fetcher/makeRequest.js +4 -8
- package/core/fetcher/requestWithRetries.js +1 -5
- package/core/fetcher/signals.js +2 -7
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +1 -5
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +1 -5
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +1 -5
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +7 -34
- package/core/form-data-utils/FormDataWrapper.js +11 -41
- package/core/form-data-utils/index.js +1 -17
- package/core/index.js +5 -34
- package/core/runtime/index.js +1 -5
- package/core/runtime/runtime.js +1 -4
- package/core/schemas/Schema.js +1 -4
- package/core/schemas/builders/bigint/bigint.js +9 -13
- package/core/schemas/builders/bigint/index.js +1 -5
- package/core/schemas/builders/date/date.js +10 -14
- package/core/schemas/builders/date/index.js +1 -5
- package/core/schemas/builders/enum/enum.js +7 -11
- package/core/schemas/builders/enum/index.js +1 -5
- package/core/schemas/builders/index.js +14 -30
- package/core/schemas/builders/lazy/index.js +2 -7
- package/core/schemas/builders/lazy/lazy.js +5 -11
- package/core/schemas/builders/lazy/lazyObject.js +7 -11
- package/core/schemas/builders/list/index.js +1 -5
- package/core/schemas/builders/list/list.js +8 -12
- package/core/schemas/builders/literals/booleanLiteral.js +6 -10
- package/core/schemas/builders/literals/index.js +2 -7
- package/core/schemas/builders/literals/stringLiteral.js +6 -10
- package/core/schemas/builders/object/index.js +3 -11
- package/core/schemas/builders/object/object.js +33 -38
- package/core/schemas/builders/object/objectWithoutOptionalProperties.js +3 -7
- package/core/schemas/builders/object/property.js +2 -7
- package/core/schemas/builders/object/types.js +1 -2
- package/core/schemas/builders/object-like/getObjectLikeUtils.js +10 -15
- package/core/schemas/builders/object-like/index.js +1 -6
- package/core/schemas/builders/object-like/types.js +1 -2
- package/core/schemas/builders/primitives/any.js +3 -6
- package/core/schemas/builders/primitives/boolean.js +5 -8
- package/core/schemas/builders/primitives/index.js +5 -13
- package/core/schemas/builders/primitives/number.js +5 -8
- package/core/schemas/builders/primitives/string.js +5 -8
- package/core/schemas/builders/primitives/unknown.js +3 -6
- package/core/schemas/builders/record/index.js +1 -5
- package/core/schemas/builders/record/record.js +14 -18
- package/core/schemas/builders/record/types.js +1 -2
- package/core/schemas/builders/schema-utils/JsonError.js +3 -7
- package/core/schemas/builders/schema-utils/ParseError.js +3 -7
- package/core/schemas/builders/schema-utils/getSchemaUtils.js +9 -15
- package/core/schemas/builders/schema-utils/index.js +3 -11
- package/core/schemas/builders/schema-utils/stringifyValidationErrors.js +1 -5
- package/core/schemas/builders/set/index.js +1 -5
- package/core/schemas/builders/set/set.js +10 -14
- package/core/schemas/builders/undiscriminated-union/index.js +1 -5
- package/core/schemas/builders/undiscriminated-union/types.js +1 -2
- package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +6 -10
- package/core/schemas/builders/union/discriminant.js +1 -5
- package/core/schemas/builders/union/index.js +2 -7
- package/core/schemas/builders/union/types.js +1 -2
- package/core/schemas/builders/union/union.js +14 -18
- package/core/schemas/index.js +1 -17
- package/core/schemas/utils/MaybePromise.js +1 -2
- package/core/schemas/utils/addQuestionMarksToNullableProperties.js +1 -2
- package/core/schemas/utils/createIdentitySchemaCreator.js +4 -8
- package/core/schemas/utils/entries.js +1 -5
- package/core/schemas/utils/filterObject.js +1 -5
- package/core/schemas/utils/getErrorMessageForIncorrectType.js +1 -5
- package/core/schemas/utils/isPlainObject.js +1 -5
- package/core/schemas/utils/keys.js +1 -5
- package/core/schemas/utils/maybeSkipValidation.js +1 -5
- package/core/schemas/utils/partition.js +1 -5
- package/core/streaming-fetcher/Stream.js +4 -9
- package/core/streaming-fetcher/index.js +1 -5
- package/core/websocket/events.js +3 -9
- package/core/websocket/index.js +1 -17
- package/core/websocket/ws.js +6 -33
- package/dist/Client.js +9 -13
- package/dist/api/index.js +1 -17
- package/dist/api/resources/apiStatus/client/Client.js +6 -33
- package/dist/api/resources/apiStatus/client/index.js +1 -2
- package/dist/api/resources/apiStatus/index.js +2 -18
- package/dist/api/resources/apiStatus/types/ApiInfo.js +1 -2
- package/dist/api/resources/apiStatus/types/index.js +1 -17
- package/dist/api/resources/embedding/index.js +1 -17
- package/dist/api/resources/embedding/types/Embedding.js +1 -2
- package/dist/api/resources/embedding/types/index.js +1 -17
- package/dist/api/resources/index.js +12 -41
- package/dist/api/resources/tts/client/Client.js +10 -40
- package/dist/api/resources/tts/client/index.js +1 -2
- package/dist/api/resources/tts/index.js +2 -18
- package/dist/api/resources/tts/types/CancelContextRequest.js +1 -2
- package/dist/api/resources/tts/types/ContextId.js +1 -2
- package/dist/api/resources/tts/types/Controls.js +1 -2
- package/dist/api/resources/tts/types/Emotion.js +1 -4
- package/dist/api/resources/tts/types/GenerationRequest.js +1 -2
- package/dist/api/resources/tts/types/Mp3OutputFormat.js +1 -2
- package/dist/api/resources/tts/types/NaturalSpecifier.js +1 -4
- package/dist/api/resources/tts/types/NumericalSpecifier.js +1 -2
- package/dist/api/resources/tts/types/OutputFormat.js +1 -2
- package/dist/api/resources/tts/types/RawEncoding.js +1 -4
- package/dist/api/resources/tts/types/RawOutputFormat.js +1 -2
- package/dist/api/resources/tts/types/Speed.js +1 -2
- package/dist/api/resources/tts/types/SupportedLanguage.js +1 -4
- package/dist/api/resources/tts/types/TtsRequest.js +1 -2
- package/dist/api/resources/tts/types/TtsRequestEmbeddingSpecifier.js +1 -2
- package/dist/api/resources/tts/types/TtsRequestIdSpecifier.js +1 -2
- package/dist/api/resources/tts/types/TtsRequestVoiceSpecifier.js +1 -2
- package/dist/api/resources/tts/types/WavOutputFormat.js +1 -2
- package/dist/api/resources/tts/types/WebSocketBaseResponse.js +1 -2
- package/dist/api/resources/tts/types/WebSocketChunkResponse.js +1 -2
- package/dist/api/resources/tts/types/WebSocketDoneResponse.js +1 -2
- package/dist/api/resources/tts/types/WebSocketErrorResponse.js +1 -2
- package/dist/api/resources/tts/types/WebSocketRawOutputFormat.js +1 -2
- package/dist/api/resources/tts/types/WebSocketRequest.js +1 -2
- package/dist/api/resources/tts/types/WebSocketResponse.js +1 -2
- package/dist/api/resources/tts/types/WebSocketStreamOptions.js +1 -2
- package/dist/api/resources/tts/types/WebSocketTimestampsResponse.js +1 -2
- package/dist/api/resources/tts/types/WebSocketTtsOutput.js +1 -2
- package/dist/api/resources/tts/types/WebSocketTtsRequest.js +1 -2
- package/dist/api/resources/tts/types/WordTimestamps.js +1 -2
- package/dist/api/resources/tts/types/index.js +30 -46
- package/dist/api/resources/voiceChanger/client/Client.js +10 -40
- package/dist/api/resources/voiceChanger/client/index.js +1 -17
- package/dist/api/resources/voiceChanger/client/requests/VoiceChangerBytesRequest.js +1 -2
- package/dist/api/resources/voiceChanger/client/requests/VoiceChangerSseRequest.js +1 -2
- package/dist/api/resources/voiceChanger/client/requests/index.js +1 -2
- package/dist/api/resources/voiceChanger/index.js +2 -18
- package/dist/api/resources/voiceChanger/types/OutputFormatContainer.js +1 -4
- package/dist/api/resources/voiceChanger/types/StreamingResponse.js +1 -2
- package/dist/api/resources/voiceChanger/types/index.js +2 -18
- package/dist/api/resources/voices/client/Client.js +22 -52
- package/dist/api/resources/voices/client/index.js +1 -17
- package/dist/api/resources/voices/client/requests/CloneVoiceRequest.js +1 -2
- package/dist/api/resources/voices/client/requests/index.js +1 -2
- package/dist/api/resources/voices/index.js +2 -18
- package/dist/api/resources/voices/types/BaseVoiceId.js +1 -2
- package/dist/api/resources/voices/types/CloneMode.js +1 -4
- package/dist/api/resources/voices/types/CreateVoiceRequest.js +1 -2
- package/dist/api/resources/voices/types/EmbeddingResponse.js +1 -2
- package/dist/api/resources/voices/types/EmbeddingSpecifier.js +1 -2
- package/dist/api/resources/voices/types/Gender.js +1 -4
- package/dist/api/resources/voices/types/IdSpecifier.js +1 -2
- package/dist/api/resources/voices/types/LocalizeDialect.js +1 -4
- package/dist/api/resources/voices/types/LocalizeTargetLanguage.js +1 -4
- package/dist/api/resources/voices/types/LocalizeVoiceRequest.js +1 -2
- package/dist/api/resources/voices/types/MixVoiceSpecifier.js +1 -2
- package/dist/api/resources/voices/types/MixVoicesRequest.js +1 -2
- package/dist/api/resources/voices/types/UpdateVoiceRequest.js +1 -2
- package/dist/api/resources/voices/types/Voice.js +1 -2
- package/dist/api/resources/voices/types/VoiceId.js +1 -2
- package/dist/api/resources/voices/types/VoiceMetadata.js +1 -2
- package/dist/api/resources/voices/types/Weight.js +1 -2
- package/dist/api/resources/voices/types/index.js +17 -33
- package/dist/core/fetcher/APIResponse.js +1 -2
- package/dist/core/fetcher/Fetcher.js +14 -18
- package/dist/core/fetcher/Supplier.js +1 -4
- package/dist/core/fetcher/createRequestUrl.js +3 -10
- package/dist/core/fetcher/getFetchFn.js +6 -33
- package/dist/core/fetcher/getHeader.js +1 -5
- package/dist/core/fetcher/getRequestBody.js +1 -5
- package/dist/core/fetcher/getResponseBody.js +3 -7
- package/dist/core/fetcher/index.js +3 -9
- package/dist/core/fetcher/makeRequest.js +4 -8
- package/dist/core/fetcher/requestWithRetries.js +1 -5
- package/dist/core/fetcher/signals.js +2 -7
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +1 -5
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +1 -5
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +1 -5
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +7 -34
- package/dist/core/form-data-utils/FormDataWrapper.js +11 -41
- package/dist/core/form-data-utils/index.js +1 -17
- package/dist/core/index.js +5 -34
- package/dist/core/runtime/index.js +1 -5
- package/dist/core/runtime/runtime.js +1 -4
- package/dist/core/schemas/Schema.js +1 -4
- package/dist/core/schemas/builders/bigint/bigint.js +9 -13
- package/dist/core/schemas/builders/bigint/index.js +1 -5
- package/dist/core/schemas/builders/date/date.js +10 -14
- package/dist/core/schemas/builders/date/index.js +1 -5
- package/dist/core/schemas/builders/enum/enum.js +7 -11
- package/dist/core/schemas/builders/enum/index.js +1 -5
- package/dist/core/schemas/builders/index.js +14 -30
- package/dist/core/schemas/builders/lazy/index.js +2 -7
- package/dist/core/schemas/builders/lazy/lazy.js +5 -11
- package/dist/core/schemas/builders/lazy/lazyObject.js +7 -11
- package/dist/core/schemas/builders/list/index.js +1 -5
- package/dist/core/schemas/builders/list/list.js +8 -12
- package/dist/core/schemas/builders/literals/booleanLiteral.js +6 -10
- package/dist/core/schemas/builders/literals/index.js +2 -7
- package/dist/core/schemas/builders/literals/stringLiteral.js +6 -10
- package/dist/core/schemas/builders/object/index.js +3 -11
- package/dist/core/schemas/builders/object/object.js +33 -38
- package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.js +3 -7
- package/dist/core/schemas/builders/object/property.js +2 -7
- package/dist/core/schemas/builders/object/types.js +1 -2
- package/dist/core/schemas/builders/object-like/getObjectLikeUtils.js +10 -15
- package/dist/core/schemas/builders/object-like/index.js +1 -6
- package/dist/core/schemas/builders/object-like/types.js +1 -2
- package/dist/core/schemas/builders/primitives/any.js +3 -6
- package/dist/core/schemas/builders/primitives/boolean.js +5 -8
- package/dist/core/schemas/builders/primitives/index.js +5 -13
- package/dist/core/schemas/builders/primitives/number.js +5 -8
- package/dist/core/schemas/builders/primitives/string.js +5 -8
- package/dist/core/schemas/builders/primitives/unknown.js +3 -6
- package/dist/core/schemas/builders/record/index.js +1 -5
- package/dist/core/schemas/builders/record/record.js +14 -18
- package/dist/core/schemas/builders/record/types.js +1 -2
- package/dist/core/schemas/builders/schema-utils/JsonError.js +3 -7
- package/dist/core/schemas/builders/schema-utils/ParseError.js +3 -7
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +9 -15
- package/dist/core/schemas/builders/schema-utils/index.js +3 -11
- package/dist/core/schemas/builders/schema-utils/stringifyValidationErrors.js +1 -5
- package/dist/core/schemas/builders/set/index.js +1 -5
- package/dist/core/schemas/builders/set/set.js +10 -14
- package/dist/core/schemas/builders/undiscriminated-union/index.js +1 -5
- package/dist/core/schemas/builders/undiscriminated-union/types.js +1 -2
- package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +6 -10
- package/dist/core/schemas/builders/union/discriminant.js +1 -5
- package/dist/core/schemas/builders/union/index.js +2 -7
- package/dist/core/schemas/builders/union/types.js +1 -2
- package/dist/core/schemas/builders/union/union.js +14 -18
- package/dist/core/schemas/index.js +1 -17
- package/dist/core/schemas/utils/MaybePromise.js +1 -2
- package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.js +1 -2
- package/dist/core/schemas/utils/createIdentitySchemaCreator.js +4 -8
- package/dist/core/schemas/utils/entries.js +1 -5
- package/dist/core/schemas/utils/filterObject.js +1 -5
- package/dist/core/schemas/utils/getErrorMessageForIncorrectType.js +1 -5
- package/dist/core/schemas/utils/isPlainObject.js +1 -5
- package/dist/core/schemas/utils/keys.js +1 -5
- package/dist/core/schemas/utils/maybeSkipValidation.js +1 -5
- package/dist/core/schemas/utils/partition.js +1 -5
- package/dist/core/streaming-fetcher/Stream.js +4 -9
- package/dist/core/streaming-fetcher/index.js +1 -5
- package/dist/core/websocket/events.js +3 -9
- package/dist/core/websocket/index.js +1 -17
- package/dist/core/websocket/ws.js +6 -33
- package/dist/environments.js +1 -4
- package/dist/errors/CartesiaError.js +1 -5
- package/dist/errors/CartesiaTimeoutError.js +1 -5
- package/dist/errors/index.js +2 -7
- package/dist/index.js +4 -34
- package/dist/serialization/index.js +1 -17
- package/dist/serialization/resources/apiStatus/index.js +1 -17
- package/dist/serialization/resources/apiStatus/types/ApiInfo.js +2 -28
- package/dist/serialization/resources/apiStatus/types/index.js +1 -17
- package/dist/serialization/resources/embedding/index.js +1 -17
- package/dist/serialization/resources/embedding/types/Embedding.js +2 -28
- package/dist/serialization/resources/embedding/types/index.js +1 -17
- package/dist/serialization/resources/index.js +10 -39
- package/dist/serialization/resources/tts/index.js +1 -17
- package/dist/serialization/resources/tts/types/CancelContextRequest.js +4 -30
- package/dist/serialization/resources/tts/types/ContextId.js +2 -28
- package/dist/serialization/resources/tts/types/Controls.js +6 -32
- package/dist/serialization/resources/tts/types/Emotion.js +2 -28
- package/dist/serialization/resources/tts/types/GenerationRequest.js +10 -36
- package/dist/serialization/resources/tts/types/Mp3OutputFormat.js +2 -28
- package/dist/serialization/resources/tts/types/NaturalSpecifier.js +2 -28
- package/dist/serialization/resources/tts/types/NumericalSpecifier.js +2 -28
- package/dist/serialization/resources/tts/types/OutputFormat.js +8 -34
- package/dist/serialization/resources/tts/types/RawEncoding.js +2 -28
- package/dist/serialization/resources/tts/types/RawOutputFormat.js +4 -30
- package/dist/serialization/resources/tts/types/Speed.js +4 -30
- package/dist/serialization/resources/tts/types/SupportedLanguage.js +2 -28
- package/dist/serialization/resources/tts/types/TtsRequest.js +8 -34
- package/dist/serialization/resources/tts/types/TtsRequestEmbeddingSpecifier.js +6 -32
- package/dist/serialization/resources/tts/types/TtsRequestIdSpecifier.js +6 -32
- package/dist/serialization/resources/tts/types/TtsRequestVoiceSpecifier.js +4 -30
- package/dist/serialization/resources/tts/types/WavOutputFormat.js +3 -29
- package/dist/serialization/resources/tts/types/WebSocketBaseResponse.js +4 -30
- package/dist/serialization/resources/tts/types/WebSocketChunkResponse.js +4 -30
- package/dist/serialization/resources/tts/types/WebSocketDoneResponse.js +3 -29
- package/dist/serialization/resources/tts/types/WebSocketErrorResponse.js +4 -30
- package/dist/serialization/resources/tts/types/WebSocketRawOutputFormat.js +4 -30
- package/dist/serialization/resources/tts/types/WebSocketRequest.js +4 -30
- package/dist/serialization/resources/tts/types/WebSocketResponse.js +10 -36
- package/dist/serialization/resources/tts/types/WebSocketStreamOptions.js +2 -28
- package/dist/serialization/resources/tts/types/WebSocketTimestampsResponse.js +6 -32
- package/dist/serialization/resources/tts/types/WebSocketTtsOutput.js +6 -32
- package/dist/serialization/resources/tts/types/WebSocketTtsRequest.js +6 -32
- package/dist/serialization/resources/tts/types/WordTimestamps.js +2 -28
- package/dist/serialization/resources/tts/types/index.js +30 -46
- package/dist/serialization/resources/voiceChanger/index.js +1 -17
- package/dist/serialization/resources/voiceChanger/types/OutputFormatContainer.js +2 -28
- package/dist/serialization/resources/voiceChanger/types/StreamingResponse.js +8 -34
- package/dist/serialization/resources/voiceChanger/types/index.js +2 -18
- package/dist/serialization/resources/voices/client/index.js +1 -27
- package/dist/serialization/resources/voices/client/list.js +3 -29
- package/dist/serialization/resources/voices/index.js +2 -18
- package/dist/serialization/resources/voices/types/BaseVoiceId.js +2 -5
- package/dist/serialization/resources/voices/types/CloneMode.js +2 -28
- package/dist/serialization/resources/voices/types/CreateVoiceRequest.js +8 -34
- package/dist/serialization/resources/voices/types/EmbeddingResponse.js +4 -30
- package/dist/serialization/resources/voices/types/EmbeddingSpecifier.js +6 -32
- package/dist/serialization/resources/voices/types/Gender.js +2 -28
- package/dist/serialization/resources/voices/types/IdSpecifier.js +6 -32
- package/dist/serialization/resources/voices/types/LocalizeDialect.js +2 -28
- package/dist/serialization/resources/voices/types/LocalizeTargetLanguage.js +2 -28
- package/dist/serialization/resources/voices/types/LocalizeVoiceRequest.js +10 -36
- package/dist/serialization/resources/voices/types/MixVoiceSpecifier.js +4 -30
- package/dist/serialization/resources/voices/types/MixVoicesRequest.js +4 -30
- package/dist/serialization/resources/voices/types/UpdateVoiceRequest.js +2 -28
- package/dist/serialization/resources/voices/types/Voice.js +10 -36
- package/dist/serialization/resources/voices/types/VoiceId.js +2 -28
- package/dist/serialization/resources/voices/types/VoiceMetadata.js +6 -32
- package/dist/serialization/resources/voices/types/Weight.js +2 -28
- package/dist/serialization/resources/voices/types/index.js +17 -33
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -4
- package/dist/wrapper/Client.js +4 -8
- package/dist/wrapper/StreamingTTSClient.js +4 -11
- package/dist/wrapper/WebPlayer.js +3 -7
- package/dist/wrapper/Websocket.js +23 -52
- package/dist/wrapper/source.js +5 -11
- package/dist/wrapper/utils.js +13 -28
- package/environments.js +1 -4
- package/errors/CartesiaError.js +1 -5
- package/errors/CartesiaTimeoutError.js +1 -5
- package/errors/index.js +2 -7
- package/index.js +4 -34
- package/package.json +3 -2
- package/serialization/index.js +1 -17
- package/serialization/resources/apiStatus/index.js +1 -17
- package/serialization/resources/apiStatus/types/ApiInfo.js +2 -28
- package/serialization/resources/apiStatus/types/index.js +1 -17
- package/serialization/resources/embedding/index.js +1 -17
- package/serialization/resources/embedding/types/Embedding.js +2 -28
- package/serialization/resources/embedding/types/index.js +1 -17
- package/serialization/resources/index.js +10 -39
- package/serialization/resources/tts/index.js +1 -17
- package/serialization/resources/tts/types/CancelContextRequest.js +4 -30
- package/serialization/resources/tts/types/ContextId.js +2 -28
- package/serialization/resources/tts/types/Controls.js +6 -32
- package/serialization/resources/tts/types/Emotion.js +2 -28
- package/serialization/resources/tts/types/GenerationRequest.js +10 -36
- package/serialization/resources/tts/types/Mp3OutputFormat.js +2 -28
- package/serialization/resources/tts/types/NaturalSpecifier.js +2 -28
- package/serialization/resources/tts/types/NumericalSpecifier.js +2 -28
- package/serialization/resources/tts/types/OutputFormat.js +8 -34
- package/serialization/resources/tts/types/RawEncoding.js +2 -28
- package/serialization/resources/tts/types/RawOutputFormat.js +4 -30
- package/serialization/resources/tts/types/Speed.js +4 -30
- package/serialization/resources/tts/types/SupportedLanguage.js +2 -28
- package/serialization/resources/tts/types/TtsRequest.js +8 -34
- package/serialization/resources/tts/types/TtsRequestEmbeddingSpecifier.js +6 -32
- package/serialization/resources/tts/types/TtsRequestIdSpecifier.js +6 -32
- package/serialization/resources/tts/types/TtsRequestVoiceSpecifier.js +4 -30
- package/serialization/resources/tts/types/WavOutputFormat.js +3 -29
- package/serialization/resources/tts/types/WebSocketBaseResponse.js +4 -30
- package/serialization/resources/tts/types/WebSocketChunkResponse.js +4 -30
- package/serialization/resources/tts/types/WebSocketDoneResponse.js +3 -29
- package/serialization/resources/tts/types/WebSocketErrorResponse.js +4 -30
- package/serialization/resources/tts/types/WebSocketRawOutputFormat.js +4 -30
- package/serialization/resources/tts/types/WebSocketRequest.js +4 -30
- package/serialization/resources/tts/types/WebSocketResponse.js +10 -36
- package/serialization/resources/tts/types/WebSocketStreamOptions.js +2 -28
- package/serialization/resources/tts/types/WebSocketTimestampsResponse.js +6 -32
- package/serialization/resources/tts/types/WebSocketTtsOutput.js +6 -32
- package/serialization/resources/tts/types/WebSocketTtsRequest.js +6 -32
- package/serialization/resources/tts/types/WordTimestamps.js +2 -28
- package/serialization/resources/tts/types/index.js +30 -46
- package/serialization/resources/voiceChanger/index.js +1 -17
- package/serialization/resources/voiceChanger/types/OutputFormatContainer.js +2 -28
- package/serialization/resources/voiceChanger/types/StreamingResponse.js +8 -34
- package/serialization/resources/voiceChanger/types/index.js +2 -18
- package/serialization/resources/voices/client/index.js +1 -27
- package/serialization/resources/voices/client/list.js +3 -29
- package/serialization/resources/voices/index.js +2 -18
- package/serialization/resources/voices/types/BaseVoiceId.js +2 -5
- package/serialization/resources/voices/types/CloneMode.js +2 -28
- package/serialization/resources/voices/types/CreateVoiceRequest.js +8 -34
- package/serialization/resources/voices/types/EmbeddingResponse.js +4 -30
- package/serialization/resources/voices/types/EmbeddingSpecifier.js +6 -32
- package/serialization/resources/voices/types/Gender.js +2 -28
- package/serialization/resources/voices/types/IdSpecifier.js +6 -32
- package/serialization/resources/voices/types/LocalizeDialect.js +2 -28
- package/serialization/resources/voices/types/LocalizeTargetLanguage.js +2 -28
- package/serialization/resources/voices/types/LocalizeVoiceRequest.js +10 -36
- package/serialization/resources/voices/types/MixVoiceSpecifier.js +4 -30
- package/serialization/resources/voices/types/MixVoicesRequest.js +4 -30
- package/serialization/resources/voices/types/UpdateVoiceRequest.js +2 -28
- package/serialization/resources/voices/types/Voice.js +10 -36
- package/serialization/resources/voices/types/VoiceId.js +2 -28
- package/serialization/resources/voices/types/VoiceMetadata.js +6 -32
- package/serialization/resources/voices/types/Weight.js +2 -28
- package/serialization/resources/voices/types/index.js +17 -33
- package/version.d.ts +1 -1
- package/version.js +1 -4
- package/wrapper/Client.js +4 -8
- package/wrapper/StreamingTTSClient.js +4 -11
- package/wrapper/WebPlayer.js +3 -7
- package/wrapper/Websocket.js +23 -52
- package/wrapper/source.js +5 -11
- package/wrapper/utils.js +13 -28
|
@@ -1,30 +1,6 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/**
|
|
3
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
4
3
|
*/
|
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
-
if (mod && mod.__esModule) return mod;
|
|
23
|
-
var result = {};
|
|
24
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
-
__setModuleDefault(result, mod);
|
|
26
|
-
return result;
|
|
27
|
-
};
|
|
28
4
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
29
5
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
30
6
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -34,17 +10,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
34
10
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
35
11
|
});
|
|
36
12
|
};
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
const core = __importStar(require("../../../../core"));
|
|
44
|
-
const url_join_1 = __importDefault(require("url-join"));
|
|
45
|
-
const errors = __importStar(require("../../../../errors/index"));
|
|
46
|
-
const serializers = __importStar(require("../../../../serialization/index"));
|
|
47
|
-
class VoiceChanger {
|
|
13
|
+
import * as environments from "../../../../environments";
|
|
14
|
+
import * as core from "../../../../core";
|
|
15
|
+
import urlJoin from "url-join";
|
|
16
|
+
import * as errors from "../../../../errors/index";
|
|
17
|
+
import * as serializers from "../../../../serialization/index";
|
|
18
|
+
export class VoiceChanger {
|
|
48
19
|
constructor(_options = {}) {
|
|
49
20
|
this._options = _options;
|
|
50
21
|
}
|
|
@@ -69,9 +40,9 @@ class VoiceChanger {
|
|
|
69
40
|
}
|
|
70
41
|
const _maybeEncodedRequest = yield _request.getRequest();
|
|
71
42
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
72
|
-
url: (
|
|
43
|
+
url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CartesiaEnvironment.Production, "/voice-changer/bytes"),
|
|
73
44
|
method: "POST",
|
|
74
|
-
headers: Object.assign(Object.assign({ "Cartesia-Version": (_e = (_c = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _c !== void 0 ? _c : (_d = this._options) === null || _d === void 0 ? void 0 : _d.cartesiaVersion) !== null && _e !== void 0 ? _e : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.0.
|
|
45
|
+
headers: Object.assign(Object.assign({ "Cartesia-Version": (_e = (_c = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _c !== void 0 ? _c : (_d = this._options) === null || _d === void 0 ? void 0 : _d.cartesiaVersion) !== null && _e !== void 0 ? _e : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.0.2", "User-Agent": "@cartesia/cartesia-js/2.0.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), _maybeEncodedRequest.headers),
|
|
75
46
|
requestType: "file",
|
|
76
47
|
duplex: _maybeEncodedRequest.duplex,
|
|
77
48
|
body: _maybeEncodedRequest.body,
|
|
@@ -120,9 +91,9 @@ class VoiceChanger {
|
|
|
120
91
|
}
|
|
121
92
|
const _maybeEncodedRequest = yield _request.getRequest();
|
|
122
93
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
123
|
-
url: (
|
|
94
|
+
url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CartesiaEnvironment.Production, "/voice-changer/sse"),
|
|
124
95
|
method: "POST",
|
|
125
|
-
headers: Object.assign(Object.assign({ "Cartesia-Version": (_e = (_c = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _c !== void 0 ? _c : (_d = this._options) === null || _d === void 0 ? void 0 : _d.cartesiaVersion) !== null && _e !== void 0 ? _e : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.0.
|
|
96
|
+
headers: Object.assign(Object.assign({ "Cartesia-Version": (_e = (_c = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _c !== void 0 ? _c : (_d = this._options) === null || _d === void 0 ? void 0 : _d.cartesiaVersion) !== null && _e !== void 0 ? _e : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.0.2", "User-Agent": "@cartesia/cartesia-js/2.0.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), _maybeEncodedRequest.headers),
|
|
126
97
|
requestType: "file",
|
|
127
98
|
duplex: _maybeEncodedRequest.duplex,
|
|
128
99
|
body: _maybeEncodedRequest.body,
|
|
@@ -178,4 +149,3 @@ class VoiceChanger {
|
|
|
178
149
|
});
|
|
179
150
|
}
|
|
180
151
|
}
|
|
181
|
-
exports.VoiceChanger = VoiceChanger;
|
|
@@ -1,17 +1 @@
|
|
|
1
|
-
|
|
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("./requests"), exports);
|
|
1
|
+
export * from "./requests";
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,18 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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("./types"), exports);
|
|
18
|
-
__exportStar(require("./client"), exports);
|
|
1
|
+
export * from "./types";
|
|
2
|
+
export * from "./client";
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/**
|
|
3
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
4
3
|
*/
|
|
5
|
-
|
|
6
|
-
exports.OutputFormatContainer = void 0;
|
|
7
|
-
exports.OutputFormatContainer = {
|
|
4
|
+
export const OutputFormatContainer = {
|
|
8
5
|
Raw: "raw",
|
|
9
6
|
Wav: "wav",
|
|
10
7
|
Mp3: "mp3",
|
|
@@ -1,18 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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("./OutputFormatContainer"), exports);
|
|
18
|
-
__exportStar(require("./StreamingResponse"), exports);
|
|
1
|
+
export * from "./OutputFormatContainer";
|
|
2
|
+
export * from "./StreamingResponse";
|
|
@@ -1,30 +1,6 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/**
|
|
3
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
4
3
|
*/
|
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
-
if (mod && mod.__esModule) return mod;
|
|
23
|
-
var result = {};
|
|
24
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
-
__setModuleDefault(result, mod);
|
|
26
|
-
return result;
|
|
27
|
-
};
|
|
28
4
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
29
5
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
30
6
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -34,17 +10,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
34
10
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
35
11
|
});
|
|
36
12
|
};
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
const core = __importStar(require("../../../../core"));
|
|
44
|
-
const url_join_1 = __importDefault(require("url-join"));
|
|
45
|
-
const serializers = __importStar(require("../../../../serialization/index"));
|
|
46
|
-
const errors = __importStar(require("../../../../errors/index"));
|
|
47
|
-
class Voices {
|
|
13
|
+
import * as environments from "../../../../environments";
|
|
14
|
+
import * as core from "../../../../core";
|
|
15
|
+
import urlJoin from "url-join";
|
|
16
|
+
import * as serializers from "../../../../serialization/index";
|
|
17
|
+
import * as errors from "../../../../errors/index";
|
|
18
|
+
export class Voices {
|
|
48
19
|
constructor(_options = {}) {
|
|
49
20
|
this._options = _options;
|
|
50
21
|
}
|
|
@@ -58,9 +29,9 @@ class Voices {
|
|
|
58
29
|
var _a, _b, _c, _d, _e;
|
|
59
30
|
return __awaiter(this, void 0, void 0, function* () {
|
|
60
31
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
61
|
-
url: (
|
|
32
|
+
url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CartesiaEnvironment.Production, "/voices/"),
|
|
62
33
|
method: "GET",
|
|
63
|
-
headers: Object.assign({ "Cartesia-Version": (_e = (_c = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _c !== void 0 ? _c : (_d = this._options) === null || _d === void 0 ? void 0 : _d.cartesiaVersion) !== null && _e !== void 0 ? _e : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.0.
|
|
34
|
+
headers: Object.assign({ "Cartesia-Version": (_e = (_c = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _c !== void 0 ? _c : (_d = this._options) === null || _d === void 0 ? void 0 : _d.cartesiaVersion) !== null && _e !== void 0 ? _e : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.0.2", "User-Agent": "@cartesia/cartesia-js/2.0.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
64
35
|
contentType: "application/json",
|
|
65
36
|
requestType: "json",
|
|
66
37
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -114,9 +85,9 @@ class Voices {
|
|
|
114
85
|
var _a, _b, _c, _d, _e;
|
|
115
86
|
return __awaiter(this, void 0, void 0, function* () {
|
|
116
87
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
117
|
-
url: (
|
|
88
|
+
url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CartesiaEnvironment.Production, "/voices/"),
|
|
118
89
|
method: "POST",
|
|
119
|
-
headers: Object.assign({ "Cartesia-Version": (_e = (_c = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _c !== void 0 ? _c : (_d = this._options) === null || _d === void 0 ? void 0 : _d.cartesiaVersion) !== null && _e !== void 0 ? _e : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.0.
|
|
90
|
+
headers: Object.assign({ "Cartesia-Version": (_e = (_c = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _c !== void 0 ? _c : (_d = this._options) === null || _d === void 0 ? void 0 : _d.cartesiaVersion) !== null && _e !== void 0 ? _e : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.0.2", "User-Agent": "@cartesia/cartesia-js/2.0.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
120
91
|
contentType: "application/json",
|
|
121
92
|
requestType: "json",
|
|
122
93
|
body: serializers.CreateVoiceRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -165,9 +136,9 @@ class Voices {
|
|
|
165
136
|
var _a, _b, _c, _d, _e;
|
|
166
137
|
return __awaiter(this, void 0, void 0, function* () {
|
|
167
138
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
168
|
-
url: (
|
|
139
|
+
url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CartesiaEnvironment.Production, `/voices/${encodeURIComponent(serializers.VoiceId.jsonOrThrow(id))}`),
|
|
169
140
|
method: "DELETE",
|
|
170
|
-
headers: Object.assign({ "Cartesia-Version": (_e = (_c = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _c !== void 0 ? _c : (_d = this._options) === null || _d === void 0 ? void 0 : _d.cartesiaVersion) !== null && _e !== void 0 ? _e : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.0.
|
|
141
|
+
headers: Object.assign({ "Cartesia-Version": (_e = (_c = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _c !== void 0 ? _c : (_d = this._options) === null || _d === void 0 ? void 0 : _d.cartesiaVersion) !== null && _e !== void 0 ? _e : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.0.2", "User-Agent": "@cartesia/cartesia-js/2.0.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
171
142
|
contentType: "application/json",
|
|
172
143
|
requestType: "json",
|
|
173
144
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -213,9 +184,9 @@ class Voices {
|
|
|
213
184
|
var _a, _b, _c, _d, _e;
|
|
214
185
|
return __awaiter(this, void 0, void 0, function* () {
|
|
215
186
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
216
|
-
url: (
|
|
187
|
+
url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CartesiaEnvironment.Production, `/voices/${encodeURIComponent(serializers.VoiceId.jsonOrThrow(id))}`),
|
|
217
188
|
method: "PATCH",
|
|
218
|
-
headers: Object.assign({ "Cartesia-Version": (_e = (_c = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _c !== void 0 ? _c : (_d = this._options) === null || _d === void 0 ? void 0 : _d.cartesiaVersion) !== null && _e !== void 0 ? _e : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.0.
|
|
189
|
+
headers: Object.assign({ "Cartesia-Version": (_e = (_c = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _c !== void 0 ? _c : (_d = this._options) === null || _d === void 0 ? void 0 : _d.cartesiaVersion) !== null && _e !== void 0 ? _e : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.0.2", "User-Agent": "@cartesia/cartesia-js/2.0.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
219
190
|
contentType: "application/json",
|
|
220
191
|
requestType: "json",
|
|
221
192
|
body: serializers.UpdateVoiceRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -264,9 +235,9 @@ class Voices {
|
|
|
264
235
|
var _a, _b, _c, _d, _e;
|
|
265
236
|
return __awaiter(this, void 0, void 0, function* () {
|
|
266
237
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
267
|
-
url: (
|
|
238
|
+
url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CartesiaEnvironment.Production, `/voices/${encodeURIComponent(serializers.VoiceId.jsonOrThrow(id))}`),
|
|
268
239
|
method: "GET",
|
|
269
|
-
headers: Object.assign({ "Cartesia-Version": (_e = (_c = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _c !== void 0 ? _c : (_d = this._options) === null || _d === void 0 ? void 0 : _d.cartesiaVersion) !== null && _e !== void 0 ? _e : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.0.
|
|
240
|
+
headers: Object.assign({ "Cartesia-Version": (_e = (_c = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _c !== void 0 ? _c : (_d = this._options) === null || _d === void 0 ? void 0 : _d.cartesiaVersion) !== null && _e !== void 0 ? _e : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.0.2", "User-Agent": "@cartesia/cartesia-js/2.0.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
270
241
|
contentType: "application/json",
|
|
271
242
|
requestType: "json",
|
|
272
243
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -319,9 +290,9 @@ class Voices {
|
|
|
319
290
|
var _a, _b, _c, _d, _e;
|
|
320
291
|
return __awaiter(this, void 0, void 0, function* () {
|
|
321
292
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
322
|
-
url: (
|
|
293
|
+
url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CartesiaEnvironment.Production, "/voices/localize"),
|
|
323
294
|
method: "POST",
|
|
324
|
-
headers: Object.assign({ "Cartesia-Version": (_e = (_c = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _c !== void 0 ? _c : (_d = this._options) === null || _d === void 0 ? void 0 : _d.cartesiaVersion) !== null && _e !== void 0 ? _e : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.0.
|
|
295
|
+
headers: Object.assign({ "Cartesia-Version": (_e = (_c = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _c !== void 0 ? _c : (_d = this._options) === null || _d === void 0 ? void 0 : _d.cartesiaVersion) !== null && _e !== void 0 ? _e : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.0.2", "User-Agent": "@cartesia/cartesia-js/2.0.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
325
296
|
contentType: "application/json",
|
|
326
297
|
requestType: "json",
|
|
327
298
|
body: serializers.LocalizeVoiceRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -375,9 +346,9 @@ class Voices {
|
|
|
375
346
|
var _a, _b, _c, _d, _e;
|
|
376
347
|
return __awaiter(this, void 0, void 0, function* () {
|
|
377
348
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
378
|
-
url: (
|
|
349
|
+
url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CartesiaEnvironment.Production, "/voices/mix"),
|
|
379
350
|
method: "POST",
|
|
380
|
-
headers: Object.assign({ "Cartesia-Version": (_e = (_c = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _c !== void 0 ? _c : (_d = this._options) === null || _d === void 0 ? void 0 : _d.cartesiaVersion) !== null && _e !== void 0 ? _e : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.0.
|
|
351
|
+
headers: Object.assign({ "Cartesia-Version": (_e = (_c = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _c !== void 0 ? _c : (_d = this._options) === null || _d === void 0 ? void 0 : _d.cartesiaVersion) !== null && _e !== void 0 ? _e : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.0.2", "User-Agent": "@cartesia/cartesia-js/2.0.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
381
352
|
contentType: "application/json",
|
|
382
353
|
requestType: "json",
|
|
383
354
|
body: serializers.MixVoicesRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -462,9 +433,9 @@ class Voices {
|
|
|
462
433
|
}
|
|
463
434
|
const _maybeEncodedRequest = yield _request.getRequest();
|
|
464
435
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
465
|
-
url: (
|
|
436
|
+
url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CartesiaEnvironment.Production, "/voices/clone"),
|
|
466
437
|
method: "POST",
|
|
467
|
-
headers: Object.assign(Object.assign({ "Cartesia-Version": (_e = (_c = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _c !== void 0 ? _c : (_d = this._options) === null || _d === void 0 ? void 0 : _d.cartesiaVersion) !== null && _e !== void 0 ? _e : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.0.
|
|
438
|
+
headers: Object.assign(Object.assign({ "Cartesia-Version": (_e = (_c = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _c !== void 0 ? _c : (_d = this._options) === null || _d === void 0 ? void 0 : _d.cartesiaVersion) !== null && _e !== void 0 ? _e : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.0.2", "User-Agent": "@cartesia/cartesia-js/2.0.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), _maybeEncodedRequest.headers),
|
|
468
439
|
requestType: "file",
|
|
469
440
|
duplex: _maybeEncodedRequest.duplex,
|
|
470
441
|
body: _maybeEncodedRequest.body,
|
|
@@ -509,4 +480,3 @@ class Voices {
|
|
|
509
480
|
});
|
|
510
481
|
}
|
|
511
482
|
}
|
|
512
|
-
exports.Voices = Voices;
|
|
@@ -1,17 +1 @@
|
|
|
1
|
-
|
|
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("./requests"), exports);
|
|
1
|
+
export * from "./requests";
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,18 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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("./types"), exports);
|
|
18
|
-
__exportStar(require("./client"), exports);
|
|
1
|
+
export * from "./types";
|
|
2
|
+
export * from "./client";
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/**
|
|
3
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
4
3
|
*/
|
|
5
|
-
|
|
6
|
-
exports.CloneMode = void 0;
|
|
7
|
-
exports.CloneMode = {
|
|
4
|
+
export const CloneMode = {
|
|
8
5
|
Similarity: "similarity",
|
|
9
6
|
Stability: "stability",
|
|
10
7
|
};
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/**
|
|
3
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
4
3
|
*/
|
|
5
|
-
|
|
6
|
-
exports.Gender = void 0;
|
|
7
|
-
exports.Gender = {
|
|
4
|
+
export const Gender = {
|
|
8
5
|
Male: "male",
|
|
9
6
|
Female: "female",
|
|
10
7
|
};
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/**
|
|
3
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
4
3
|
*/
|
|
5
|
-
|
|
6
|
-
exports.LocalizeDialect = void 0;
|
|
7
|
-
exports.LocalizeDialect = {
|
|
4
|
+
export const LocalizeDialect = {
|
|
8
5
|
Au: "au",
|
|
9
6
|
In: "in",
|
|
10
7
|
So: "so",
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/**
|
|
3
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
4
3
|
*/
|
|
5
|
-
|
|
6
|
-
exports.LocalizeTargetLanguage = void 0;
|
|
7
|
-
exports.LocalizeTargetLanguage = {
|
|
4
|
+
export const LocalizeTargetLanguage = {
|
|
8
5
|
En: "en",
|
|
9
6
|
De: "de",
|
|
10
7
|
Es: "es",
|