@cartesia/cartesia-js 2.1.3 → 2.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Client.d.ts +12 -5
- package/Client.js +11 -6
- package/api/resources/apiStatus/client/Client.d.ts +4 -0
- package/api/resources/apiStatus/client/Client.js +21 -11
- package/api/resources/datasets/client/Client.d.ts +4 -1
- package/api/resources/datasets/client/Client.js +34 -24
- package/api/resources/datasets/types/FilePurpose.d.ts +1 -1
- package/api/resources/embedding/types/Embedding.d.ts +1 -1
- package/api/resources/index.d.ts +2 -0
- package/api/resources/index.js +20 -8
- package/api/resources/infill/client/Client.d.ts +49 -0
- package/api/resources/infill/client/Client.js +148 -0
- package/api/resources/infill/client/index.d.ts +1 -0
- package/api/resources/infill/client/index.js +17 -0
- package/api/resources/infill/client/requests/InfillBytesRequest.d.ts +71 -0
- package/api/resources/infill/client/requests/InfillBytesRequest.js +5 -0
- package/api/resources/infill/client/requests/index.d.ts +1 -0
- package/api/resources/infill/client/requests/index.js +2 -0
- package/api/resources/infill/index.d.ts +1 -0
- package/api/resources/infill/index.js +17 -0
- package/api/resources/tts/client/Client.js +21 -11
- package/api/resources/tts/types/ContextId.d.ts +1 -1
- package/api/resources/tts/types/Emotion.d.ts +5 -1
- package/api/resources/tts/types/Emotion.js +4 -0
- package/api/resources/tts/types/FlushId.d.ts +9 -0
- package/api/resources/tts/types/FlushId.js +5 -0
- package/api/resources/tts/types/GenerationRequest.d.ts +7 -2
- package/api/resources/tts/types/NaturalSpecifier.d.ts +1 -1
- package/api/resources/tts/types/NumericalSpecifier.d.ts +1 -1
- package/api/resources/tts/types/OutputFormat.d.ts +1 -1
- package/api/resources/tts/types/PhonemeTimestamps.d.ts +8 -0
- package/api/resources/tts/types/PhonemeTimestamps.js +5 -0
- package/api/resources/tts/types/RawEncoding.d.ts +1 -1
- package/api/resources/tts/types/RawOutputFormat.d.ts +1 -0
- package/api/resources/tts/types/Speed.d.ts +1 -1
- package/api/resources/tts/types/SupportedLanguage.d.ts +1 -1
- package/api/resources/tts/types/TtsRequestVoiceSpecifier.d.ts +1 -1
- package/api/resources/tts/types/WebSocketFlushDoneResponse.d.ts +8 -0
- package/api/resources/tts/types/WebSocketFlushDoneResponse.js +5 -0
- package/api/resources/tts/types/WebSocketPhonemeTimestampsResponse.d.ts +7 -0
- package/api/resources/tts/types/WebSocketPhonemeTimestampsResponse.js +5 -0
- package/api/resources/tts/types/WebSocketRequest.d.ts +1 -1
- package/api/resources/tts/types/WebSocketResponse.d.ts +7 -1
- package/api/resources/tts/types/WebSocketTtsOutput.d.ts +3 -0
- package/api/resources/tts/types/WebSocketTtsRequest.d.ts +1 -0
- package/api/resources/tts/types/index.d.ts +4 -0
- package/api/resources/tts/types/index.js +4 -0
- package/api/resources/voiceChanger/client/Client.d.ts +3 -4
- package/api/resources/voiceChanger/client/Client.js +23 -13
- package/api/resources/voiceChanger/types/OutputFormatContainer.d.ts +1 -1
- package/api/resources/voiceChanger/types/StreamingResponse.d.ts +1 -1
- package/api/resources/voices/client/Client.d.ts +5 -3
- package/api/resources/voices/client/Client.js +56 -47
- package/api/resources/voices/types/BaseVoiceId.d.ts +1 -1
- package/api/resources/voices/types/CloneMode.d.ts +1 -1
- package/api/resources/voices/types/CreateVoiceRequest.d.ts +0 -1
- package/api/resources/voices/types/Gender.d.ts +1 -1
- package/api/resources/voices/types/LocalizeDialect.d.ts +12 -4
- package/api/resources/voices/types/LocalizeEnglishDialect.d.ts +1 -1
- package/api/resources/voices/types/LocalizePortugueseDialect.d.ts +8 -0
- package/api/resources/voices/types/LocalizePortugueseDialect.js +10 -0
- package/api/resources/voices/types/LocalizeSpanishDialect.d.ts +8 -0
- package/api/resources/voices/types/LocalizeSpanishDialect.js +10 -0
- package/api/resources/voices/types/LocalizeTargetLanguage.d.ts +1 -1
- package/api/resources/voices/types/MixVoiceSpecifier.d.ts +1 -1
- package/api/resources/voices/types/Voice.d.ts +0 -1
- package/api/resources/voices/types/VoiceId.d.ts +1 -1
- package/api/resources/voices/types/Weight.d.ts +1 -1
- package/api/resources/voices/types/index.d.ts +2 -0
- package/api/resources/voices/types/index.js +2 -0
- package/core/fetcher/APIResponse.d.ts +1 -1
- package/core/fetcher/Fetcher.d.ts +1 -1
- package/core/fetcher/Fetcher.js +2 -2
- package/core/fetcher/Supplier.d.ts +1 -1
- package/core/fetcher/createRequestUrl.d.ts +1 -1
- package/core/fetcher/createRequestUrl.js +1 -2
- package/core/fetcher/getFetchFn.js +18 -9
- package/core/fetcher/getHeader.js +1 -2
- package/core/fetcher/getRequestBody.js +5 -5
- package/core/fetcher/getResponseBody.js +1 -2
- package/core/fetcher/makeRequest.d.ts +1 -1
- package/core/fetcher/requestWithRetries.js +4 -5
- package/core/fetcher/signals.d.ts +0 -1
- package/core/fetcher/signals.js +2 -3
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -1
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +6 -4
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +1 -1
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +1 -1
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +18 -9
- package/core/form-data-utils/FormDataWrapper.d.ts +4 -4
- package/core/form-data-utils/FormDataWrapper.js +22 -12
- package/core/index.js +17 -7
- package/core/json.d.ts +15 -0
- package/core/json.js +24 -0
- package/core/runtime/runtime.d.ts +1 -1
- package/core/runtime/runtime.js +51 -41
- package/core/schemas/Schema.d.ts +7 -5
- package/core/schemas/Schema.js +2 -0
- package/core/schemas/builders/bigint/bigint.d.ts +1 -1
- package/core/schemas/builders/bigint/bigint.js +22 -19
- package/core/schemas/builders/date/date.js +1 -2
- package/core/schemas/builders/enum/enum.js +1 -2
- package/core/schemas/builders/lazy/lazy.d.ts +1 -1
- package/core/schemas/builders/lazy/lazy.js +3 -4
- package/core/schemas/builders/lazy/lazyObject.js +1 -2
- package/core/schemas/builders/list/list.js +1 -2
- package/core/schemas/builders/literals/booleanLiteral.js +1 -2
- package/core/schemas/builders/literals/stringLiteral.js +1 -2
- package/core/schemas/builders/object/object.d.ts +1 -1
- package/core/schemas/builders/object/object.js +31 -3
- package/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +3 -3
- package/core/schemas/builders/object/objectWithoutOptionalProperties.js +1 -2
- package/core/schemas/builders/object/property.js +2 -3
- package/core/schemas/builders/object/types.d.ts +16 -11
- package/core/schemas/builders/object-like/getObjectLikeUtils.js +2 -3
- package/core/schemas/builders/object-like/types.d.ts +1 -1
- package/core/schemas/builders/record/record.js +2 -4
- package/core/schemas/builders/record/types.d.ts +2 -2
- package/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +4 -0
- package/core/schemas/builders/schema-utils/getSchemaUtils.js +67 -4
- package/core/schemas/builders/schema-utils/stringifyValidationErrors.js +1 -2
- package/core/schemas/builders/set/set.js +1 -2
- package/core/schemas/builders/undiscriminated-union/types.d.ts +4 -4
- package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +1 -2
- package/core/schemas/builders/union/discriminant.js +1 -2
- package/core/schemas/builders/union/types.d.ts +6 -6
- package/core/schemas/builders/union/union.d.ts +1 -1
- package/core/schemas/builders/union/union.js +1 -2
- package/core/schemas/utils/MaybePromise.d.ts +1 -1
- package/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +4 -4
- package/core/schemas/utils/createIdentitySchemaCreator.js +1 -2
- package/core/schemas/utils/entries.d.ts +1 -1
- package/core/schemas/utils/entries.js +1 -2
- package/core/schemas/utils/filterObject.d.ts +1 -1
- package/core/schemas/utils/filterObject.js +1 -2
- package/core/schemas/utils/getErrorMessageForIncorrectType.js +1 -2
- package/core/schemas/utils/isPlainObject.js +1 -2
- package/core/schemas/utils/keys.d.ts +1 -1
- package/core/schemas/utils/keys.js +1 -2
- package/core/schemas/utils/maybeSkipValidation.js +1 -2
- package/core/schemas/utils/partition.js +1 -2
- package/core/streaming-fetcher/Stream.d.ts +0 -1
- package/core/streaming-fetcher/Stream.js +20 -21
- package/core/websocket/ws.d.ts +7 -7
- package/core/websocket/ws.js +17 -7
- package/dist/Client.d.ts +12 -5
- package/dist/Client.js +11 -6
- package/dist/api/resources/apiStatus/client/Client.d.ts +4 -0
- package/dist/api/resources/apiStatus/client/Client.js +21 -11
- package/dist/api/resources/datasets/client/Client.d.ts +4 -1
- package/dist/api/resources/datasets/client/Client.js +34 -24
- package/dist/api/resources/datasets/types/FilePurpose.d.ts +1 -1
- package/dist/api/resources/embedding/types/Embedding.d.ts +1 -1
- package/dist/api/resources/index.d.ts +2 -0
- package/dist/api/resources/index.js +20 -8
- package/dist/api/resources/infill/client/Client.d.ts +49 -0
- package/dist/api/resources/infill/client/Client.js +148 -0
- package/dist/api/resources/infill/client/index.d.ts +1 -0
- package/dist/api/resources/infill/client/index.js +17 -0
- package/dist/api/resources/infill/client/requests/InfillBytesRequest.d.ts +71 -0
- package/dist/api/resources/infill/client/requests/InfillBytesRequest.js +5 -0
- package/dist/api/resources/infill/client/requests/index.d.ts +1 -0
- package/dist/api/resources/infill/client/requests/index.js +2 -0
- package/dist/api/resources/infill/index.d.ts +1 -0
- package/dist/api/resources/infill/index.js +17 -0
- package/dist/api/resources/tts/client/Client.js +21 -11
- package/dist/api/resources/tts/types/ContextId.d.ts +1 -1
- package/dist/api/resources/tts/types/Emotion.d.ts +5 -1
- package/dist/api/resources/tts/types/Emotion.js +4 -0
- package/dist/api/resources/tts/types/FlushId.d.ts +9 -0
- package/dist/api/resources/tts/types/FlushId.js +5 -0
- package/dist/api/resources/tts/types/GenerationRequest.d.ts +7 -2
- package/dist/api/resources/tts/types/NaturalSpecifier.d.ts +1 -1
- package/dist/api/resources/tts/types/NumericalSpecifier.d.ts +1 -1
- package/dist/api/resources/tts/types/OutputFormat.d.ts +1 -1
- package/dist/api/resources/tts/types/PhonemeTimestamps.d.ts +8 -0
- package/dist/api/resources/tts/types/PhonemeTimestamps.js +5 -0
- package/dist/api/resources/tts/types/RawEncoding.d.ts +1 -1
- package/dist/api/resources/tts/types/RawOutputFormat.d.ts +1 -0
- package/dist/api/resources/tts/types/Speed.d.ts +1 -1
- package/dist/api/resources/tts/types/SupportedLanguage.d.ts +1 -1
- package/dist/api/resources/tts/types/TtsRequestVoiceSpecifier.d.ts +1 -1
- package/dist/api/resources/tts/types/WebSocketFlushDoneResponse.d.ts +8 -0
- package/dist/api/resources/tts/types/WebSocketFlushDoneResponse.js +5 -0
- package/dist/api/resources/tts/types/WebSocketPhonemeTimestampsResponse.d.ts +7 -0
- package/dist/api/resources/tts/types/WebSocketPhonemeTimestampsResponse.js +5 -0
- package/dist/api/resources/tts/types/WebSocketRequest.d.ts +1 -1
- package/dist/api/resources/tts/types/WebSocketResponse.d.ts +7 -1
- package/dist/api/resources/tts/types/WebSocketTtsOutput.d.ts +3 -0
- package/dist/api/resources/tts/types/WebSocketTtsRequest.d.ts +1 -0
- package/dist/api/resources/tts/types/index.d.ts +4 -0
- package/dist/api/resources/tts/types/index.js +4 -0
- package/dist/api/resources/voiceChanger/client/Client.d.ts +3 -4
- package/dist/api/resources/voiceChanger/client/Client.js +23 -13
- package/dist/api/resources/voiceChanger/types/OutputFormatContainer.d.ts +1 -1
- package/dist/api/resources/voiceChanger/types/StreamingResponse.d.ts +1 -1
- package/dist/api/resources/voices/client/Client.d.ts +5 -3
- package/dist/api/resources/voices/client/Client.js +56 -47
- package/dist/api/resources/voices/types/BaseVoiceId.d.ts +1 -1
- package/dist/api/resources/voices/types/CloneMode.d.ts +1 -1
- package/dist/api/resources/voices/types/CreateVoiceRequest.d.ts +0 -1
- package/dist/api/resources/voices/types/Gender.d.ts +1 -1
- package/dist/api/resources/voices/types/LocalizeDialect.d.ts +12 -4
- package/dist/api/resources/voices/types/LocalizeEnglishDialect.d.ts +1 -1
- package/dist/api/resources/voices/types/LocalizePortugueseDialect.d.ts +8 -0
- package/dist/api/resources/voices/types/LocalizePortugueseDialect.js +10 -0
- package/dist/api/resources/voices/types/LocalizeSpanishDialect.d.ts +8 -0
- package/dist/api/resources/voices/types/LocalizeSpanishDialect.js +10 -0
- package/dist/api/resources/voices/types/LocalizeTargetLanguage.d.ts +1 -1
- package/dist/api/resources/voices/types/MixVoiceSpecifier.d.ts +1 -1
- package/dist/api/resources/voices/types/Voice.d.ts +0 -1
- package/dist/api/resources/voices/types/VoiceId.d.ts +1 -1
- package/dist/api/resources/voices/types/Weight.d.ts +1 -1
- package/dist/api/resources/voices/types/index.d.ts +2 -0
- package/dist/api/resources/voices/types/index.js +2 -0
- package/dist/core/fetcher/APIResponse.d.ts +1 -1
- package/dist/core/fetcher/Fetcher.d.ts +1 -1
- package/dist/core/fetcher/Fetcher.js +2 -2
- package/dist/core/fetcher/Supplier.d.ts +1 -1
- package/dist/core/fetcher/createRequestUrl.d.ts +1 -1
- package/dist/core/fetcher/createRequestUrl.js +1 -2
- package/dist/core/fetcher/getFetchFn.js +18 -9
- package/dist/core/fetcher/getHeader.js +1 -2
- package/dist/core/fetcher/getRequestBody.js +5 -5
- package/dist/core/fetcher/getResponseBody.js +1 -2
- package/dist/core/fetcher/makeRequest.d.ts +1 -1
- package/dist/core/fetcher/requestWithRetries.js +4 -5
- package/dist/core/fetcher/signals.d.ts +0 -1
- package/dist/core/fetcher/signals.js +2 -3
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -1
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +6 -4
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +1 -1
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +1 -1
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +18 -9
- package/dist/core/form-data-utils/FormDataWrapper.d.ts +4 -4
- package/dist/core/form-data-utils/FormDataWrapper.js +22 -12
- package/dist/core/index.js +17 -7
- package/dist/core/json.d.ts +15 -0
- package/dist/core/json.js +24 -0
- package/dist/core/runtime/runtime.d.ts +1 -1
- package/dist/core/runtime/runtime.js +51 -41
- package/dist/core/schemas/Schema.d.ts +7 -5
- package/dist/core/schemas/Schema.js +2 -0
- package/dist/core/schemas/builders/bigint/bigint.d.ts +1 -1
- package/dist/core/schemas/builders/bigint/bigint.js +22 -19
- package/dist/core/schemas/builders/date/date.js +1 -2
- package/dist/core/schemas/builders/enum/enum.js +1 -2
- package/dist/core/schemas/builders/lazy/lazy.d.ts +1 -1
- package/dist/core/schemas/builders/lazy/lazy.js +3 -4
- package/dist/core/schemas/builders/lazy/lazyObject.js +1 -2
- package/dist/core/schemas/builders/list/list.js +1 -2
- package/dist/core/schemas/builders/literals/booleanLiteral.js +1 -2
- package/dist/core/schemas/builders/literals/stringLiteral.js +1 -2
- package/dist/core/schemas/builders/object/object.d.ts +1 -1
- package/dist/core/schemas/builders/object/object.js +31 -3
- package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +3 -3
- package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.js +1 -2
- package/dist/core/schemas/builders/object/property.js +2 -3
- package/dist/core/schemas/builders/object/types.d.ts +16 -11
- package/dist/core/schemas/builders/object-like/getObjectLikeUtils.js +2 -3
- package/dist/core/schemas/builders/object-like/types.d.ts +1 -1
- package/dist/core/schemas/builders/record/record.js +2 -4
- package/dist/core/schemas/builders/record/types.d.ts +2 -2
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +4 -0
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +67 -4
- package/dist/core/schemas/builders/schema-utils/stringifyValidationErrors.js +1 -2
- package/dist/core/schemas/builders/set/set.js +1 -2
- package/dist/core/schemas/builders/undiscriminated-union/types.d.ts +4 -4
- package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +1 -2
- package/dist/core/schemas/builders/union/discriminant.js +1 -2
- package/dist/core/schemas/builders/union/types.d.ts +6 -6
- package/dist/core/schemas/builders/union/union.d.ts +1 -1
- package/dist/core/schemas/builders/union/union.js +1 -2
- package/dist/core/schemas/utils/MaybePromise.d.ts +1 -1
- package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +4 -4
- package/dist/core/schemas/utils/createIdentitySchemaCreator.js +1 -2
- package/dist/core/schemas/utils/entries.d.ts +1 -1
- package/dist/core/schemas/utils/entries.js +1 -2
- package/dist/core/schemas/utils/filterObject.d.ts +1 -1
- package/dist/core/schemas/utils/filterObject.js +1 -2
- package/dist/core/schemas/utils/getErrorMessageForIncorrectType.js +1 -2
- package/dist/core/schemas/utils/isPlainObject.js +1 -2
- package/dist/core/schemas/utils/keys.d.ts +1 -1
- package/dist/core/schemas/utils/keys.js +1 -2
- package/dist/core/schemas/utils/maybeSkipValidation.js +1 -2
- package/dist/core/schemas/utils/partition.js +1 -2
- package/dist/core/streaming-fetcher/Stream.d.ts +0 -1
- package/dist/core/streaming-fetcher/Stream.js +20 -21
- package/dist/core/websocket/ws.d.ts +7 -7
- package/dist/core/websocket/ws.js +17 -7
- package/dist/environments.d.ts +1 -1
- package/dist/errors/CartesiaError.js +2 -1
- package/dist/errors/CartesiaTimeoutError.d.ts +1 -1
- package/dist/errors/CartesiaTimeoutError.js +2 -2
- package/dist/index.js +17 -7
- package/dist/serialization/resources/apiStatus/types/ApiInfo.js +17 -7
- package/dist/serialization/resources/datasets/types/CreateDatasetRequest.js +17 -7
- package/dist/serialization/resources/datasets/types/Dataset.js +17 -7
- package/dist/serialization/resources/datasets/types/DatasetFile.js +17 -7
- package/dist/serialization/resources/datasets/types/FilePurpose.js +17 -7
- package/dist/serialization/resources/datasets/types/PaginatedDatasetFiles.js +17 -7
- package/dist/serialization/resources/datasets/types/PaginatedDatasets.js +17 -7
- package/dist/serialization/resources/embedding/types/Embedding.js +17 -7
- package/dist/serialization/resources/index.js +17 -7
- package/dist/serialization/resources/tts/types/CancelContextRequest.js +17 -7
- package/dist/serialization/resources/tts/types/ContextId.js +17 -7
- package/dist/serialization/resources/tts/types/Controls.js +17 -7
- package/dist/serialization/resources/tts/types/Emotion.d.ts +1 -1
- package/dist/serialization/resources/tts/types/Emotion.js +21 -7
- package/dist/serialization/resources/tts/types/FlushId.d.ts +10 -0
- package/dist/serialization/resources/tts/types/FlushId.js +41 -0
- package/dist/serialization/resources/tts/types/GenerationRequest.d.ts +4 -2
- package/dist/serialization/resources/tts/types/GenerationRequest.js +21 -9
- package/dist/serialization/resources/tts/types/Mp3OutputFormat.js +17 -7
- package/dist/serialization/resources/tts/types/NaturalSpecifier.js +17 -7
- package/dist/serialization/resources/tts/types/NumericalSpecifier.js +17 -7
- package/dist/serialization/resources/tts/types/OutputFormat.js +17 -7
- package/dist/serialization/resources/tts/types/PhonemeTimestamps.d.ts +14 -0
- package/dist/serialization/resources/tts/types/PhonemeTimestamps.js +45 -0
- package/dist/serialization/resources/tts/types/RawEncoding.js +17 -7
- package/dist/serialization/resources/tts/types/RawOutputFormat.d.ts +1 -0
- package/dist/serialization/resources/tts/types/RawOutputFormat.js +18 -7
- package/dist/serialization/resources/tts/types/Speed.js +17 -7
- package/dist/serialization/resources/tts/types/SupportedLanguage.js +17 -7
- package/dist/serialization/resources/tts/types/TtsRequest.js +17 -7
- package/dist/serialization/resources/tts/types/TtsRequestEmbeddingSpecifier.js +17 -7
- package/dist/serialization/resources/tts/types/TtsRequestIdSpecifier.js +17 -7
- package/dist/serialization/resources/tts/types/TtsRequestVoiceSpecifier.js +17 -7
- package/dist/serialization/resources/tts/types/WavOutputFormat.js +17 -7
- package/dist/serialization/resources/tts/types/WebSocketBaseResponse.js +17 -7
- package/dist/serialization/resources/tts/types/WebSocketChunkResponse.js +17 -7
- package/dist/serialization/resources/tts/types/WebSocketDoneResponse.js +17 -7
- package/dist/serialization/resources/tts/types/WebSocketErrorResponse.js +17 -7
- package/dist/serialization/resources/tts/types/WebSocketFlushDoneResponse.d.ts +15 -0
- package/dist/serialization/resources/tts/types/WebSocketFlushDoneResponse.js +48 -0
- package/dist/serialization/resources/tts/types/WebSocketPhonemeTimestampsResponse.d.ts +14 -0
- package/dist/serialization/resources/tts/types/WebSocketPhonemeTimestampsResponse.js +47 -0
- package/dist/serialization/resources/tts/types/WebSocketRawOutputFormat.js +17 -7
- package/dist/serialization/resources/tts/types/WebSocketRequest.js +17 -7
- package/dist/serialization/resources/tts/types/WebSocketResponse.d.ts +9 -1
- package/dist/serialization/resources/tts/types/WebSocketResponse.js +21 -7
- package/dist/serialization/resources/tts/types/WebSocketStreamOptions.js +17 -7
- package/dist/serialization/resources/tts/types/WebSocketTimestampsResponse.js +17 -7
- package/dist/serialization/resources/tts/types/WebSocketTtsOutput.d.ts +5 -0
- package/dist/serialization/resources/tts/types/WebSocketTtsOutput.js +22 -7
- package/dist/serialization/resources/tts/types/WebSocketTtsRequest.d.ts +1 -0
- package/dist/serialization/resources/tts/types/WebSocketTtsRequest.js +18 -7
- package/dist/serialization/resources/tts/types/WordTimestamps.js +17 -7
- package/dist/serialization/resources/tts/types/index.d.ts +4 -0
- package/dist/serialization/resources/tts/types/index.js +4 -0
- package/dist/serialization/resources/voiceChanger/types/OutputFormatContainer.js +17 -7
- package/dist/serialization/resources/voiceChanger/types/StreamingResponse.js +17 -7
- package/dist/serialization/resources/voices/client/index.js +17 -7
- package/dist/serialization/resources/voices/client/list.js +17 -7
- package/dist/serialization/resources/voices/types/CloneMode.js +17 -7
- package/dist/serialization/resources/voices/types/CreateVoiceRequest.d.ts +0 -2
- package/dist/serialization/resources/voices/types/CreateVoiceRequest.js +17 -9
- package/dist/serialization/resources/voices/types/EmbeddingResponse.js +17 -7
- package/dist/serialization/resources/voices/types/EmbeddingSpecifier.js +17 -7
- package/dist/serialization/resources/voices/types/Gender.js +17 -7
- package/dist/serialization/resources/voices/types/IdSpecifier.js +17 -7
- package/dist/serialization/resources/voices/types/LocalizeDialect.d.ts +3 -1
- package/dist/serialization/resources/voices/types/LocalizeDialect.js +24 -8
- package/dist/serialization/resources/voices/types/LocalizeEnglishDialect.js +17 -7
- package/dist/serialization/resources/voices/types/LocalizePortugueseDialect.d.ts +10 -0
- package/dist/serialization/resources/voices/types/LocalizePortugueseDialect.js +41 -0
- package/dist/serialization/resources/voices/types/LocalizeSpanishDialect.d.ts +10 -0
- package/dist/serialization/resources/voices/types/LocalizeSpanishDialect.js +41 -0
- package/dist/serialization/resources/voices/types/LocalizeTargetLanguage.js +17 -7
- package/dist/serialization/resources/voices/types/LocalizeVoiceRequest.js +17 -7
- package/dist/serialization/resources/voices/types/MixVoiceSpecifier.js +17 -7
- package/dist/serialization/resources/voices/types/MixVoicesRequest.js +17 -7
- package/dist/serialization/resources/voices/types/UpdateVoiceRequest.js +17 -7
- package/dist/serialization/resources/voices/types/Voice.d.ts +0 -2
- package/dist/serialization/resources/voices/types/Voice.js +17 -9
- package/dist/serialization/resources/voices/types/VoiceId.js +17 -7
- package/dist/serialization/resources/voices/types/VoiceMetadata.js +17 -7
- package/dist/serialization/resources/voices/types/Weight.js +17 -7
- package/dist/serialization/resources/voices/types/index.d.ts +2 -0
- package/dist/serialization/resources/voices/types/index.js +2 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/wrapper/WebPlayer.js +1 -1
- package/dist/wrapper/Websocket.js +25 -15
- package/dist/wrapper/source.js +1 -1
- package/dist/wrapper/utils.d.ts +9 -9
- package/dist/wrapper/utils.js +10 -10
- package/environments.d.ts +1 -1
- package/errors/CartesiaError.js +2 -1
- package/errors/CartesiaTimeoutError.d.ts +1 -1
- package/errors/CartesiaTimeoutError.js +2 -2
- package/index.js +17 -7
- package/{jest.config.js → jest.config.mjs} +4 -1
- package/package.json +15 -16
- package/reference.md +97 -1
- package/scripts/rename-to-esm-files.js +115 -0
- package/serialization/resources/apiStatus/types/ApiInfo.js +17 -7
- package/serialization/resources/datasets/types/CreateDatasetRequest.js +17 -7
- package/serialization/resources/datasets/types/Dataset.js +17 -7
- package/serialization/resources/datasets/types/DatasetFile.js +17 -7
- package/serialization/resources/datasets/types/FilePurpose.js +17 -7
- package/serialization/resources/datasets/types/PaginatedDatasetFiles.js +17 -7
- package/serialization/resources/datasets/types/PaginatedDatasets.js +17 -7
- package/serialization/resources/embedding/types/Embedding.js +17 -7
- package/serialization/resources/index.js +17 -7
- package/serialization/resources/tts/types/CancelContextRequest.js +17 -7
- package/serialization/resources/tts/types/ContextId.js +17 -7
- package/serialization/resources/tts/types/Controls.js +17 -7
- package/serialization/resources/tts/types/Emotion.d.ts +1 -1
- package/serialization/resources/tts/types/Emotion.js +21 -7
- package/serialization/resources/tts/types/FlushId.d.ts +10 -0
- package/serialization/resources/tts/types/FlushId.js +41 -0
- package/serialization/resources/tts/types/GenerationRequest.d.ts +4 -2
- package/serialization/resources/tts/types/GenerationRequest.js +21 -9
- package/serialization/resources/tts/types/Mp3OutputFormat.js +17 -7
- package/serialization/resources/tts/types/NaturalSpecifier.js +17 -7
- package/serialization/resources/tts/types/NumericalSpecifier.js +17 -7
- package/serialization/resources/tts/types/OutputFormat.js +17 -7
- package/serialization/resources/tts/types/PhonemeTimestamps.d.ts +14 -0
- package/serialization/resources/tts/types/PhonemeTimestamps.js +45 -0
- package/serialization/resources/tts/types/RawEncoding.js +17 -7
- package/serialization/resources/tts/types/RawOutputFormat.d.ts +1 -0
- package/serialization/resources/tts/types/RawOutputFormat.js +18 -7
- package/serialization/resources/tts/types/Speed.js +17 -7
- package/serialization/resources/tts/types/SupportedLanguage.js +17 -7
- package/serialization/resources/tts/types/TtsRequest.js +17 -7
- package/serialization/resources/tts/types/TtsRequestEmbeddingSpecifier.js +17 -7
- package/serialization/resources/tts/types/TtsRequestIdSpecifier.js +17 -7
- package/serialization/resources/tts/types/TtsRequestVoiceSpecifier.js +17 -7
- package/serialization/resources/tts/types/WavOutputFormat.js +17 -7
- package/serialization/resources/tts/types/WebSocketBaseResponse.js +17 -7
- package/serialization/resources/tts/types/WebSocketChunkResponse.js +17 -7
- package/serialization/resources/tts/types/WebSocketDoneResponse.js +17 -7
- package/serialization/resources/tts/types/WebSocketErrorResponse.js +17 -7
- package/serialization/resources/tts/types/WebSocketFlushDoneResponse.d.ts +15 -0
- package/serialization/resources/tts/types/WebSocketFlushDoneResponse.js +48 -0
- package/serialization/resources/tts/types/WebSocketPhonemeTimestampsResponse.d.ts +14 -0
- package/serialization/resources/tts/types/WebSocketPhonemeTimestampsResponse.js +47 -0
- package/serialization/resources/tts/types/WebSocketRawOutputFormat.js +17 -7
- package/serialization/resources/tts/types/WebSocketRequest.js +17 -7
- package/serialization/resources/tts/types/WebSocketResponse.d.ts +9 -1
- package/serialization/resources/tts/types/WebSocketResponse.js +21 -7
- package/serialization/resources/tts/types/WebSocketStreamOptions.js +17 -7
- package/serialization/resources/tts/types/WebSocketTimestampsResponse.js +17 -7
- package/serialization/resources/tts/types/WebSocketTtsOutput.d.ts +5 -0
- package/serialization/resources/tts/types/WebSocketTtsOutput.js +22 -7
- package/serialization/resources/tts/types/WebSocketTtsRequest.d.ts +1 -0
- package/serialization/resources/tts/types/WebSocketTtsRequest.js +18 -7
- package/serialization/resources/tts/types/WordTimestamps.js +17 -7
- package/serialization/resources/tts/types/index.d.ts +4 -0
- package/serialization/resources/tts/types/index.js +4 -0
- package/serialization/resources/voiceChanger/types/OutputFormatContainer.js +17 -7
- package/serialization/resources/voiceChanger/types/StreamingResponse.js +17 -7
- package/serialization/resources/voices/client/index.js +17 -7
- package/serialization/resources/voices/client/list.js +17 -7
- package/serialization/resources/voices/types/CloneMode.js +17 -7
- package/serialization/resources/voices/types/CreateVoiceRequest.d.ts +0 -2
- package/serialization/resources/voices/types/CreateVoiceRequest.js +17 -9
- package/serialization/resources/voices/types/EmbeddingResponse.js +17 -7
- package/serialization/resources/voices/types/EmbeddingSpecifier.js +17 -7
- package/serialization/resources/voices/types/Gender.js +17 -7
- package/serialization/resources/voices/types/IdSpecifier.js +17 -7
- package/serialization/resources/voices/types/LocalizeDialect.d.ts +3 -1
- package/serialization/resources/voices/types/LocalizeDialect.js +24 -8
- package/serialization/resources/voices/types/LocalizeEnglishDialect.js +17 -7
- package/serialization/resources/voices/types/LocalizePortugueseDialect.d.ts +10 -0
- package/serialization/resources/voices/types/LocalizePortugueseDialect.js +41 -0
- package/serialization/resources/voices/types/LocalizeSpanishDialect.d.ts +10 -0
- package/serialization/resources/voices/types/LocalizeSpanishDialect.js +41 -0
- package/serialization/resources/voices/types/LocalizeTargetLanguage.js +17 -7
- package/serialization/resources/voices/types/LocalizeVoiceRequest.js +17 -7
- package/serialization/resources/voices/types/MixVoiceSpecifier.js +17 -7
- package/serialization/resources/voices/types/MixVoicesRequest.js +17 -7
- package/serialization/resources/voices/types/UpdateVoiceRequest.js +17 -7
- package/serialization/resources/voices/types/Voice.d.ts +0 -2
- package/serialization/resources/voices/types/Voice.js +17 -9
- package/serialization/resources/voices/types/VoiceId.js +17 -7
- package/serialization/resources/voices/types/VoiceMetadata.js +17 -7
- package/serialization/resources/voices/types/Weight.js +17 -7
- package/serialization/resources/voices/types/index.d.ts +2 -0
- package/serialization/resources/voices/types/index.js +2 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/wrapper/WebPlayer.js +1 -1
- package/wrapper/Websocket.js +25 -15
- package/wrapper/source.js +1 -1
- package/wrapper/utils.d.ts +9 -9
- package/wrapper/utils.js +10 -10
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const fs = require("fs").promises;
|
|
4
|
+
const path = require("path");
|
|
5
|
+
|
|
6
|
+
const extensionMap = {
|
|
7
|
+
".js": ".mjs",
|
|
8
|
+
".d.ts": ".d.mts",
|
|
9
|
+
};
|
|
10
|
+
const oldExtensions = Object.keys(extensionMap);
|
|
11
|
+
|
|
12
|
+
async function findFiles(rootPath) {
|
|
13
|
+
const files = [];
|
|
14
|
+
|
|
15
|
+
async function scan(directory) {
|
|
16
|
+
const entries = await fs.readdir(directory, { withFileTypes: true });
|
|
17
|
+
|
|
18
|
+
for (const entry of entries) {
|
|
19
|
+
const fullPath = path.join(directory, entry.name);
|
|
20
|
+
|
|
21
|
+
if (entry.isDirectory()) {
|
|
22
|
+
if (entry.name !== "node_modules" && !entry.name.startsWith(".")) {
|
|
23
|
+
await scan(fullPath);
|
|
24
|
+
}
|
|
25
|
+
} else if (entry.isFile()) {
|
|
26
|
+
if (oldExtensions.some((ext) => entry.name.endsWith(ext))) {
|
|
27
|
+
files.push(fullPath);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
await scan(rootPath);
|
|
34
|
+
return files;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
async function updateFiles(files) {
|
|
38
|
+
const updatedFiles = [];
|
|
39
|
+
for (const file of files) {
|
|
40
|
+
const updated = await updateFileContents(file);
|
|
41
|
+
updatedFiles.push(updated);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
console.log(`Updated imports in ${updatedFiles.length} files.`);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
async function updateFileContents(file) {
|
|
48
|
+
const content = await fs.readFile(file, "utf8");
|
|
49
|
+
|
|
50
|
+
let newContent = content;
|
|
51
|
+
// Update each extension type defined in the map
|
|
52
|
+
for (const [oldExt, newExt] of Object.entries(extensionMap)) {
|
|
53
|
+
const regex = new RegExp(`(import|export)(.+from\\s+['"])(\\.\\.?\\/[^'"]+)(\\${oldExt})(['"])`, "g");
|
|
54
|
+
newContent = newContent.replace(regex, `$1$2$3${newExt}$5`);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
if (content !== newContent) {
|
|
58
|
+
await fs.writeFile(file, newContent, "utf8");
|
|
59
|
+
return true;
|
|
60
|
+
}
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
async function renameFiles(files) {
|
|
65
|
+
let counter = 0;
|
|
66
|
+
for (const file of files) {
|
|
67
|
+
const ext = oldExtensions.find((ext) => file.endsWith(ext));
|
|
68
|
+
const newExt = extensionMap[ext];
|
|
69
|
+
|
|
70
|
+
if (newExt) {
|
|
71
|
+
const newPath = file.slice(0, -ext.length) + newExt;
|
|
72
|
+
await fs.rename(file, newPath);
|
|
73
|
+
counter++;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
console.log(`Renamed ${counter} files.`);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
async function main() {
|
|
81
|
+
try {
|
|
82
|
+
const targetDir = process.argv[2];
|
|
83
|
+
if (!targetDir) {
|
|
84
|
+
console.error("Please provide a target directory");
|
|
85
|
+
process.exit(1);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
const targetPath = path.resolve(targetDir);
|
|
89
|
+
const targetStats = await fs.stat(targetPath);
|
|
90
|
+
|
|
91
|
+
if (!targetStats.isDirectory()) {
|
|
92
|
+
console.error("The provided path is not a directory");
|
|
93
|
+
process.exit(1);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
console.log(`Scanning directory: ${targetDir}`);
|
|
97
|
+
|
|
98
|
+
const files = await findFiles(targetDir);
|
|
99
|
+
|
|
100
|
+
if (files.length === 0) {
|
|
101
|
+
console.log("No matching files found.");
|
|
102
|
+
process.exit(0);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
console.log(`Found ${files.length} files.`);
|
|
106
|
+
await updateFiles(files);
|
|
107
|
+
await renameFiles(files);
|
|
108
|
+
console.log("\nDone!");
|
|
109
|
+
} catch (error) {
|
|
110
|
+
console.error("An error occurred:", error.message);
|
|
111
|
+
process.exit(1);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
main();
|
|
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
18
18
|
}) : function(o, v) {
|
|
19
19
|
o["default"] = v;
|
|
20
20
|
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
28
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
39
|
exports.ApiInfo = void 0;
|
|
30
40
|
const core = __importStar(require("../../../../core"));
|
|
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
18
18
|
}) : function(o, v) {
|
|
19
19
|
o["default"] = v;
|
|
20
20
|
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
28
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
39
|
exports.CreateDatasetRequest = void 0;
|
|
30
40
|
const core = __importStar(require("../../../../core"));
|
|
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
18
18
|
}) : function(o, v) {
|
|
19
19
|
o["default"] = v;
|
|
20
20
|
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
28
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
39
|
exports.Dataset = void 0;
|
|
30
40
|
const core = __importStar(require("../../../../core"));
|
|
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
18
18
|
}) : function(o, v) {
|
|
19
19
|
o["default"] = v;
|
|
20
20
|
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
28
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
39
|
exports.DatasetFile = void 0;
|
|
30
40
|
const core = __importStar(require("../../../../core"));
|
|
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
18
18
|
}) : function(o, v) {
|
|
19
19
|
o["default"] = v;
|
|
20
20
|
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
28
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
39
|
exports.FilePurpose = void 0;
|
|
30
40
|
const core = __importStar(require("../../../../core"));
|
|
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
18
18
|
}) : function(o, v) {
|
|
19
19
|
o["default"] = v;
|
|
20
20
|
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
28
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
39
|
exports.PaginatedDatasetFiles = void 0;
|
|
30
40
|
const core = __importStar(require("../../../../core"));
|
|
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
18
18
|
}) : function(o, v) {
|
|
19
19
|
o["default"] = v;
|
|
20
20
|
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
28
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
39
|
exports.PaginatedDatasets = void 0;
|
|
30
40
|
const core = __importStar(require("../../../../core"));
|
|
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
18
18
|
}) : function(o, v) {
|
|
19
19
|
o["default"] = v;
|
|
20
20
|
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
28
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
39
|
exports.Embedding = void 0;
|
|
30
40
|
const core = __importStar(require("../../../../core"));
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
26
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
37
|
};
|
|
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
18
18
|
}) : function(o, v) {
|
|
19
19
|
o["default"] = v;
|
|
20
20
|
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
28
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
39
|
exports.CancelContextRequest = void 0;
|
|
30
40
|
const core = __importStar(require("../../../../core"));
|
|
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
18
18
|
}) : function(o, v) {
|
|
19
19
|
o["default"] = v;
|
|
20
20
|
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
28
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
39
|
exports.ContextId = void 0;
|
|
30
40
|
const core = __importStar(require("../../../../core"));
|
|
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
18
18
|
}) : function(o, v) {
|
|
19
19
|
o["default"] = v;
|
|
20
20
|
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
28
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
39
|
exports.Controls = void 0;
|
|
30
40
|
const core = __importStar(require("../../../../core"));
|
|
@@ -6,5 +6,5 @@ import * as Cartesia from "../../../../api/index";
|
|
|
6
6
|
import * as core from "../../../../core";
|
|
7
7
|
export declare const Emotion: core.serialization.Schema<serializers.Emotion.Raw, Cartesia.Emotion>;
|
|
8
8
|
export declare namespace Emotion {
|
|
9
|
-
type Raw = "anger:lowest" | "anger:low" | "anger:high" | "anger:highest" | "positivity:lowest" | "positivity:low" | "positivity:high" | "positivity:highest" | "surprise:lowest" | "surprise:high" | "surprise:highest" | "sadness:lowest" | "sadness:low" | "curiosity:low" | "curiosity:high" | "curiosity:highest";
|
|
9
|
+
type Raw = "anger:lowest" | "anger:low" | "anger:high" | "anger:highest" | "positivity:lowest" | "positivity:low" | "positivity:high" | "positivity:highest" | "surprise:lowest" | "surprise:low" | "surprise:high" | "surprise:highest" | "sadness:lowest" | "sadness:low" | "sadness:high" | "sadness:highest" | "curiosity:lowest" | "curiosity:low" | "curiosity:high" | "curiosity:highest";
|
|
10
10
|
}
|
|
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
18
18
|
}) : function(o, v) {
|
|
19
19
|
o["default"] = v;
|
|
20
20
|
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
28
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
39
|
exports.Emotion = void 0;
|
|
30
40
|
const core = __importStar(require("../../../../core"));
|
|
@@ -38,10 +48,14 @@ exports.Emotion = core.serialization.enum_([
|
|
|
38
48
|
"positivity:high",
|
|
39
49
|
"positivity:highest",
|
|
40
50
|
"surprise:lowest",
|
|
51
|
+
"surprise:low",
|
|
41
52
|
"surprise:high",
|
|
42
53
|
"surprise:highest",
|
|
43
54
|
"sadness:lowest",
|
|
44
55
|
"sadness:low",
|
|
56
|
+
"sadness:high",
|
|
57
|
+
"sadness:highest",
|
|
58
|
+
"curiosity:lowest",
|
|
45
59
|
"curiosity:low",
|
|
46
60
|
"curiosity:high",
|
|
47
61
|
"curiosity:highest",
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as serializers from "../../../index";
|
|
5
|
+
import * as Cartesia from "../../../../api/index";
|
|
6
|
+
import * as core from "../../../../core";
|
|
7
|
+
export declare const FlushId: core.serialization.Schema<serializers.FlushId.Raw, Cartesia.FlushId>;
|
|
8
|
+
export declare namespace FlushId {
|
|
9
|
+
type Raw = number;
|
|
10
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.FlushId = void 0;
|
|
40
|
+
const core = __importStar(require("../../../../core"));
|
|
41
|
+
exports.FlushId = core.serialization.number();
|
|
@@ -12,13 +12,15 @@ export declare const GenerationRequest: core.serialization.ObjectSchema<serializ
|
|
|
12
12
|
export declare namespace GenerationRequest {
|
|
13
13
|
interface Raw {
|
|
14
14
|
model_id: string;
|
|
15
|
-
transcript
|
|
15
|
+
transcript?: unknown;
|
|
16
16
|
voice: TtsRequestVoiceSpecifier.Raw;
|
|
17
17
|
language?: SupportedLanguage.Raw | null;
|
|
18
18
|
output_format: WebSocketRawOutputFormat.Raw;
|
|
19
19
|
duration?: number | null;
|
|
20
|
-
context_id
|
|
20
|
+
context_id?: ContextId.Raw | null;
|
|
21
21
|
continue?: boolean | null;
|
|
22
|
+
flush?: boolean | null;
|
|
22
23
|
add_timestamps?: boolean | null;
|
|
24
|
+
add_phoneme_timestamps?: boolean | null;
|
|
23
25
|
}
|
|
24
26
|
}
|