hume 0.1.0 → 0.2.4
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 +42 -0
- package/Client.js +291 -0
- package/README.md +135 -1
- package/api/client/index.d.ts +1 -0
- package/api/client/index.js +17 -0
- package/api/client/requests/BaseRequest.d.ts +18 -0
- package/api/client/requests/BaseRequest.js +5 -0
- package/api/client/requests/ListJobsRequest.d.ts +30 -0
- package/api/client/requests/ListJobsRequest.js +5 -0
- package/api/client/requests/index.d.ts +2 -0
- package/api/client/requests/index.js +2 -0
- package/api/index.d.ts +2 -0
- package/api/index.js +18 -0
- package/api/types/Bcp47Tag.d.ts +35 -0
- package/api/types/Bcp47Tag.js +37 -0
- package/api/types/BoundingBox.d.ts +16 -0
- package/api/types/BoundingBox.js +5 -0
- package/api/types/BurstPrediction.d.ts +11 -0
- package/api/types/BurstPrediction.js +5 -0
- package/api/types/BurstResponse.d.ts +10 -0
- package/api/types/BurstResponse.js +5 -0
- package/api/types/Completed.d.ts +15 -0
- package/api/types/Completed.js +5 -0
- package/api/types/DescriptionsScore.d.ts +9 -0
- package/api/types/DescriptionsScore.js +5 -0
- package/api/types/Direction.d.ts +8 -0
- package/api/types/Direction.js +10 -0
- package/api/types/EmotionEmbedding.d.ts +8 -0
- package/api/types/EmotionEmbedding.js +5 -0
- package/api/types/EmotionEmbeddingItem.d.ts +9 -0
- package/api/types/EmotionEmbeddingItem.js +5 -0
- package/api/types/EmotionScore.d.ts +9 -0
- package/api/types/EmotionScore.js +5 -0
- package/api/types/Empty.d.ts +7 -0
- package/api/types/Empty.js +5 -0
- package/api/types/Error_.d.ts +9 -0
- package/api/types/Error_.js +5 -0
- package/api/types/Face.d.ts +18 -0
- package/api/types/Face.js +5 -0
- package/api/types/FaceModelConfig.d.ts +35 -0
- package/api/types/FaceModelConfig.js +5 -0
- package/api/types/FacePrediction.d.ts +19 -0
- package/api/types/FacePrediction.js +5 -0
- package/api/types/FaceResponse.d.ts +10 -0
- package/api/types/FaceResponse.js +5 -0
- package/api/types/FacemeshPrediction.d.ts +8 -0
- package/api/types/FacemeshPrediction.js +5 -0
- package/api/types/FacemeshResponse.d.ts +10 -0
- package/api/types/FacemeshResponse.js +5 -0
- package/api/types/FacsScore.d.ts +9 -0
- package/api/types/FacsScore.js +5 -0
- package/api/types/Failed.d.ts +13 -0
- package/api/types/Failed.js +5 -0
- package/api/types/File_.d.ts +11 -0
- package/api/types/File_.js +5 -0
- package/api/types/Granularity.d.ts +13 -0
- package/api/types/Granularity.js +12 -0
- package/api/types/GroupedPredictionsBurstPrediction.d.ts +9 -0
- package/api/types/GroupedPredictionsBurstPrediction.js +5 -0
- package/api/types/GroupedPredictionsFacePrediction.d.ts +9 -0
- package/api/types/GroupedPredictionsFacePrediction.js +5 -0
- package/api/types/GroupedPredictionsFacemeshPrediction.d.ts +9 -0
- package/api/types/GroupedPredictionsFacemeshPrediction.js +5 -0
- package/api/types/GroupedPredictionsLanguagePrediction.d.ts +9 -0
- package/api/types/GroupedPredictionsLanguagePrediction.js +5 -0
- package/api/types/GroupedPredictionsNerPrediction.d.ts +9 -0
- package/api/types/GroupedPredictionsNerPrediction.js +5 -0
- package/api/types/GroupedPredictionsProsodyPrediction.d.ts +9 -0
- package/api/types/GroupedPredictionsProsodyPrediction.js +5 -0
- package/api/types/InProgress.d.ts +9 -0
- package/api/types/InProgress.js +5 -0
- package/api/types/JobId.d.ts +7 -0
- package/api/types/JobId.js +5 -0
- package/api/types/JobRequest.d.ts +10 -0
- package/api/types/JobRequest.js +5 -0
- package/api/types/Language.d.ts +11 -0
- package/api/types/Language.js +5 -0
- package/api/types/LanguageConfig.d.ts +14 -0
- package/api/types/LanguageConfig.js +5 -0
- package/api/types/LanguagePrediction.d.ts +24 -0
- package/api/types/LanguagePrediction.js +5 -0
- package/api/types/LanguageResponse.d.ts +10 -0
- package/api/types/LanguageResponse.js +5 -0
- package/api/types/ModelConfig.d.ts +46 -0
- package/api/types/ModelConfig.js +5 -0
- package/api/types/ModelResponse.d.ts +16 -0
- package/api/types/ModelResponse.js +5 -0
- package/api/types/Models.d.ts +12 -0
- package/api/types/Models.js +5 -0
- package/api/types/ModelsError.d.ts +9 -0
- package/api/types/ModelsError.js +5 -0
- package/api/types/ModelsInput.d.ts +56 -0
- package/api/types/ModelsInput.js +5 -0
- package/api/types/ModelsPredictions.d.ts +12 -0
- package/api/types/ModelsPredictions.js +5 -0
- package/api/types/ModelsSuccessBurstPredictionsItem.d.ts +8 -0
- package/api/types/ModelsSuccessBurstPredictionsItem.js +5 -0
- package/api/types/ModelsSuccessFacePredictionsItem.d.ts +18 -0
- package/api/types/ModelsSuccessFacePredictionsItem.js +5 -0
- package/api/types/ModelsSuccessFacemeshPredictionsItem.d.ts +7 -0
- package/api/types/ModelsSuccessFacemeshPredictionsItem.js +5 -0
- package/api/types/ModelsSuccessLanguagePredictionsItem.d.ts +12 -0
- package/api/types/ModelsSuccessLanguagePredictionsItem.js +5 -0
- package/api/types/ModelsSuccessProsodyPredictionsItem.d.ts +8 -0
- package/api/types/ModelsSuccessProsodyPredictionsItem.js +5 -0
- package/api/types/ModelsWarning.d.ts +9 -0
- package/api/types/ModelsWarning.js +5 -0
- package/api/types/Ner.d.ts +7 -0
- package/api/types/Ner.js +5 -0
- package/api/types/NerPrediction.d.ts +24 -0
- package/api/types/NerPrediction.js +5 -0
- package/api/types/Null.d.ts +7 -0
- package/api/types/Null.js +5 -0
- package/api/types/PositionInterval.d.ts +12 -0
- package/api/types/PositionInterval.js +5 -0
- package/api/types/Prediction.d.ts +9 -0
- package/api/types/Prediction.js +5 -0
- package/api/types/PredictionsOptionalNullBurstPrediction.d.ts +8 -0
- package/api/types/PredictionsOptionalNullBurstPrediction.js +5 -0
- package/api/types/PredictionsOptionalNullFacePrediction.d.ts +8 -0
- package/api/types/PredictionsOptionalNullFacePrediction.js +5 -0
- package/api/types/PredictionsOptionalNullFacemeshPrediction.d.ts +8 -0
- package/api/types/PredictionsOptionalNullFacemeshPrediction.js +5 -0
- package/api/types/PredictionsOptionalTranscriptionMetadataLanguagePrediction.d.ts +8 -0
- package/api/types/PredictionsOptionalTranscriptionMetadataLanguagePrediction.js +5 -0
- package/api/types/PredictionsOptionalTranscriptionMetadataNerPrediction.d.ts +8 -0
- package/api/types/PredictionsOptionalTranscriptionMetadataNerPrediction.js +5 -0
- package/api/types/PredictionsOptionalTranscriptionMetadataProsodyPrediction.d.ts +8 -0
- package/api/types/PredictionsOptionalTranscriptionMetadataProsodyPrediction.js +5 -0
- package/api/types/Prosody.d.ts +13 -0
- package/api/types/Prosody.js +5 -0
- package/api/types/ProsodyPrediction.d.ts +15 -0
- package/api/types/ProsodyPrediction.js +5 -0
- package/api/types/ProsodyResponse.d.ts +10 -0
- package/api/types/ProsodyResponse.js +5 -0
- package/api/types/Queued.d.ts +7 -0
- package/api/types/Queued.js +5 -0
- package/api/types/Request.d.ts +19 -0
- package/api/types/Request.js +5 -0
- package/api/types/Results.d.ts +8 -0
- package/api/types/Results.js +5 -0
- package/api/types/Sentiment.d.ts +10 -0
- package/api/types/Sentiment.js +5 -0
- package/api/types/SentimentItem.d.ts +9 -0
- package/api/types/SentimentItem.js +5 -0
- package/api/types/SentimentScore.d.ts +9 -0
- package/api/types/SentimentScore.js +5 -0
- package/api/types/SortBy.d.ts +9 -0
- package/api/types/SortBy.js +11 -0
- package/api/types/Source.d.ts +13 -0
- package/api/types/Source.js +5 -0
- package/api/types/SourceFile.d.ts +5 -0
- package/api/types/SourceFile.js +5 -0
- package/api/types/SourceResult.d.ts +10 -0
- package/api/types/SourceResult.js +5 -0
- package/api/types/SourceUrl.d.ts +5 -0
- package/api/types/SourceUrl.js +5 -0
- package/api/types/State.d.ts +19 -0
- package/api/types/State.js +5 -0
- package/api/types/StateCompleted.d.ts +5 -0
- package/api/types/StateCompleted.js +5 -0
- package/api/types/StateFailed.d.ts +5 -0
- package/api/types/StateFailed.js +5 -0
- package/api/types/StateInProgress.d.ts +5 -0
- package/api/types/StateInProgress.js +5 -0
- package/api/types/StateQueued.d.ts +5 -0
- package/api/types/StateQueued.js +5 -0
- package/api/types/Status.d.ts +10 -0
- package/api/types/Status.js +12 -0
- package/api/types/TextPosition.d.ts +13 -0
- package/api/types/TextPosition.js +5 -0
- package/api/types/TimeInterval.d.ts +12 -0
- package/api/types/TimeInterval.js +5 -0
- package/api/types/TimeRange.d.ts +12 -0
- package/api/types/TimeRange.js +5 -0
- package/api/types/Toxicity.d.ts +8 -0
- package/api/types/Toxicity.js +5 -0
- package/api/types/ToxicityItem.d.ts +9 -0
- package/api/types/ToxicityItem.js +5 -0
- package/api/types/ToxicityScore.d.ts +9 -0
- package/api/types/ToxicityScore.js +5 -0
- package/api/types/Transcription.d.ts +7 -0
- package/api/types/Transcription.js +5 -0
- package/api/types/TranscriptionMetadata.d.ts +12 -0
- package/api/types/TranscriptionMetadata.js +5 -0
- package/api/types/Url.d.ts +7 -0
- package/api/types/Url.js +5 -0
- package/api/types/When.d.ts +8 -0
- package/api/types/When.js +10 -0
- package/api/types/Window.d.ts +9 -0
- package/api/types/Window.js +5 -0
- package/api/types/index.d.ts +89 -0
- package/api/types/index.js +105 -0
- package/core/fetcher/APIResponse.d.ts +9 -0
- package/core/fetcher/APIResponse.js +2 -0
- package/core/fetcher/Fetcher.d.ts +38 -0
- package/core/fetcher/Fetcher.js +129 -0
- package/core/fetcher/Supplier.d.ts +4 -0
- package/core/fetcher/Supplier.js +22 -0
- package/core/fetcher/index.d.ts +4 -0
- package/core/fetcher/index.js +7 -0
- package/core/index.d.ts +3 -0
- package/core/index.js +32 -0
- package/core/schemas/Schema.d.ts +81 -0
- package/core/schemas/Schema.js +21 -0
- package/core/schemas/builders/date/date.d.ts +2 -0
- package/core/schemas/builders/date/date.js +63 -0
- package/core/schemas/builders/date/index.d.ts +1 -0
- package/core/schemas/builders/date/index.js +5 -0
- package/core/schemas/builders/enum/enum.d.ts +2 -0
- package/core/schemas/builders/enum/enum.js +39 -0
- package/core/schemas/builders/enum/index.d.ts +1 -0
- package/core/schemas/builders/enum/index.js +5 -0
- package/core/schemas/builders/index.d.ts +13 -0
- package/core/schemas/builders/index.js +29 -0
- package/core/schemas/builders/lazy/index.d.ts +3 -0
- package/core/schemas/builders/lazy/index.js +7 -0
- package/core/schemas/builders/lazy/lazy.d.ts +5 -0
- package/core/schemas/builders/lazy/lazy.js +36 -0
- package/core/schemas/builders/lazy/lazyObject.d.ts +3 -0
- package/core/schemas/builders/lazy/lazyObject.js +21 -0
- package/core/schemas/builders/list/index.d.ts +1 -0
- package/core/schemas/builders/list/index.js +5 -0
- package/core/schemas/builders/list/list.d.ts +2 -0
- package/core/schemas/builders/list/list.js +68 -0
- package/core/schemas/builders/literals/booleanLiteral.d.ts +2 -0
- package/core/schemas/builders/literals/booleanLiteral.js +29 -0
- package/core/schemas/builders/literals/index.d.ts +2 -0
- package/core/schemas/builders/literals/index.js +7 -0
- package/core/schemas/builders/literals/stringLiteral.d.ts +2 -0
- package/core/schemas/builders/literals/stringLiteral.js +29 -0
- package/core/schemas/builders/object/index.d.ts +6 -0
- package/core/schemas/builders/object/index.js +11 -0
- package/core/schemas/builders/object/object.d.ts +3 -0
- package/core/schemas/builders/object/object.js +258 -0
- package/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +6 -0
- package/core/schemas/builders/object/objectWithoutOptionalProperties.js +8 -0
- package/core/schemas/builders/object/property.d.ts +8 -0
- package/core/schemas/builders/object/property.js +16 -0
- package/core/schemas/builders/object/types.d.ts +26 -0
- package/core/schemas/builders/object/types.js +2 -0
- package/core/schemas/builders/object-like/getObjectLikeUtils.d.ts +9 -0
- package/core/schemas/builders/object-like/getObjectLikeUtils.js +63 -0
- package/core/schemas/builders/object-like/index.d.ts +2 -0
- package/core/schemas/builders/object-like/index.js +6 -0
- package/core/schemas/builders/object-like/types.d.ts +7 -0
- package/core/schemas/builders/object-like/types.js +2 -0
- package/core/schemas/builders/primitives/any.d.ts +1 -0
- package/core/schemas/builders/primitives/any.js +6 -0
- package/core/schemas/builders/primitives/boolean.d.ts +1 -0
- package/core/schemas/builders/primitives/boolean.js +25 -0
- package/core/schemas/builders/primitives/index.d.ts +5 -0
- package/core/schemas/builders/primitives/index.js +13 -0
- package/core/schemas/builders/primitives/number.d.ts +1 -0
- package/core/schemas/builders/primitives/number.js +25 -0
- package/core/schemas/builders/primitives/string.d.ts +1 -0
- package/core/schemas/builders/primitives/string.js +25 -0
- package/core/schemas/builders/primitives/unknown.d.ts +1 -0
- package/core/schemas/builders/primitives/unknown.js +6 -0
- package/core/schemas/builders/record/index.d.ts +2 -0
- package/core/schemas/builders/record/index.js +5 -0
- package/core/schemas/builders/record/record.d.ts +3 -0
- package/core/schemas/builders/record/record.js +106 -0
- package/core/schemas/builders/record/types.d.ts +4 -0
- package/core/schemas/builders/record/types.js +2 -0
- package/core/schemas/builders/schema-utils/JsonError.d.ts +5 -0
- package/core/schemas/builders/schema-utils/JsonError.js +12 -0
- package/core/schemas/builders/schema-utils/ParseError.d.ts +5 -0
- package/core/schemas/builders/schema-utils/ParseError.js +12 -0
- package/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +17 -0
- package/core/schemas/builders/schema-utils/getSchemaUtils.js +85 -0
- package/core/schemas/builders/schema-utils/index.d.ts +4 -0
- package/core/schemas/builders/schema-utils/index.js +11 -0
- package/core/schemas/builders/schema-utils/stringifyValidationErrors.d.ts +2 -0
- package/core/schemas/builders/schema-utils/stringifyValidationErrors.js +10 -0
- package/core/schemas/builders/set/index.d.ts +1 -0
- package/core/schemas/builders/set/index.js +5 -0
- package/core/schemas/builders/set/set.d.ts +2 -0
- package/core/schemas/builders/set/set.js +53 -0
- package/core/schemas/builders/undiscriminated-union/index.d.ts +2 -0
- package/core/schemas/builders/undiscriminated-union/index.js +5 -0
- package/core/schemas/builders/undiscriminated-union/types.d.ts +4 -0
- package/core/schemas/builders/undiscriminated-union/types.js +2 -0
- package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.d.ts +3 -0
- package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +51 -0
- package/core/schemas/builders/union/discriminant.d.ts +5 -0
- package/core/schemas/builders/union/discriminant.js +10 -0
- package/core/schemas/builders/union/index.d.ts +4 -0
- package/core/schemas/builders/union/index.js +7 -0
- package/core/schemas/builders/union/types.d.ts +13 -0
- package/core/schemas/builders/union/types.js +2 -0
- package/core/schemas/builders/union/union.d.ts +4 -0
- package/core/schemas/builders/union/union.js +141 -0
- package/core/schemas/index.d.ts +2 -0
- package/core/schemas/index.js +17 -0
- package/core/schemas/utils/MaybePromise.d.ts +1 -0
- package/core/schemas/utils/MaybePromise.js +2 -0
- package/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +7 -0
- package/core/schemas/utils/addQuestionMarksToNullableProperties.js +2 -0
- package/core/schemas/utils/createIdentitySchemaCreator.d.ts +2 -0
- package/core/schemas/utils/createIdentitySchemaCreator.js +16 -0
- package/core/schemas/utils/entries.d.ts +1 -0
- package/core/schemas/utils/entries.js +7 -0
- package/core/schemas/utils/filterObject.d.ts +1 -0
- package/core/schemas/utils/filterObject.js +14 -0
- package/core/schemas/utils/getErrorMessageForIncorrectType.d.ts +1 -0
- package/core/schemas/utils/getErrorMessageForIncorrectType.js +24 -0
- package/core/schemas/utils/isPlainObject.d.ts +1 -0
- package/core/schemas/utils/isPlainObject.js +18 -0
- package/core/schemas/utils/keys.d.ts +1 -0
- package/core/schemas/utils/keys.js +7 -0
- package/core/schemas/utils/maybeSkipValidation.d.ts +2 -0
- package/core/schemas/utils/maybeSkipValidation.js +37 -0
- package/core/schemas/utils/partition.d.ts +1 -0
- package/core/schemas/utils/partition.js +16 -0
- package/core/streaming-fetcher/Stream.d.ts +14 -0
- package/core/streaming-fetcher/Stream.js +75 -0
- package/core/streaming-fetcher/StreamingFetcher.d.ts +24 -0
- package/core/streaming-fetcher/StreamingFetcher.js +58 -0
- package/core/streaming-fetcher/getHeader.d.ts +2 -0
- package/core/streaming-fetcher/getHeader.js +12 -0
- package/core/streaming-fetcher/index.d.ts +4 -0
- package/core/streaming-fetcher/index.js +9 -0
- package/dist/Client.d.ts +42 -0
- package/dist/Client.js +291 -0
- package/dist/api/client/index.d.ts +1 -0
- package/dist/api/client/index.js +17 -0
- package/dist/api/client/requests/BaseRequest.d.ts +18 -0
- package/dist/api/client/requests/BaseRequest.js +5 -0
- package/dist/api/client/requests/ListJobsRequest.d.ts +30 -0
- package/dist/api/client/requests/ListJobsRequest.js +5 -0
- package/dist/api/client/requests/index.d.ts +2 -0
- package/dist/api/client/requests/index.js +2 -0
- package/dist/api/index.d.ts +2 -0
- package/dist/api/index.js +18 -0
- package/dist/api/types/Bcp47Tag.d.ts +35 -0
- package/dist/api/types/Bcp47Tag.js +37 -0
- package/dist/api/types/BoundingBox.d.ts +16 -0
- package/dist/api/types/BoundingBox.js +5 -0
- package/dist/api/types/BurstPrediction.d.ts +11 -0
- package/dist/api/types/BurstPrediction.js +5 -0
- package/dist/api/types/BurstResponse.d.ts +10 -0
- package/dist/api/types/BurstResponse.js +5 -0
- package/dist/api/types/Completed.d.ts +15 -0
- package/dist/api/types/Completed.js +5 -0
- package/dist/api/types/DescriptionsScore.d.ts +9 -0
- package/dist/api/types/DescriptionsScore.js +5 -0
- package/dist/api/types/Direction.d.ts +8 -0
- package/dist/api/types/Direction.js +10 -0
- package/dist/api/types/EmotionEmbedding.d.ts +8 -0
- package/dist/api/types/EmotionEmbedding.js +5 -0
- package/dist/api/types/EmotionEmbeddingItem.d.ts +9 -0
- package/dist/api/types/EmotionEmbeddingItem.js +5 -0
- package/dist/api/types/EmotionScore.d.ts +9 -0
- package/dist/api/types/EmotionScore.js +5 -0
- package/dist/api/types/Empty.d.ts +7 -0
- package/dist/api/types/Empty.js +5 -0
- package/dist/api/types/Error_.d.ts +9 -0
- package/dist/api/types/Error_.js +5 -0
- package/dist/api/types/Face.d.ts +18 -0
- package/dist/api/types/Face.js +5 -0
- package/dist/api/types/FaceModelConfig.d.ts +35 -0
- package/dist/api/types/FaceModelConfig.js +5 -0
- package/dist/api/types/FacePrediction.d.ts +19 -0
- package/dist/api/types/FacePrediction.js +5 -0
- package/dist/api/types/FaceResponse.d.ts +10 -0
- package/dist/api/types/FaceResponse.js +5 -0
- package/dist/api/types/FacemeshPrediction.d.ts +8 -0
- package/dist/api/types/FacemeshPrediction.js +5 -0
- package/dist/api/types/FacemeshResponse.d.ts +10 -0
- package/dist/api/types/FacemeshResponse.js +5 -0
- package/dist/api/types/FacsScore.d.ts +9 -0
- package/dist/api/types/FacsScore.js +5 -0
- package/dist/api/types/Failed.d.ts +13 -0
- package/dist/api/types/Failed.js +5 -0
- package/dist/api/types/File_.d.ts +11 -0
- package/dist/api/types/File_.js +5 -0
- package/dist/api/types/Granularity.d.ts +13 -0
- package/dist/api/types/Granularity.js +12 -0
- package/dist/api/types/GroupedPredictionsBurstPrediction.d.ts +9 -0
- package/dist/api/types/GroupedPredictionsBurstPrediction.js +5 -0
- package/dist/api/types/GroupedPredictionsFacePrediction.d.ts +9 -0
- package/dist/api/types/GroupedPredictionsFacePrediction.js +5 -0
- package/dist/api/types/GroupedPredictionsFacemeshPrediction.d.ts +9 -0
- package/dist/api/types/GroupedPredictionsFacemeshPrediction.js +5 -0
- package/dist/api/types/GroupedPredictionsLanguagePrediction.d.ts +9 -0
- package/dist/api/types/GroupedPredictionsLanguagePrediction.js +5 -0
- package/dist/api/types/GroupedPredictionsNerPrediction.d.ts +9 -0
- package/dist/api/types/GroupedPredictionsNerPrediction.js +5 -0
- package/dist/api/types/GroupedPredictionsProsodyPrediction.d.ts +9 -0
- package/dist/api/types/GroupedPredictionsProsodyPrediction.js +5 -0
- package/dist/api/types/InProgress.d.ts +9 -0
- package/dist/api/types/InProgress.js +5 -0
- package/dist/api/types/JobId.d.ts +7 -0
- package/dist/api/types/JobId.js +5 -0
- package/dist/api/types/JobRequest.d.ts +10 -0
- package/dist/api/types/JobRequest.js +5 -0
- package/dist/api/types/Language.d.ts +11 -0
- package/dist/api/types/Language.js +5 -0
- package/dist/api/types/LanguageConfig.d.ts +14 -0
- package/dist/api/types/LanguageConfig.js +5 -0
- package/dist/api/types/LanguagePrediction.d.ts +24 -0
- package/dist/api/types/LanguagePrediction.js +5 -0
- package/dist/api/types/LanguageResponse.d.ts +10 -0
- package/dist/api/types/LanguageResponse.js +5 -0
- package/dist/api/types/ModelConfig.d.ts +46 -0
- package/dist/api/types/ModelConfig.js +5 -0
- package/dist/api/types/ModelResponse.d.ts +16 -0
- package/dist/api/types/ModelResponse.js +5 -0
- package/dist/api/types/Models.d.ts +12 -0
- package/dist/api/types/Models.js +5 -0
- package/dist/api/types/ModelsError.d.ts +9 -0
- package/dist/api/types/ModelsError.js +5 -0
- package/dist/api/types/ModelsInput.d.ts +56 -0
- package/dist/api/types/ModelsInput.js +5 -0
- package/dist/api/types/ModelsPredictions.d.ts +12 -0
- package/dist/api/types/ModelsPredictions.js +5 -0
- package/dist/api/types/ModelsSuccessBurstPredictionsItem.d.ts +8 -0
- package/dist/api/types/ModelsSuccessBurstPredictionsItem.js +5 -0
- package/dist/api/types/ModelsSuccessFacePredictionsItem.d.ts +18 -0
- package/dist/api/types/ModelsSuccessFacePredictionsItem.js +5 -0
- package/dist/api/types/ModelsSuccessFacemeshPredictionsItem.d.ts +7 -0
- package/dist/api/types/ModelsSuccessFacemeshPredictionsItem.js +5 -0
- package/dist/api/types/ModelsSuccessLanguagePredictionsItem.d.ts +12 -0
- package/dist/api/types/ModelsSuccessLanguagePredictionsItem.js +5 -0
- package/dist/api/types/ModelsSuccessProsodyPredictionsItem.d.ts +8 -0
- package/dist/api/types/ModelsSuccessProsodyPredictionsItem.js +5 -0
- package/dist/api/types/ModelsWarning.d.ts +9 -0
- package/dist/api/types/ModelsWarning.js +5 -0
- package/dist/api/types/Ner.d.ts +7 -0
- package/dist/api/types/Ner.js +5 -0
- package/dist/api/types/NerPrediction.d.ts +24 -0
- package/dist/api/types/NerPrediction.js +5 -0
- package/dist/api/types/Null.d.ts +7 -0
- package/dist/api/types/Null.js +5 -0
- package/dist/api/types/PositionInterval.d.ts +12 -0
- package/dist/api/types/PositionInterval.js +5 -0
- package/dist/api/types/Prediction.d.ts +9 -0
- package/dist/api/types/Prediction.js +5 -0
- package/dist/api/types/PredictionsOptionalNullBurstPrediction.d.ts +8 -0
- package/dist/api/types/PredictionsOptionalNullBurstPrediction.js +5 -0
- package/dist/api/types/PredictionsOptionalNullFacePrediction.d.ts +8 -0
- package/dist/api/types/PredictionsOptionalNullFacePrediction.js +5 -0
- package/dist/api/types/PredictionsOptionalNullFacemeshPrediction.d.ts +8 -0
- package/dist/api/types/PredictionsOptionalNullFacemeshPrediction.js +5 -0
- package/dist/api/types/PredictionsOptionalTranscriptionMetadataLanguagePrediction.d.ts +8 -0
- package/dist/api/types/PredictionsOptionalTranscriptionMetadataLanguagePrediction.js +5 -0
- package/dist/api/types/PredictionsOptionalTranscriptionMetadataNerPrediction.d.ts +8 -0
- package/dist/api/types/PredictionsOptionalTranscriptionMetadataNerPrediction.js +5 -0
- package/dist/api/types/PredictionsOptionalTranscriptionMetadataProsodyPrediction.d.ts +8 -0
- package/dist/api/types/PredictionsOptionalTranscriptionMetadataProsodyPrediction.js +5 -0
- package/dist/api/types/Prosody.d.ts +13 -0
- package/dist/api/types/Prosody.js +5 -0
- package/dist/api/types/ProsodyPrediction.d.ts +15 -0
- package/dist/api/types/ProsodyPrediction.js +5 -0
- package/dist/api/types/ProsodyResponse.d.ts +10 -0
- package/dist/api/types/ProsodyResponse.js +5 -0
- package/dist/api/types/Queued.d.ts +7 -0
- package/dist/api/types/Queued.js +5 -0
- package/dist/api/types/Request.d.ts +19 -0
- package/dist/api/types/Request.js +5 -0
- package/dist/api/types/Results.d.ts +8 -0
- package/dist/api/types/Results.js +5 -0
- package/dist/api/types/Sentiment.d.ts +10 -0
- package/dist/api/types/Sentiment.js +5 -0
- package/dist/api/types/SentimentItem.d.ts +9 -0
- package/dist/api/types/SentimentItem.js +5 -0
- package/dist/api/types/SentimentScore.d.ts +9 -0
- package/dist/api/types/SentimentScore.js +5 -0
- package/dist/api/types/SortBy.d.ts +9 -0
- package/dist/api/types/SortBy.js +11 -0
- package/dist/api/types/Source.d.ts +13 -0
- package/dist/api/types/Source.js +5 -0
- package/dist/api/types/SourceFile.d.ts +5 -0
- package/dist/api/types/SourceFile.js +5 -0
- package/dist/api/types/SourceResult.d.ts +10 -0
- package/dist/api/types/SourceResult.js +5 -0
- package/dist/api/types/SourceUrl.d.ts +5 -0
- package/dist/api/types/SourceUrl.js +5 -0
- package/dist/api/types/State.d.ts +19 -0
- package/dist/api/types/State.js +5 -0
- package/dist/api/types/StateCompleted.d.ts +5 -0
- package/dist/api/types/StateCompleted.js +5 -0
- package/dist/api/types/StateFailed.d.ts +5 -0
- package/dist/api/types/StateFailed.js +5 -0
- package/dist/api/types/StateInProgress.d.ts +5 -0
- package/dist/api/types/StateInProgress.js +5 -0
- package/dist/api/types/StateQueued.d.ts +5 -0
- package/dist/api/types/StateQueued.js +5 -0
- package/dist/api/types/Status.d.ts +10 -0
- package/dist/api/types/Status.js +12 -0
- package/dist/api/types/TextPosition.d.ts +13 -0
- package/dist/api/types/TextPosition.js +5 -0
- package/dist/api/types/TimeInterval.d.ts +12 -0
- package/dist/api/types/TimeInterval.js +5 -0
- package/dist/api/types/TimeRange.d.ts +12 -0
- package/dist/api/types/TimeRange.js +5 -0
- package/dist/api/types/Toxicity.d.ts +8 -0
- package/dist/api/types/Toxicity.js +5 -0
- package/dist/api/types/ToxicityItem.d.ts +9 -0
- package/dist/api/types/ToxicityItem.js +5 -0
- package/dist/api/types/ToxicityScore.d.ts +9 -0
- package/dist/api/types/ToxicityScore.js +5 -0
- package/dist/api/types/Transcription.d.ts +7 -0
- package/dist/api/types/Transcription.js +5 -0
- package/dist/api/types/TranscriptionMetadata.d.ts +12 -0
- package/dist/api/types/TranscriptionMetadata.js +5 -0
- package/dist/api/types/Url.d.ts +7 -0
- package/dist/api/types/Url.js +5 -0
- package/dist/api/types/When.d.ts +8 -0
- package/dist/api/types/When.js +10 -0
- package/dist/api/types/Window.d.ts +9 -0
- package/dist/api/types/Window.js +5 -0
- package/dist/api/types/index.d.ts +89 -0
- package/dist/api/types/index.js +105 -0
- package/dist/core/fetcher/APIResponse.d.ts +9 -0
- package/dist/core/fetcher/APIResponse.js +2 -0
- package/dist/core/fetcher/Fetcher.d.ts +38 -0
- package/dist/core/fetcher/Fetcher.js +129 -0
- package/dist/core/fetcher/Supplier.d.ts +4 -0
- package/dist/core/fetcher/Supplier.js +22 -0
- package/dist/core/fetcher/index.d.ts +4 -0
- package/dist/core/fetcher/index.js +7 -0
- package/dist/core/index.d.ts +3 -0
- package/dist/core/index.js +32 -0
- package/dist/core/schemas/Schema.d.ts +81 -0
- package/dist/core/schemas/Schema.js +21 -0
- package/dist/core/schemas/builders/date/date.d.ts +2 -0
- package/dist/core/schemas/builders/date/date.js +63 -0
- package/dist/core/schemas/builders/date/index.d.ts +1 -0
- package/dist/core/schemas/builders/date/index.js +5 -0
- package/dist/core/schemas/builders/enum/enum.d.ts +2 -0
- package/dist/core/schemas/builders/enum/enum.js +39 -0
- package/dist/core/schemas/builders/enum/index.d.ts +1 -0
- package/dist/core/schemas/builders/enum/index.js +5 -0
- package/dist/core/schemas/builders/index.d.ts +13 -0
- package/dist/core/schemas/builders/index.js +29 -0
- package/dist/core/schemas/builders/lazy/index.d.ts +3 -0
- package/dist/core/schemas/builders/lazy/index.js +7 -0
- package/dist/core/schemas/builders/lazy/lazy.d.ts +5 -0
- package/dist/core/schemas/builders/lazy/lazy.js +36 -0
- package/dist/core/schemas/builders/lazy/lazyObject.d.ts +3 -0
- package/dist/core/schemas/builders/lazy/lazyObject.js +21 -0
- package/dist/core/schemas/builders/list/index.d.ts +1 -0
- package/dist/core/schemas/builders/list/index.js +5 -0
- package/dist/core/schemas/builders/list/list.d.ts +2 -0
- package/dist/core/schemas/builders/list/list.js +68 -0
- package/dist/core/schemas/builders/literals/booleanLiteral.d.ts +2 -0
- package/dist/core/schemas/builders/literals/booleanLiteral.js +29 -0
- package/dist/core/schemas/builders/literals/index.d.ts +2 -0
- package/dist/core/schemas/builders/literals/index.js +7 -0
- package/dist/core/schemas/builders/literals/stringLiteral.d.ts +2 -0
- package/dist/core/schemas/builders/literals/stringLiteral.js +29 -0
- package/dist/core/schemas/builders/object/index.d.ts +6 -0
- package/dist/core/schemas/builders/object/index.js +11 -0
- package/dist/core/schemas/builders/object/object.d.ts +3 -0
- package/dist/core/schemas/builders/object/object.js +258 -0
- package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +6 -0
- package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.js +8 -0
- package/dist/core/schemas/builders/object/property.d.ts +8 -0
- package/dist/core/schemas/builders/object/property.js +16 -0
- package/dist/core/schemas/builders/object/types.d.ts +26 -0
- package/dist/core/schemas/builders/object/types.js +2 -0
- package/dist/core/schemas/builders/object-like/getObjectLikeUtils.d.ts +9 -0
- package/dist/core/schemas/builders/object-like/getObjectLikeUtils.js +63 -0
- package/dist/core/schemas/builders/object-like/index.d.ts +2 -0
- package/dist/core/schemas/builders/object-like/index.js +6 -0
- package/dist/core/schemas/builders/object-like/types.d.ts +7 -0
- package/dist/core/schemas/builders/object-like/types.js +2 -0
- package/dist/core/schemas/builders/primitives/any.d.ts +1 -0
- package/dist/core/schemas/builders/primitives/any.js +6 -0
- package/dist/core/schemas/builders/primitives/boolean.d.ts +1 -0
- package/dist/core/schemas/builders/primitives/boolean.js +25 -0
- package/dist/core/schemas/builders/primitives/index.d.ts +5 -0
- package/dist/core/schemas/builders/primitives/index.js +13 -0
- package/dist/core/schemas/builders/primitives/number.d.ts +1 -0
- package/dist/core/schemas/builders/primitives/number.js +25 -0
- package/dist/core/schemas/builders/primitives/string.d.ts +1 -0
- package/dist/core/schemas/builders/primitives/string.js +25 -0
- package/dist/core/schemas/builders/primitives/unknown.d.ts +1 -0
- package/dist/core/schemas/builders/primitives/unknown.js +6 -0
- package/dist/core/schemas/builders/record/index.d.ts +2 -0
- package/dist/core/schemas/builders/record/index.js +5 -0
- package/dist/core/schemas/builders/record/record.d.ts +3 -0
- package/dist/core/schemas/builders/record/record.js +106 -0
- package/dist/core/schemas/builders/record/types.d.ts +4 -0
- package/dist/core/schemas/builders/record/types.js +2 -0
- package/dist/core/schemas/builders/schema-utils/JsonError.d.ts +5 -0
- package/dist/core/schemas/builders/schema-utils/JsonError.js +12 -0
- package/dist/core/schemas/builders/schema-utils/ParseError.d.ts +5 -0
- package/dist/core/schemas/builders/schema-utils/ParseError.js +12 -0
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +17 -0
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +85 -0
- package/dist/core/schemas/builders/schema-utils/index.d.ts +4 -0
- package/dist/core/schemas/builders/schema-utils/index.js +11 -0
- package/dist/core/schemas/builders/schema-utils/stringifyValidationErrors.d.ts +2 -0
- package/dist/core/schemas/builders/schema-utils/stringifyValidationErrors.js +10 -0
- package/dist/core/schemas/builders/set/index.d.ts +1 -0
- package/dist/core/schemas/builders/set/index.js +5 -0
- package/dist/core/schemas/builders/set/set.d.ts +2 -0
- package/dist/core/schemas/builders/set/set.js +53 -0
- package/dist/core/schemas/builders/undiscriminated-union/index.d.ts +2 -0
- package/dist/core/schemas/builders/undiscriminated-union/index.js +5 -0
- package/dist/core/schemas/builders/undiscriminated-union/types.d.ts +4 -0
- package/dist/core/schemas/builders/undiscriminated-union/types.js +2 -0
- package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.d.ts +3 -0
- package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +51 -0
- package/dist/core/schemas/builders/union/discriminant.d.ts +5 -0
- package/dist/core/schemas/builders/union/discriminant.js +10 -0
- package/dist/core/schemas/builders/union/index.d.ts +4 -0
- package/dist/core/schemas/builders/union/index.js +7 -0
- package/dist/core/schemas/builders/union/types.d.ts +13 -0
- package/dist/core/schemas/builders/union/types.js +2 -0
- package/dist/core/schemas/builders/union/union.d.ts +4 -0
- package/dist/core/schemas/builders/union/union.js +141 -0
- package/dist/core/schemas/index.d.ts +2 -0
- package/dist/core/schemas/index.js +17 -0
- package/dist/core/schemas/utils/MaybePromise.d.ts +1 -0
- package/dist/core/schemas/utils/MaybePromise.js +2 -0
- package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +7 -0
- package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.js +2 -0
- package/dist/core/schemas/utils/createIdentitySchemaCreator.d.ts +2 -0
- package/dist/core/schemas/utils/createIdentitySchemaCreator.js +16 -0
- package/dist/core/schemas/utils/entries.d.ts +1 -0
- package/dist/core/schemas/utils/entries.js +7 -0
- package/dist/core/schemas/utils/filterObject.d.ts +1 -0
- package/dist/core/schemas/utils/filterObject.js +14 -0
- package/dist/core/schemas/utils/getErrorMessageForIncorrectType.d.ts +1 -0
- package/dist/core/schemas/utils/getErrorMessageForIncorrectType.js +24 -0
- package/dist/core/schemas/utils/isPlainObject.d.ts +1 -0
- package/dist/core/schemas/utils/isPlainObject.js +18 -0
- package/dist/core/schemas/utils/keys.d.ts +1 -0
- package/dist/core/schemas/utils/keys.js +7 -0
- package/dist/core/schemas/utils/maybeSkipValidation.d.ts +2 -0
- package/dist/core/schemas/utils/maybeSkipValidation.js +37 -0
- package/dist/core/schemas/utils/partition.d.ts +1 -0
- package/dist/core/schemas/utils/partition.js +16 -0
- package/dist/core/streaming-fetcher/Stream.d.ts +14 -0
- package/dist/core/streaming-fetcher/Stream.js +75 -0
- package/dist/core/streaming-fetcher/StreamingFetcher.d.ts +24 -0
- package/dist/core/streaming-fetcher/StreamingFetcher.js +58 -0
- package/dist/core/streaming-fetcher/getHeader.d.ts +2 -0
- package/dist/core/streaming-fetcher/getHeader.js +12 -0
- package/dist/core/streaming-fetcher/index.d.ts +4 -0
- package/dist/core/streaming-fetcher/index.js +9 -0
- package/dist/environments.d.ts +7 -0
- package/dist/environments.js +9 -0
- package/dist/errors/HumeError.d.ts +12 -0
- package/dist/errors/HumeError.js +32 -0
- package/dist/errors/HumeTimeoutError.d.ts +6 -0
- package/dist/errors/HumeTimeoutError.js +13 -0
- package/dist/errors/index.d.ts +2 -0
- package/dist/errors/index.js +7 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +38 -0
- package/dist/serialization/client/getJobPredictions.d.ts +10 -0
- package/dist/serialization/client/getJobPredictions.js +40 -0
- package/dist/serialization/client/index.d.ts +3 -0
- package/dist/serialization/client/index.js +32 -0
- package/dist/serialization/client/listJobs.d.ts +10 -0
- package/dist/serialization/client/listJobs.js +40 -0
- package/dist/serialization/client/requests/BaseRequest.d.ts +16 -0
- package/dist/serialization/client/requests/BaseRequest.js +46 -0
- package/dist/serialization/client/requests/index.d.ts +1 -0
- package/dist/serialization/client/requests/index.js +5 -0
- package/dist/serialization/index.d.ts +2 -0
- package/dist/serialization/index.js +18 -0
- package/dist/serialization/types/Bcp47Tag.d.ts +10 -0
- package/dist/serialization/types/Bcp47Tag.js +61 -0
- package/dist/serialization/types/BoundingBox.d.ts +15 -0
- package/dist/serialization/types/BoundingBox.js +36 -0
- package/dist/serialization/types/BurstPrediction.d.ts +14 -0
- package/dist/serialization/types/BurstPrediction.js +44 -0
- package/dist/serialization/types/BurstResponse.d.ts +12 -0
- package/dist/serialization/types/BurstResponse.js +44 -0
- package/dist/serialization/types/Completed.d.ts +16 -0
- package/dist/serialization/types/Completed.js +37 -0
- package/dist/serialization/types/DescriptionsScore.d.ts +13 -0
- package/dist/serialization/types/DescriptionsScore.js +34 -0
- package/dist/serialization/types/Direction.d.ts +10 -0
- package/dist/serialization/types/Direction.js +31 -0
- package/dist/serialization/types/EmotionEmbedding.d.ts +10 -0
- package/dist/serialization/types/EmotionEmbedding.js +40 -0
- package/dist/serialization/types/EmotionEmbeddingItem.d.ts +13 -0
- package/dist/serialization/types/EmotionEmbeddingItem.js +34 -0
- package/dist/serialization/types/EmotionScore.d.ts +13 -0
- package/dist/serialization/types/EmotionScore.js +34 -0
- package/dist/serialization/types/Empty.d.ts +10 -0
- package/dist/serialization/types/Empty.js +31 -0
- package/dist/serialization/types/Error_.d.ts +13 -0
- package/dist/serialization/types/Error_.js +34 -0
- package/dist/serialization/types/Face.d.ts +18 -0
- package/dist/serialization/types/Face.js +48 -0
- package/dist/serialization/types/FaceModelConfig.d.ts +17 -0
- package/dist/serialization/types/FaceModelConfig.js +38 -0
- package/dist/serialization/types/FacePrediction.d.ts +18 -0
- package/dist/serialization/types/FacePrediction.js +52 -0
- package/dist/serialization/types/FaceResponse.d.ts +12 -0
- package/dist/serialization/types/FaceResponse.js +44 -0
- package/dist/serialization/types/FacemeshPrediction.d.ts +12 -0
- package/dist/serialization/types/FacemeshPrediction.js +42 -0
- package/dist/serialization/types/FacemeshResponse.d.ts +12 -0
- package/dist/serialization/types/FacemeshResponse.js +44 -0
- package/dist/serialization/types/FacsScore.d.ts +13 -0
- package/dist/serialization/types/FacsScore.js +34 -0
- package/dist/serialization/types/Failed.d.ts +15 -0
- package/dist/serialization/types/Failed.js +36 -0
- package/dist/serialization/types/File_.d.ts +14 -0
- package/dist/serialization/types/File_.js +35 -0
- package/dist/serialization/types/Granularity.d.ts +10 -0
- package/dist/serialization/types/Granularity.js +31 -0
- package/dist/serialization/types/GroupedPredictionsBurstPrediction.d.ts +13 -0
- package/dist/serialization/types/GroupedPredictionsBurstPrediction.js +43 -0
- package/dist/serialization/types/GroupedPredictionsFacePrediction.d.ts +13 -0
- package/dist/serialization/types/GroupedPredictionsFacePrediction.js +43 -0
- package/dist/serialization/types/GroupedPredictionsFacemeshPrediction.d.ts +13 -0
- package/dist/serialization/types/GroupedPredictionsFacemeshPrediction.js +43 -0
- package/dist/serialization/types/GroupedPredictionsLanguagePrediction.d.ts +13 -0
- package/dist/serialization/types/GroupedPredictionsLanguagePrediction.js +43 -0
- package/dist/serialization/types/GroupedPredictionsNerPrediction.d.ts +13 -0
- package/dist/serialization/types/GroupedPredictionsNerPrediction.js +43 -0
- package/dist/serialization/types/GroupedPredictionsProsodyPrediction.d.ts +13 -0
- package/dist/serialization/types/GroupedPredictionsProsodyPrediction.js +43 -0
- package/dist/serialization/types/InProgress.d.ts +13 -0
- package/dist/serialization/types/InProgress.js +34 -0
- package/dist/serialization/types/JobId.d.ts +12 -0
- package/dist/serialization/types/JobId.js +33 -0
- package/dist/serialization/types/JobRequest.d.ts +15 -0
- package/dist/serialization/types/JobRequest.js +45 -0
- package/dist/serialization/types/Language.d.ts +15 -0
- package/dist/serialization/types/Language.js +45 -0
- package/dist/serialization/types/LanguageConfig.d.ts +14 -0
- package/dist/serialization/types/LanguageConfig.js +35 -0
- package/dist/serialization/types/LanguagePrediction.d.ts +19 -0
- package/dist/serialization/types/LanguagePrediction.js +53 -0
- package/dist/serialization/types/LanguageResponse.d.ts +12 -0
- package/dist/serialization/types/LanguageResponse.js +44 -0
- package/dist/serialization/types/ModelConfig.d.ts +16 -0
- package/dist/serialization/types/ModelConfig.js +46 -0
- package/dist/serialization/types/ModelResponse.d.ts +16 -0
- package/dist/serialization/types/ModelResponse.js +46 -0
- package/dist/serialization/types/Models.d.ts +17 -0
- package/dist/serialization/types/Models.js +47 -0
- package/dist/serialization/types/ModelsError.d.ts +13 -0
- package/dist/serialization/types/ModelsError.js +34 -0
- package/dist/serialization/types/ModelsInput.d.ts +18 -0
- package/dist/serialization/types/ModelsInput.js +48 -0
- package/dist/serialization/types/ModelsPredictions.d.ts +17 -0
- package/dist/serialization/types/ModelsPredictions.js +59 -0
- package/dist/serialization/types/ModelsSuccessBurstPredictionsItem.d.ts +13 -0
- package/dist/serialization/types/ModelsSuccessBurstPredictionsItem.js +43 -0
- package/dist/serialization/types/ModelsSuccessFacePredictionsItem.d.ts +19 -0
- package/dist/serialization/types/ModelsSuccessFacePredictionsItem.js +49 -0
- package/dist/serialization/types/ModelsSuccessFacemeshPredictionsItem.d.ts +12 -0
- package/dist/serialization/types/ModelsSuccessFacemeshPredictionsItem.js +42 -0
- package/dist/serialization/types/ModelsSuccessLanguagePredictionsItem.d.ts +16 -0
- package/dist/serialization/types/ModelsSuccessLanguagePredictionsItem.js +46 -0
- package/dist/serialization/types/ModelsSuccessProsodyPredictionsItem.d.ts +13 -0
- package/dist/serialization/types/ModelsSuccessProsodyPredictionsItem.js +43 -0
- package/dist/serialization/types/ModelsWarning.d.ts +13 -0
- package/dist/serialization/types/ModelsWarning.js +34 -0
- package/dist/serialization/types/Ner.d.ts +12 -0
- package/dist/serialization/types/Ner.js +33 -0
- package/dist/serialization/types/NerPrediction.d.ts +21 -0
- package/dist/serialization/types/NerPrediction.js +51 -0
- package/dist/serialization/types/Null.d.ts +10 -0
- package/dist/serialization/types/Null.js +31 -0
- package/dist/serialization/types/PositionInterval.d.ts +13 -0
- package/dist/serialization/types/PositionInterval.js +34 -0
- package/dist/serialization/types/Prediction.d.ts +13 -0
- package/dist/serialization/types/Prediction.js +43 -0
- package/dist/serialization/types/PredictionsOptionalNullBurstPrediction.d.ts +13 -0
- package/dist/serialization/types/PredictionsOptionalNullBurstPrediction.js +43 -0
- package/dist/serialization/types/PredictionsOptionalNullFacePrediction.d.ts +13 -0
- package/dist/serialization/types/PredictionsOptionalNullFacePrediction.js +43 -0
- package/dist/serialization/types/PredictionsOptionalNullFacemeshPrediction.d.ts +13 -0
- package/dist/serialization/types/PredictionsOptionalNullFacemeshPrediction.js +43 -0
- package/dist/serialization/types/PredictionsOptionalTranscriptionMetadataLanguagePrediction.d.ts +13 -0
- package/dist/serialization/types/PredictionsOptionalTranscriptionMetadataLanguagePrediction.js +43 -0
- package/dist/serialization/types/PredictionsOptionalTranscriptionMetadataNerPrediction.d.ts +13 -0
- package/dist/serialization/types/PredictionsOptionalTranscriptionMetadataNerPrediction.js +43 -0
- package/dist/serialization/types/PredictionsOptionalTranscriptionMetadataProsodyPrediction.d.ts +13 -0
- package/dist/serialization/types/PredictionsOptionalTranscriptionMetadataProsodyPrediction.js +43 -0
- package/dist/serialization/types/Prosody.d.ts +14 -0
- package/dist/serialization/types/Prosody.js +44 -0
- package/dist/serialization/types/ProsodyPrediction.d.ts +16 -0
- package/dist/serialization/types/ProsodyPrediction.js +46 -0
- package/dist/serialization/types/ProsodyResponse.d.ts +12 -0
- package/dist/serialization/types/ProsodyResponse.js +44 -0
- package/dist/serialization/types/Queued.d.ts +12 -0
- package/dist/serialization/types/Queued.js +33 -0
- package/dist/serialization/types/Request.d.ts +17 -0
- package/dist/serialization/types/Request.js +47 -0
- package/dist/serialization/types/Results.d.ts +13 -0
- package/dist/serialization/types/Results.js +43 -0
- package/dist/serialization/types/Sentiment.d.ts +10 -0
- package/dist/serialization/types/Sentiment.js +40 -0
- package/dist/serialization/types/SentimentItem.d.ts +13 -0
- package/dist/serialization/types/SentimentItem.js +34 -0
- package/dist/serialization/types/SentimentScore.d.ts +13 -0
- package/dist/serialization/types/SentimentScore.js +34 -0
- package/dist/serialization/types/SortBy.d.ts +10 -0
- package/dist/serialization/types/SortBy.js +35 -0
- package/dist/serialization/types/Source.d.ts +16 -0
- package/dist/serialization/types/Source.js +48 -0
- package/dist/serialization/types/SourceFile.d.ts +10 -0
- package/dist/serialization/types/SourceFile.js +40 -0
- package/dist/serialization/types/SourceResult.d.ts +14 -0
- package/dist/serialization/types/SourceResult.js +44 -0
- package/dist/serialization/types/SourceUrl.d.ts +10 -0
- package/dist/serialization/types/SourceUrl.js +40 -0
- package/dist/serialization/types/State.d.ts +22 -0
- package/dist/serialization/types/State.js +50 -0
- package/dist/serialization/types/StateCompleted.d.ts +10 -0
- package/dist/serialization/types/StateCompleted.js +40 -0
- package/dist/serialization/types/StateFailed.d.ts +10 -0
- package/dist/serialization/types/StateFailed.js +40 -0
- package/dist/serialization/types/StateInProgress.d.ts +10 -0
- package/dist/serialization/types/StateInProgress.js +40 -0
- package/dist/serialization/types/StateQueued.d.ts +10 -0
- package/dist/serialization/types/StateQueued.js +40 -0
- package/dist/serialization/types/Status.d.ts +10 -0
- package/dist/serialization/types/Status.js +36 -0
- package/dist/serialization/types/TextPosition.d.ts +13 -0
- package/dist/serialization/types/TextPosition.js +34 -0
- package/dist/serialization/types/TimeInterval.d.ts +13 -0
- package/dist/serialization/types/TimeInterval.js +34 -0
- package/dist/serialization/types/TimeRange.d.ts +13 -0
- package/dist/serialization/types/TimeRange.js +34 -0
- package/dist/serialization/types/Toxicity.d.ts +10 -0
- package/dist/serialization/types/Toxicity.js +40 -0
- package/dist/serialization/types/ToxicityItem.d.ts +13 -0
- package/dist/serialization/types/ToxicityItem.js +34 -0
- package/dist/serialization/types/ToxicityScore.d.ts +13 -0
- package/dist/serialization/types/ToxicityScore.js +34 -0
- package/dist/serialization/types/Transcription.d.ts +12 -0
- package/dist/serialization/types/Transcription.js +42 -0
- package/dist/serialization/types/TranscriptionMetadata.d.ts +13 -0
- package/dist/serialization/types/TranscriptionMetadata.js +43 -0
- package/dist/serialization/types/Url.d.ts +12 -0
- package/dist/serialization/types/Url.js +33 -0
- package/dist/serialization/types/When.d.ts +10 -0
- package/dist/serialization/types/When.js +34 -0
- package/dist/serialization/types/Window.d.ts +13 -0
- package/dist/serialization/types/Window.js +34 -0
- package/dist/serialization/types/index.d.ts +89 -0
- package/dist/serialization/types/index.js +105 -0
- package/dist/wrapper/HumeBatchClient.d.ts +6 -0
- package/dist/wrapper/HumeBatchClient.js +26 -0
- package/dist/wrapper/HumeStreamingClient.d.ts +23 -0
- package/dist/wrapper/HumeStreamingClient.js +125 -0
- package/dist/wrapper/Job.d.ts +8 -0
- package/dist/wrapper/Job.js +87 -0
- package/dist/wrapper/StreamSocket.d.ts +83 -0
- package/dist/wrapper/StreamSocket.js +114 -0
- package/environments.d.ts +7 -0
- package/environments.js +9 -0
- package/errors/HumeError.d.ts +12 -0
- package/errors/HumeError.js +32 -0
- package/errors/HumeTimeoutError.d.ts +6 -0
- package/errors/HumeTimeoutError.js +13 -0
- package/errors/index.d.ts +2 -0
- package/errors/index.js +7 -0
- package/index.d.ts +6 -0
- package/index.js +38 -0
- package/package.json +26 -41
- package/serialization/client/getJobPredictions.d.ts +10 -0
- package/serialization/client/getJobPredictions.js +40 -0
- package/serialization/client/index.d.ts +3 -0
- package/serialization/client/index.js +32 -0
- package/serialization/client/listJobs.d.ts +10 -0
- package/serialization/client/listJobs.js +40 -0
- package/serialization/client/requests/BaseRequest.d.ts +16 -0
- package/serialization/client/requests/BaseRequest.js +46 -0
- package/serialization/client/requests/index.d.ts +1 -0
- package/serialization/client/requests/index.js +5 -0
- package/serialization/index.d.ts +2 -0
- package/serialization/index.js +18 -0
- package/serialization/types/Bcp47Tag.d.ts +10 -0
- package/serialization/types/Bcp47Tag.js +61 -0
- package/serialization/types/BoundingBox.d.ts +15 -0
- package/serialization/types/BoundingBox.js +36 -0
- package/serialization/types/BurstPrediction.d.ts +14 -0
- package/serialization/types/BurstPrediction.js +44 -0
- package/serialization/types/BurstResponse.d.ts +12 -0
- package/serialization/types/BurstResponse.js +44 -0
- package/serialization/types/Completed.d.ts +16 -0
- package/serialization/types/Completed.js +37 -0
- package/serialization/types/DescriptionsScore.d.ts +13 -0
- package/serialization/types/DescriptionsScore.js +34 -0
- package/serialization/types/Direction.d.ts +10 -0
- package/serialization/types/Direction.js +31 -0
- package/serialization/types/EmotionEmbedding.d.ts +10 -0
- package/serialization/types/EmotionEmbedding.js +40 -0
- package/serialization/types/EmotionEmbeddingItem.d.ts +13 -0
- package/serialization/types/EmotionEmbeddingItem.js +34 -0
- package/serialization/types/EmotionScore.d.ts +13 -0
- package/serialization/types/EmotionScore.js +34 -0
- package/serialization/types/Empty.d.ts +10 -0
- package/serialization/types/Empty.js +31 -0
- package/serialization/types/Error_.d.ts +13 -0
- package/serialization/types/Error_.js +34 -0
- package/serialization/types/Face.d.ts +18 -0
- package/serialization/types/Face.js +48 -0
- package/serialization/types/FaceModelConfig.d.ts +17 -0
- package/serialization/types/FaceModelConfig.js +38 -0
- package/serialization/types/FacePrediction.d.ts +18 -0
- package/serialization/types/FacePrediction.js +52 -0
- package/serialization/types/FaceResponse.d.ts +12 -0
- package/serialization/types/FaceResponse.js +44 -0
- package/serialization/types/FacemeshPrediction.d.ts +12 -0
- package/serialization/types/FacemeshPrediction.js +42 -0
- package/serialization/types/FacemeshResponse.d.ts +12 -0
- package/serialization/types/FacemeshResponse.js +44 -0
- package/serialization/types/FacsScore.d.ts +13 -0
- package/serialization/types/FacsScore.js +34 -0
- package/serialization/types/Failed.d.ts +15 -0
- package/serialization/types/Failed.js +36 -0
- package/serialization/types/File_.d.ts +14 -0
- package/serialization/types/File_.js +35 -0
- package/serialization/types/Granularity.d.ts +10 -0
- package/serialization/types/Granularity.js +31 -0
- package/serialization/types/GroupedPredictionsBurstPrediction.d.ts +13 -0
- package/serialization/types/GroupedPredictionsBurstPrediction.js +43 -0
- package/serialization/types/GroupedPredictionsFacePrediction.d.ts +13 -0
- package/serialization/types/GroupedPredictionsFacePrediction.js +43 -0
- package/serialization/types/GroupedPredictionsFacemeshPrediction.d.ts +13 -0
- package/serialization/types/GroupedPredictionsFacemeshPrediction.js +43 -0
- package/serialization/types/GroupedPredictionsLanguagePrediction.d.ts +13 -0
- package/serialization/types/GroupedPredictionsLanguagePrediction.js +43 -0
- package/serialization/types/GroupedPredictionsNerPrediction.d.ts +13 -0
- package/serialization/types/GroupedPredictionsNerPrediction.js +43 -0
- package/serialization/types/GroupedPredictionsProsodyPrediction.d.ts +13 -0
- package/serialization/types/GroupedPredictionsProsodyPrediction.js +43 -0
- package/serialization/types/InProgress.d.ts +13 -0
- package/serialization/types/InProgress.js +34 -0
- package/serialization/types/JobId.d.ts +12 -0
- package/serialization/types/JobId.js +33 -0
- package/serialization/types/JobRequest.d.ts +15 -0
- package/serialization/types/JobRequest.js +45 -0
- package/serialization/types/Language.d.ts +15 -0
- package/serialization/types/Language.js +45 -0
- package/serialization/types/LanguageConfig.d.ts +14 -0
- package/serialization/types/LanguageConfig.js +35 -0
- package/serialization/types/LanguagePrediction.d.ts +19 -0
- package/serialization/types/LanguagePrediction.js +53 -0
- package/serialization/types/LanguageResponse.d.ts +12 -0
- package/serialization/types/LanguageResponse.js +44 -0
- package/serialization/types/ModelConfig.d.ts +16 -0
- package/serialization/types/ModelConfig.js +46 -0
- package/serialization/types/ModelResponse.d.ts +16 -0
- package/serialization/types/ModelResponse.js +46 -0
- package/serialization/types/Models.d.ts +17 -0
- package/serialization/types/Models.js +47 -0
- package/serialization/types/ModelsError.d.ts +13 -0
- package/serialization/types/ModelsError.js +34 -0
- package/serialization/types/ModelsInput.d.ts +18 -0
- package/serialization/types/ModelsInput.js +48 -0
- package/serialization/types/ModelsPredictions.d.ts +17 -0
- package/serialization/types/ModelsPredictions.js +59 -0
- package/serialization/types/ModelsSuccessBurstPredictionsItem.d.ts +13 -0
- package/serialization/types/ModelsSuccessBurstPredictionsItem.js +43 -0
- package/serialization/types/ModelsSuccessFacePredictionsItem.d.ts +19 -0
- package/serialization/types/ModelsSuccessFacePredictionsItem.js +49 -0
- package/serialization/types/ModelsSuccessFacemeshPredictionsItem.d.ts +12 -0
- package/serialization/types/ModelsSuccessFacemeshPredictionsItem.js +42 -0
- package/serialization/types/ModelsSuccessLanguagePredictionsItem.d.ts +16 -0
- package/serialization/types/ModelsSuccessLanguagePredictionsItem.js +46 -0
- package/serialization/types/ModelsSuccessProsodyPredictionsItem.d.ts +13 -0
- package/serialization/types/ModelsSuccessProsodyPredictionsItem.js +43 -0
- package/serialization/types/ModelsWarning.d.ts +13 -0
- package/serialization/types/ModelsWarning.js +34 -0
- package/serialization/types/Ner.d.ts +12 -0
- package/serialization/types/Ner.js +33 -0
- package/serialization/types/NerPrediction.d.ts +21 -0
- package/serialization/types/NerPrediction.js +51 -0
- package/serialization/types/Null.d.ts +10 -0
- package/serialization/types/Null.js +31 -0
- package/serialization/types/PositionInterval.d.ts +13 -0
- package/serialization/types/PositionInterval.js +34 -0
- package/serialization/types/Prediction.d.ts +13 -0
- package/serialization/types/Prediction.js +43 -0
- package/serialization/types/PredictionsOptionalNullBurstPrediction.d.ts +13 -0
- package/serialization/types/PredictionsOptionalNullBurstPrediction.js +43 -0
- package/serialization/types/PredictionsOptionalNullFacePrediction.d.ts +13 -0
- package/serialization/types/PredictionsOptionalNullFacePrediction.js +43 -0
- package/serialization/types/PredictionsOptionalNullFacemeshPrediction.d.ts +13 -0
- package/serialization/types/PredictionsOptionalNullFacemeshPrediction.js +43 -0
- package/serialization/types/PredictionsOptionalTranscriptionMetadataLanguagePrediction.d.ts +13 -0
- package/serialization/types/PredictionsOptionalTranscriptionMetadataLanguagePrediction.js +43 -0
- package/serialization/types/PredictionsOptionalTranscriptionMetadataNerPrediction.d.ts +13 -0
- package/serialization/types/PredictionsOptionalTranscriptionMetadataNerPrediction.js +43 -0
- package/serialization/types/PredictionsOptionalTranscriptionMetadataProsodyPrediction.d.ts +13 -0
- package/serialization/types/PredictionsOptionalTranscriptionMetadataProsodyPrediction.js +43 -0
- package/serialization/types/Prosody.d.ts +14 -0
- package/serialization/types/Prosody.js +44 -0
- package/serialization/types/ProsodyPrediction.d.ts +16 -0
- package/serialization/types/ProsodyPrediction.js +46 -0
- package/serialization/types/ProsodyResponse.d.ts +12 -0
- package/serialization/types/ProsodyResponse.js +44 -0
- package/serialization/types/Queued.d.ts +12 -0
- package/serialization/types/Queued.js +33 -0
- package/serialization/types/Request.d.ts +17 -0
- package/serialization/types/Request.js +47 -0
- package/serialization/types/Results.d.ts +13 -0
- package/serialization/types/Results.js +43 -0
- package/serialization/types/Sentiment.d.ts +10 -0
- package/serialization/types/Sentiment.js +40 -0
- package/serialization/types/SentimentItem.d.ts +13 -0
- package/serialization/types/SentimentItem.js +34 -0
- package/serialization/types/SentimentScore.d.ts +13 -0
- package/serialization/types/SentimentScore.js +34 -0
- package/serialization/types/SortBy.d.ts +10 -0
- package/serialization/types/SortBy.js +35 -0
- package/serialization/types/Source.d.ts +16 -0
- package/serialization/types/Source.js +48 -0
- package/serialization/types/SourceFile.d.ts +10 -0
- package/serialization/types/SourceFile.js +40 -0
- package/serialization/types/SourceResult.d.ts +14 -0
- package/serialization/types/SourceResult.js +44 -0
- package/serialization/types/SourceUrl.d.ts +10 -0
- package/serialization/types/SourceUrl.js +40 -0
- package/serialization/types/State.d.ts +22 -0
- package/serialization/types/State.js +50 -0
- package/serialization/types/StateCompleted.d.ts +10 -0
- package/serialization/types/StateCompleted.js +40 -0
- package/serialization/types/StateFailed.d.ts +10 -0
- package/serialization/types/StateFailed.js +40 -0
- package/serialization/types/StateInProgress.d.ts +10 -0
- package/serialization/types/StateInProgress.js +40 -0
- package/serialization/types/StateQueued.d.ts +10 -0
- package/serialization/types/StateQueued.js +40 -0
- package/serialization/types/Status.d.ts +10 -0
- package/serialization/types/Status.js +36 -0
- package/serialization/types/TextPosition.d.ts +13 -0
- package/serialization/types/TextPosition.js +34 -0
- package/serialization/types/TimeInterval.d.ts +13 -0
- package/serialization/types/TimeInterval.js +34 -0
- package/serialization/types/TimeRange.d.ts +13 -0
- package/serialization/types/TimeRange.js +34 -0
- package/serialization/types/Toxicity.d.ts +10 -0
- package/serialization/types/Toxicity.js +40 -0
- package/serialization/types/ToxicityItem.d.ts +13 -0
- package/serialization/types/ToxicityItem.js +34 -0
- package/serialization/types/ToxicityScore.d.ts +13 -0
- package/serialization/types/ToxicityScore.js +34 -0
- package/serialization/types/Transcription.d.ts +12 -0
- package/serialization/types/Transcription.js +42 -0
- package/serialization/types/TranscriptionMetadata.d.ts +13 -0
- package/serialization/types/TranscriptionMetadata.js +43 -0
- package/serialization/types/Url.d.ts +12 -0
- package/serialization/types/Url.js +33 -0
- package/serialization/types/When.d.ts +10 -0
- package/serialization/types/When.js +34 -0
- package/serialization/types/Window.d.ts +13 -0
- package/serialization/types/Window.js +34 -0
- package/serialization/types/index.d.ts +89 -0
- package/serialization/types/index.js +105 -0
- package/wrapper/HumeBatchClient.d.ts +6 -0
- package/wrapper/HumeBatchClient.js +26 -0
- package/wrapper/HumeStreamingClient.d.ts +23 -0
- package/wrapper/HumeStreamingClient.js +125 -0
- package/wrapper/Job.d.ts +8 -0
- package/wrapper/Job.js +87 -0
- package/wrapper/StreamSocket.d.ts +83 -0
- package/wrapper/StreamSocket.js +114 -0
- package/postcss.config.js +0 -7
- package/src/components/HumeWidget.tsx +0 -37
- package/src/index.ts +0 -3
- package/tailwind.config.js +0 -8
- package/tsconfig.json +0 -23
package/wrapper/Job.js
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
+
exports.Job = void 0;
|
|
36
|
+
const errors = __importStar(require("../errors"));
|
|
37
|
+
class Job {
|
|
38
|
+
constructor(jobId, client) {
|
|
39
|
+
this.jobId = jobId;
|
|
40
|
+
this.client = client;
|
|
41
|
+
}
|
|
42
|
+
awaitCompletion(timeoutInSeconds = 300) {
|
|
43
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
44
|
+
return new Promise((resolve, reject) => {
|
|
45
|
+
const poller = new JobCompletionPoller(this.jobId, this.client);
|
|
46
|
+
poller.start(resolve);
|
|
47
|
+
setTimeout(() => {
|
|
48
|
+
poller.stop();
|
|
49
|
+
reject(new errors.HumeTimeoutError());
|
|
50
|
+
}, timeoutInSeconds * 1000);
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
exports.Job = Job;
|
|
56
|
+
class JobCompletionPoller {
|
|
57
|
+
constructor(jobId, client) {
|
|
58
|
+
this.jobId = jobId;
|
|
59
|
+
this.client = client;
|
|
60
|
+
this.isPolling = true;
|
|
61
|
+
}
|
|
62
|
+
start(onTerminal) {
|
|
63
|
+
this.isPolling = true;
|
|
64
|
+
this.poll(onTerminal);
|
|
65
|
+
}
|
|
66
|
+
stop() {
|
|
67
|
+
this.isPolling = false;
|
|
68
|
+
}
|
|
69
|
+
poll(onTerminal) {
|
|
70
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
71
|
+
try {
|
|
72
|
+
const jobDetails = yield this.client.getJobDetails(this.jobId);
|
|
73
|
+
if (jobDetails.state.status === "COMPLETED" ||
|
|
74
|
+
jobDetails.state.status === "FAILED") {
|
|
75
|
+
onTerminal();
|
|
76
|
+
this.stop();
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
catch (_a) {
|
|
80
|
+
// swallow errors while polling
|
|
81
|
+
}
|
|
82
|
+
if (this.isPolling) {
|
|
83
|
+
setTimeout(() => this.poll(onTerminal), 1000);
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import WebSocket from "ws";
|
|
3
|
+
import * as Hume from "../api";
|
|
4
|
+
export declare namespace StreamSocket {
|
|
5
|
+
interface Args {
|
|
6
|
+
websocket: WebSocket;
|
|
7
|
+
config: Hume.ModelConfig;
|
|
8
|
+
streamWindowMs?: number;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export declare class StreamSocket {
|
|
12
|
+
readonly websocket: WebSocket;
|
|
13
|
+
private readonly streamWindowMs?;
|
|
14
|
+
private config;
|
|
15
|
+
constructor({ websocket, config, streamWindowMs }: StreamSocket.Args);
|
|
16
|
+
/**
|
|
17
|
+
* Send a file on the `StreamSocket`
|
|
18
|
+
*
|
|
19
|
+
* @param filepath Path to media file to send on socket connection
|
|
20
|
+
* @param config List of model configurations.
|
|
21
|
+
* If set these configurations will overwrite any configurations
|
|
22
|
+
* set when initializing the `StreamSocket`
|
|
23
|
+
*/
|
|
24
|
+
sendFile({ filepath, config, }: {
|
|
25
|
+
filepath: string;
|
|
26
|
+
config?: Hume.ModelConfig;
|
|
27
|
+
}): Promise<void>;
|
|
28
|
+
/**
|
|
29
|
+
* Send raw bytes on the `StreamSocket`
|
|
30
|
+
*
|
|
31
|
+
* @param buffer Raw bytes of media to send on socket connection
|
|
32
|
+
* @param config List of model configurations.
|
|
33
|
+
* If set these configurations will overwrite any configurations
|
|
34
|
+
* set when initializing the `StreamSocket`
|
|
35
|
+
*/
|
|
36
|
+
sendBuffer({ buffer, config, }: {
|
|
37
|
+
buffer: Buffer;
|
|
38
|
+
config?: Hume.ModelConfig;
|
|
39
|
+
}): void;
|
|
40
|
+
/**
|
|
41
|
+
* Send text on the `StreamSocket`
|
|
42
|
+
*
|
|
43
|
+
* @param text Text to send to the language model.
|
|
44
|
+
* @param config This method is intended for use with a `LanguageConfig`.
|
|
45
|
+
* When the socket is configured for other modalities this method will fail.
|
|
46
|
+
*/
|
|
47
|
+
sendText({ text, config, }: {
|
|
48
|
+
text: string;
|
|
49
|
+
config?: Hume.ModelConfig;
|
|
50
|
+
}): void;
|
|
51
|
+
/**
|
|
52
|
+
* Send facemesh landmarks on the `StreamSocket`
|
|
53
|
+
*
|
|
54
|
+
* @param landmarks List of landmark points for multiple faces.
|
|
55
|
+
* The shape of this 3-dimensional list should be (n, 478, 3) where n is the number
|
|
56
|
+
* of faces to be processed, 478 is the number of MediaPipe landmarks per face and 3
|
|
57
|
+
* represents the (x, y, z) coordinates of each landmark.
|
|
58
|
+
* @param config List of model configurations.
|
|
59
|
+
* If set these configurations will overwrite existing configurations
|
|
60
|
+
*/
|
|
61
|
+
sendFacemesh({ landmarks, config, }: {
|
|
62
|
+
landmarks: number[][][];
|
|
63
|
+
config?: Hume.ModelConfig;
|
|
64
|
+
}): void;
|
|
65
|
+
/**
|
|
66
|
+
*
|
|
67
|
+
* Reset the streaming sliding window.
|
|
68
|
+
*
|
|
69
|
+
* Call this method when some media has been fully processed and you want to continue using the same
|
|
70
|
+
* streaming connection without leaking context across media samples.
|
|
71
|
+
*/
|
|
72
|
+
reset(): void;
|
|
73
|
+
/**
|
|
74
|
+
*
|
|
75
|
+
* Get details associated with the current streaming connection.
|
|
76
|
+
*
|
|
77
|
+
*/
|
|
78
|
+
getJobDetails(): void;
|
|
79
|
+
/**
|
|
80
|
+
* Closes the underlying socket.
|
|
81
|
+
*/
|
|
82
|
+
close(): void;
|
|
83
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.StreamSocket = void 0;
|
|
13
|
+
const promises_1 = require("fs/promises");
|
|
14
|
+
class StreamSocket {
|
|
15
|
+
constructor({ websocket, config, streamWindowMs }) {
|
|
16
|
+
this.websocket = websocket;
|
|
17
|
+
this.config = config;
|
|
18
|
+
this.streamWindowMs = streamWindowMs;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Send a file on the `StreamSocket`
|
|
22
|
+
*
|
|
23
|
+
* @param filepath Path to media file to send on socket connection
|
|
24
|
+
* @param config List of model configurations.
|
|
25
|
+
* If set these configurations will overwrite any configurations
|
|
26
|
+
* set when initializing the `StreamSocket`
|
|
27
|
+
*/
|
|
28
|
+
sendFile({ filepath, config, }) {
|
|
29
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
30
|
+
this.sendBuffer({
|
|
31
|
+
buffer: yield (0, promises_1.readFile)(filepath),
|
|
32
|
+
config,
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Send raw bytes on the `StreamSocket`
|
|
38
|
+
*
|
|
39
|
+
* @param buffer Raw bytes of media to send on socket connection
|
|
40
|
+
* @param config List of model configurations.
|
|
41
|
+
* If set these configurations will overwrite any configurations
|
|
42
|
+
* set when initializing the `StreamSocket`
|
|
43
|
+
*/
|
|
44
|
+
sendBuffer({ buffer, config, }) {
|
|
45
|
+
this.sendText({
|
|
46
|
+
text: buffer.toString("base64"),
|
|
47
|
+
config,
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Send text on the `StreamSocket`
|
|
52
|
+
*
|
|
53
|
+
* @param text Text to send to the language model.
|
|
54
|
+
* @param config This method is intended for use with a `LanguageConfig`.
|
|
55
|
+
* When the socket is configured for other modalities this method will fail.
|
|
56
|
+
*/
|
|
57
|
+
sendText({ text, config, }) {
|
|
58
|
+
if (config != null) {
|
|
59
|
+
this.config = config;
|
|
60
|
+
}
|
|
61
|
+
this.websocket.send(JSON.stringify({
|
|
62
|
+
data: text,
|
|
63
|
+
raw_text: true,
|
|
64
|
+
models: this.config,
|
|
65
|
+
stream_window_ms: this.streamWindowMs,
|
|
66
|
+
}));
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Send facemesh landmarks on the `StreamSocket`
|
|
70
|
+
*
|
|
71
|
+
* @param landmarks List of landmark points for multiple faces.
|
|
72
|
+
* The shape of this 3-dimensional list should be (n, 478, 3) where n is the number
|
|
73
|
+
* of faces to be processed, 478 is the number of MediaPipe landmarks per face and 3
|
|
74
|
+
* represents the (x, y, z) coordinates of each landmark.
|
|
75
|
+
* @param config List of model configurations.
|
|
76
|
+
* If set these configurations will overwrite existing configurations
|
|
77
|
+
*/
|
|
78
|
+
sendFacemesh({ landmarks, config, }) {
|
|
79
|
+
const stringifiedLandmarks = JSON.stringify(landmarks);
|
|
80
|
+
this.sendText({
|
|
81
|
+
text: Buffer.from(stringifiedLandmarks).toString("base64"),
|
|
82
|
+
config,
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
*
|
|
87
|
+
* Reset the streaming sliding window.
|
|
88
|
+
*
|
|
89
|
+
* Call this method when some media has been fully processed and you want to continue using the same
|
|
90
|
+
* streaming connection without leaking context across media samples.
|
|
91
|
+
*/
|
|
92
|
+
reset() {
|
|
93
|
+
this.websocket.send(JSON.stringify({
|
|
94
|
+
reset_stream: true,
|
|
95
|
+
}));
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
*
|
|
99
|
+
* Get details associated with the current streaming connection.
|
|
100
|
+
*
|
|
101
|
+
*/
|
|
102
|
+
getJobDetails() {
|
|
103
|
+
this.websocket.send(JSON.stringify({
|
|
104
|
+
job_details: true,
|
|
105
|
+
}));
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Closes the underlying socket.
|
|
109
|
+
*/
|
|
110
|
+
close() {
|
|
111
|
+
this.websocket.close();
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
exports.StreamSocket = StreamSocket;
|
package/postcss.config.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { useEffect, useRef } from "react";
|
|
2
|
-
|
|
3
|
-
interface HumeWidgetProps {
|
|
4
|
-
width: number;
|
|
5
|
-
height: number;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export default function HumeWidget(props: HumeWidgetProps) {
|
|
9
|
-
const canvasRef = useRef<HTMLCanvasElement>(null);
|
|
10
|
-
|
|
11
|
-
useEffect(() => {
|
|
12
|
-
const canvas = canvasRef.current;
|
|
13
|
-
const context = canvas?.getContext("2d");
|
|
14
|
-
if (!canvas || !context) {
|
|
15
|
-
console.log("Missing canvas or canvas context");
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
canvas.width = props.width;
|
|
20
|
-
canvas.height = props.height;
|
|
21
|
-
|
|
22
|
-
const radius = 6;
|
|
23
|
-
const location = { x: canvas.width / 2, y: canvas.height / 2 };
|
|
24
|
-
context.clearRect(0, 0, canvas.width, canvas.height);
|
|
25
|
-
context.beginPath();
|
|
26
|
-
context.arc(location.x, location.y, radius, 0, 2 * Math.PI);
|
|
27
|
-
context.fillStyle = "#3498db";
|
|
28
|
-
context.fill();
|
|
29
|
-
}, []);
|
|
30
|
-
|
|
31
|
-
return (
|
|
32
|
-
<div className="gb-neutral-400">
|
|
33
|
-
<canvas ref={canvasRef}></canvas>
|
|
34
|
-
<span>TEST</span>
|
|
35
|
-
</div>
|
|
36
|
-
);
|
|
37
|
-
}
|
package/src/index.ts
DELETED
package/tailwind.config.js
DELETED
package/tsconfig.json
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"allowJs": false,
|
|
4
|
-
"allowSyntheticDefaultImports": true,
|
|
5
|
-
"esModuleInterop": true,
|
|
6
|
-
"forceConsistentCasingInFileNames": true,
|
|
7
|
-
"incremental": true,
|
|
8
|
-
"isolatedModules": false,
|
|
9
|
-
"jsx": "react-jsx",
|
|
10
|
-
"lib": ["dom", "dom.iterable", "esnext"],
|
|
11
|
-
"module": "esnext",
|
|
12
|
-
"moduleResolution": "node",
|
|
13
|
-
"noEmit": false,
|
|
14
|
-
"noFallthroughCasesInSwitch": true,
|
|
15
|
-
"resolveJsonModule": true,
|
|
16
|
-
"skipLibCheck": true,
|
|
17
|
-
"strict": true,
|
|
18
|
-
"strictNullChecks": true,
|
|
19
|
-
"target": "es6"
|
|
20
|
-
},
|
|
21
|
-
"include": ["**/*.ts", "**/*.tsx"],
|
|
22
|
-
"exclude": ["node_modules"]
|
|
23
|
-
}
|