react-native-executorch 0.5.15 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -36
- package/android/CMakeLists.txt +13 -25
- package/android/build.gradle +2 -3
- package/android/libs/classes.jar +0 -0
- package/android/src/main/cpp/CMakeLists.txt +2 -1
- package/common/rnexecutorch/RnExecutorchInstaller.cpp +18 -0
- package/common/rnexecutorch/TokenizerModule.cpp +3 -3
- package/common/rnexecutorch/data_processing/Numerical.cpp +31 -23
- package/common/rnexecutorch/data_processing/Numerical.h +6 -1
- package/common/rnexecutorch/data_processing/dsp.cpp +0 -46
- package/common/rnexecutorch/host_objects/JsiConversions.h +16 -0
- package/common/rnexecutorch/host_objects/ModelHostObject.h +26 -11
- package/common/rnexecutorch/jsi/OwningArrayBuffer.h +19 -2
- package/common/rnexecutorch/metaprogramming/TypeConcepts.h +0 -20
- package/common/rnexecutorch/models/BaseModel.cpp +12 -11
- package/common/rnexecutorch/models/BaseModel.h +18 -10
- package/common/rnexecutorch/models/embeddings/BaseEmbeddings.cpp +3 -11
- package/common/rnexecutorch/models/embeddings/text/TextEmbeddings.cpp +0 -1
- package/common/rnexecutorch/models/image_segmentation/ImageSegmentation.cpp +6 -12
- package/common/rnexecutorch/models/llm/LLM.cpp +25 -8
- package/common/rnexecutorch/models/llm/LLM.h +4 -4
- package/common/rnexecutorch/models/ocr/CTCLabelConverter.h +1 -1
- package/common/rnexecutorch/models/ocr/utils/RecognitionHandlerUtils.cpp +7 -4
- package/common/rnexecutorch/models/speech_to_text/SpeechToText.cpp +8 -13
- package/common/rnexecutorch/models/speech_to_text/SpeechToText.h +1 -3
- package/common/rnexecutorch/models/speech_to_text/asr/ASR.cpp +12 -19
- package/common/rnexecutorch/models/speech_to_text/asr/ASR.h +4 -5
- package/common/rnexecutorch/models/text_to_image/Constants.h +9 -0
- package/common/rnexecutorch/models/text_to_image/Decoder.cpp +32 -0
- package/common/rnexecutorch/models/text_to_image/Decoder.h +24 -0
- package/common/rnexecutorch/models/text_to_image/Encoder.cpp +44 -0
- package/common/rnexecutorch/models/text_to_image/Encoder.h +32 -0
- package/common/rnexecutorch/models/text_to_image/Scheduler.cpp +152 -0
- package/common/rnexecutorch/models/text_to_image/Scheduler.h +41 -0
- package/common/rnexecutorch/models/text_to_image/TextToImage.cpp +141 -0
- package/common/rnexecutorch/models/text_to_image/TextToImage.h +64 -0
- package/common/rnexecutorch/models/text_to_image/UNet.cpp +38 -0
- package/common/rnexecutorch/models/text_to_image/UNet.h +28 -0
- package/common/rnexecutorch/models/voice_activity_detection/Constants.h +27 -0
- package/common/rnexecutorch/models/voice_activity_detection/Types.h +12 -0
- package/common/rnexecutorch/models/voice_activity_detection/Utils.cpp +15 -0
- package/common/rnexecutorch/models/voice_activity_detection/Utils.h +13 -0
- package/common/rnexecutorch/models/voice_activity_detection/VoiceActivityDetection.cpp +160 -0
- package/common/rnexecutorch/models/voice_activity_detection/VoiceActivityDetection.h +36 -0
- package/common/rnexecutorch/tests/CMakeLists.txt +30 -0
- package/common/rnexecutorch/tests/NumericalTest.cpp +110 -0
- package/common/rnexecutorch/tests/README.md +30 -13
- package/common/rnexecutorch/threads/GlobalThreadPool.h +4 -0
- package/common/runner/arange_util.cpp +44 -0
- package/common/runner/arange_util.h +37 -0
- package/common/runner/constants.h +28 -0
- package/common/runner/io_manager.h +240 -0
- package/common/runner/irunner.h +87 -16
- package/common/runner/kernel_includes.h +23 -0
- package/common/runner/runner.cpp +151 -66
- package/common/runner/runner.h +39 -22
- package/common/runner/sampler.cpp +8 -1
- package/common/runner/sampler.h +4 -2
- package/common/runner/stats.h +1 -4
- package/common/runner/text_decoder_runner.cpp +26 -12
- package/common/runner/text_decoder_runner.h +52 -31
- package/common/runner/text_prefiller.cpp +46 -12
- package/common/runner/text_prefiller.h +38 -4
- package/common/runner/text_token_generator.h +51 -26
- package/common/runner/util.h +53 -8
- package/ios/RnExecutorch.xcodeproj/project.pbxproj +0 -23
- package/lib/module/Error.js +1 -0
- package/lib/module/Error.js.map +1 -1
- package/lib/module/constants/directories.js +1 -1
- package/lib/module/constants/directories.js.map +1 -1
- package/lib/module/constants/modelUrls.js +32 -1
- package/lib/module/constants/modelUrls.js.map +1 -1
- package/lib/module/constants/ocr/models.js +7 -7
- package/lib/module/constants/ocr/models.js.map +1 -1
- package/lib/module/constants/ocr/symbols.js +3 -2
- package/lib/module/constants/ocr/symbols.js.map +1 -1
- package/lib/module/controllers/LLMController.js +10 -1
- package/lib/module/controllers/LLMController.js.map +1 -1
- package/lib/module/controllers/OCRController.js +3 -3
- package/lib/module/controllers/OCRController.js.map +1 -1
- package/lib/module/controllers/VerticalOCRController.js +2 -2
- package/lib/module/controllers/VerticalOCRController.js.map +1 -1
- package/lib/module/hooks/computer_vision/useOCR.js +3 -3
- package/lib/module/hooks/computer_vision/useOCR.js.map +1 -1
- package/lib/module/hooks/{useNonStaticModule.js → computer_vision/useTextToImage.js} +21 -16
- package/lib/module/hooks/computer_vision/useTextToImage.js.map +1 -0
- package/lib/module/hooks/computer_vision/useVerticalOCR.js +3 -3
- package/lib/module/hooks/computer_vision/useVerticalOCR.js.map +1 -1
- package/lib/module/hooks/natural_language_processing/useLLM.js +3 -3
- package/lib/module/hooks/natural_language_processing/useLLM.js.map +1 -1
- package/lib/module/hooks/natural_language_processing/useTokenizer.js +5 -5
- package/lib/module/hooks/natural_language_processing/useTokenizer.js.map +1 -1
- package/lib/module/hooks/natural_language_processing/useVAD.js +13 -0
- package/lib/module/hooks/natural_language_processing/useVAD.js.map +1 -0
- package/lib/module/index.js +7 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/modules/computer_vision/OCRModule.js +2 -2
- package/lib/module/modules/computer_vision/OCRModule.js.map +1 -1
- package/lib/module/modules/computer_vision/TextToImageModule.js +48 -0
- package/lib/module/modules/computer_vision/TextToImageModule.js.map +1 -0
- package/lib/module/modules/computer_vision/VerticalOCRModule.js +2 -2
- package/lib/module/modules/computer_vision/VerticalOCRModule.js.map +1 -1
- package/lib/module/modules/natural_language_processing/SpeechToTextModule.js +7 -4
- package/lib/module/modules/natural_language_processing/SpeechToTextModule.js.map +1 -1
- package/lib/module/modules/natural_language_processing/VADModule.js +19 -0
- package/lib/module/modules/natural_language_processing/VADModule.js.map +1 -0
- package/lib/module/types/llm.js.map +1 -1
- package/lib/module/types/vad.js +2 -0
- package/lib/module/types/vad.js.map +1 -0
- package/lib/module/utils/ResourceFetcher.js +2 -1
- package/lib/module/utils/ResourceFetcher.js.map +1 -1
- package/lib/module/utils/ResourceFetcherUtils.js +6 -6
- package/lib/module/utils/ResourceFetcherUtils.js.map +1 -1
- package/lib/typescript/Error.d.ts +1 -0
- package/lib/typescript/Error.d.ts.map +1 -1
- package/lib/typescript/constants/modelUrls.d.ts +23 -0
- package/lib/typescript/constants/modelUrls.d.ts.map +1 -1
- package/lib/typescript/constants/ocr/symbols.d.ts +1 -1
- package/lib/typescript/constants/ocr/symbols.d.ts.map +1 -1
- package/lib/typescript/controllers/LLMController.d.ts.map +1 -1
- package/lib/typescript/controllers/OCRController.d.ts +1 -1
- package/lib/typescript/controllers/OCRController.d.ts.map +1 -1
- package/lib/typescript/controllers/VerticalOCRController.d.ts +1 -1
- package/lib/typescript/controllers/VerticalOCRController.d.ts.map +1 -1
- package/lib/typescript/hooks/computer_vision/useOCR.d.ts +1 -1
- package/lib/typescript/hooks/computer_vision/useOCR.d.ts.map +1 -1
- package/lib/typescript/hooks/computer_vision/useTextToImage.d.ts +22 -0
- package/lib/typescript/hooks/computer_vision/useTextToImage.d.ts.map +1 -0
- package/lib/typescript/hooks/computer_vision/useVerticalOCR.d.ts +1 -1
- package/lib/typescript/hooks/computer_vision/useVerticalOCR.d.ts.map +1 -1
- package/lib/typescript/hooks/natural_language_processing/useLLM.d.ts.map +1 -1
- package/lib/typescript/hooks/natural_language_processing/useSpeechToText.d.ts +2 -2
- package/lib/typescript/hooks/natural_language_processing/useVAD.d.ts +16 -0
- package/lib/typescript/hooks/natural_language_processing/useVAD.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +8 -1
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/modules/computer_vision/OCRModule.d.ts +1 -1
- package/lib/typescript/modules/computer_vision/OCRModule.d.ts.map +1 -1
- package/lib/typescript/modules/computer_vision/TextToImageModule.d.ts +16 -0
- package/lib/typescript/modules/computer_vision/TextToImageModule.d.ts.map +1 -0
- package/lib/typescript/modules/computer_vision/VerticalOCRModule.d.ts +1 -1
- package/lib/typescript/modules/computer_vision/VerticalOCRModule.d.ts.map +1 -1
- package/lib/typescript/modules/natural_language_processing/SpeechToTextModule.d.ts +3 -2
- package/lib/typescript/modules/natural_language_processing/SpeechToTextModule.d.ts.map +1 -1
- package/lib/typescript/modules/natural_language_processing/VADModule.d.ts +10 -0
- package/lib/typescript/modules/natural_language_processing/VADModule.d.ts.map +1 -0
- package/lib/typescript/types/llm.d.ts +2 -0
- package/lib/typescript/types/llm.d.ts.map +1 -1
- package/lib/typescript/types/vad.d.ts +5 -0
- package/lib/typescript/types/vad.d.ts.map +1 -0
- package/lib/typescript/utils/ResourceFetcher.d.ts +29 -0
- package/lib/typescript/utils/ResourceFetcher.d.ts.map +1 -1
- package/lib/typescript/utils/ResourceFetcherUtils.d.ts +2 -2
- package/lib/typescript/utils/ResourceFetcherUtils.d.ts.map +1 -1
- package/package.json +11 -8
- package/react-native-executorch.podspec +9 -9
- package/src/Error.ts +1 -0
- package/src/constants/directories.ts +1 -1
- package/src/constants/modelUrls.ts +36 -1
- package/src/constants/ocr/models.ts +7 -7
- package/src/constants/ocr/symbols.ts +3 -2
- package/src/controllers/LLMController.ts +12 -1
- package/src/controllers/OCRController.ts +3 -3
- package/src/controllers/VerticalOCRController.ts +2 -2
- package/src/hooks/computer_vision/useOCR.ts +4 -5
- package/src/hooks/computer_vision/useTextToImage.ts +92 -0
- package/src/hooks/computer_vision/useVerticalOCR.ts +4 -5
- package/src/hooks/natural_language_processing/useLLM.ts +3 -4
- package/src/hooks/natural_language_processing/useTokenizer.ts +5 -5
- package/src/hooks/natural_language_processing/useVAD.ts +15 -0
- package/src/index.ts +20 -1
- package/src/modules/computer_vision/OCRModule.ts +2 -2
- package/src/modules/computer_vision/TextToImageModule.ts +93 -0
- package/src/modules/computer_vision/VerticalOCRModule.ts +2 -2
- package/src/modules/natural_language_processing/SpeechToTextModule.ts +8 -4
- package/src/modules/natural_language_processing/VADModule.ts +27 -0
- package/src/types/llm.ts +2 -0
- package/src/types/vad.ts +4 -0
- package/src/utils/ResourceFetcher.ts +2 -1
- package/src/utils/ResourceFetcherUtils.ts +8 -8
- package/third-party/android/libs/cpuinfo/arm64-v8a/libcpuinfo.so +0 -0
- package/third-party/android/libs/executorch/arm64-v8a/libexecutorch.so +0 -0
- package/third-party/android/libs/executorch/x86_64/libexecutorch.so +0 -0
- package/third-party/android/libs/pthreadpool/arm64-v8a/libpthreadpool.so +0 -0
- package/third-party/include/c10/macros/Export.h +0 -78
- package/third-party/include/c10/macros/Macros.h +1 -520
- package/third-party/include/c10/util/BFloat16-inl.h +1 -339
- package/third-party/include/c10/util/BFloat16.h +1 -122
- package/third-party/include/c10/util/Half-inl.h +1 -347
- package/third-party/include/c10/util/Half.h +6 -419
- package/third-party/include/c10/util/TypeSafeSignMath.h +1 -133
- package/third-party/include/c10/util/bit_cast.h +1 -43
- package/third-party/include/c10/util/complex.h +1 -568
- package/third-party/include/c10/util/floating_point_utils.h +1 -33
- package/third-party/include/c10/util/irange.h +1 -1
- package/third-party/include/c10/util/llvmMathExtras.h +866 -0
- package/third-party/include/c10/util/safe_numerics.h +97 -0
- package/third-party/include/executorch/ExecuTorchError.h +6 -7
- package/third-party/include/executorch/ExecuTorchLLM/ExecuTorchLLM.h +12 -0
- package/third-party/include/executorch/ExecuTorchLLM/ExecuTorchLLMConfig.h +56 -0
- package/third-party/include/executorch/ExecuTorchLLM/ExecuTorchLLMError.h +16 -0
- package/third-party/include/executorch/ExecuTorchLLM/ExecuTorchLLMMultimodalRunner.h +227 -0
- package/third-party/include/executorch/ExecuTorchLLM/ExecuTorchLLMTextRunner.h +97 -0
- package/third-party/include/executorch/ExecuTorchLLM/module.modulemap +4 -0
- package/third-party/include/executorch/ExecuTorchLog.h +1 -0
- package/third-party/include/executorch/ExecuTorchModule.h +177 -4
- package/third-party/include/executorch/ExecuTorchTensor.h +3 -4
- package/third-party/include/executorch/ExecuTorchValue.h +1 -7
- package/third-party/include/executorch/extension/module/module.h +139 -8
- package/third-party/include/executorch/extension/tensor/tensor.h +1 -0
- package/third-party/include/executorch/extension/tensor/tensor_ptr.h +88 -26
- package/third-party/include/executorch/extension/threadpool/threadpool.h +4 -1
- package/third-party/include/executorch/runtime/backend/backend_init_context.h +6 -0
- package/third-party/include/executorch/runtime/backend/interface.h +1 -1
- package/third-party/include/executorch/runtime/core/error.h +76 -49
- package/third-party/include/executorch/runtime/core/exec_aten/util/scalar_type_util.h +18 -4
- package/third-party/include/executorch/runtime/core/memory_allocator.h +12 -2
- package/third-party/include/executorch/runtime/core/named_data_map.h +1 -11
- package/third-party/include/executorch/runtime/core/portable_type/c10/c10/macros/Export.h +0 -78
- package/third-party/include/executorch/runtime/core/portable_type/c10/c10/macros/Macros.h +1 -520
- package/third-party/include/executorch/runtime/core/portable_type/c10/c10/util/BFloat16-inl.h +1 -339
- package/third-party/include/executorch/runtime/core/portable_type/c10/c10/util/BFloat16.h +1 -122
- package/third-party/include/executorch/runtime/core/portable_type/c10/c10/util/Half-inl.h +1 -347
- package/third-party/include/executorch/runtime/core/portable_type/c10/c10/util/Half.h +6 -419
- package/third-party/include/executorch/runtime/core/portable_type/c10/c10/util/TypeSafeSignMath.h +1 -133
- package/third-party/include/executorch/runtime/core/portable_type/c10/c10/util/bit_cast.h +1 -43
- package/third-party/include/executorch/runtime/core/portable_type/c10/c10/util/complex.h +1 -568
- package/third-party/include/executorch/runtime/core/portable_type/c10/c10/util/floating_point_utils.h +1 -33
- package/third-party/include/executorch/runtime/core/portable_type/c10/c10/util/irange.h +1 -1
- package/third-party/include/executorch/runtime/core/portable_type/c10/c10/util/llvmMathExtras.h +866 -0
- package/third-party/include/executorch/runtime/core/portable_type/c10/c10/util/safe_numerics.h +97 -0
- package/third-party/include/executorch/runtime/core/portable_type/c10/torch/headeronly/macros/Export.h +66 -0
- package/third-party/include/executorch/runtime/core/portable_type/c10/torch/headeronly/macros/Macros.h +553 -0
- package/third-party/include/executorch/runtime/core/portable_type/c10/torch/headeronly/util/BFloat16.h +477 -0
- package/third-party/include/executorch/runtime/core/portable_type/c10/torch/headeronly/util/Half.h +781 -0
- package/third-party/include/executorch/runtime/core/portable_type/c10/torch/headeronly/util/TypeSafeSignMath.h +141 -0
- package/third-party/include/executorch/runtime/core/portable_type/c10/torch/headeronly/util/bit_cast.h +49 -0
- package/third-party/include/executorch/runtime/core/portable_type/c10/torch/headeronly/util/complex.h +593 -0
- package/third-party/include/executorch/runtime/core/portable_type/c10/torch/headeronly/util/floating_point_utils.h +38 -0
- package/third-party/include/executorch/runtime/core/tensor_layout.h +1 -1
- package/third-party/include/executorch/runtime/executor/merged_data_map.h +142 -0
- package/third-party/include/executorch/runtime/executor/method.h +21 -8
- package/third-party/include/executorch/runtime/executor/method_meta.h +20 -2
- package/third-party/include/executorch/runtime/executor/program.h +0 -10
- package/third-party/include/executorch/runtime/kernel/operator_registry.h +1 -1
- package/third-party/include/executorch/runtime/platform/compiler.h +2 -0
- package/third-party/include/executorch/schema/extended_header.h +10 -1
- package/third-party/include/torch/headeronly/macros/Export.h +66 -0
- package/third-party/include/torch/headeronly/macros/Macros.h +553 -0
- package/third-party/include/torch/headeronly/util/BFloat16.h +477 -0
- package/third-party/include/torch/headeronly/util/Half.h +781 -0
- package/third-party/include/torch/headeronly/util/TypeSafeSignMath.h +141 -0
- package/third-party/include/torch/headeronly/util/bit_cast.h +49 -0
- package/third-party/include/torch/headeronly/util/complex.h +593 -0
- package/third-party/include/torch/headeronly/util/floating_point_utils.h +38 -0
- package/third-party/ios/ExecutorchLib.xcframework/ios-arm64/ExecutorchLib.framework/ExecutorchLib +0 -0
- package/third-party/ios/ExecutorchLib.xcframework/ios-arm64/ExecutorchLib.framework/Info.plist +0 -0
- package/third-party/ios/ExecutorchLib.xcframework/ios-arm64-simulator/ExecutorchLib.framework/ExecutorchLib +0 -0
- package/third-party/ios/ExecutorchLib.xcframework/ios-arm64-simulator/ExecutorchLib.framework/Info.plist +0 -0
- package/common/rnexecutorch/tests/run_all_tests.sh +0 -14
- package/common/rnexecutorch/tests/run_test.sh +0 -18
- package/ios/RnExecutorch/utils/Conversions.h +0 -14
- package/ios/RnExecutorch/utils/ETError.h +0 -26
- package/ios/RnExecutorch/utils/ImageProcessor.h +0 -15
- package/ios/RnExecutorch/utils/ImageProcessor.mm +0 -147
- package/ios/RnExecutorch/utils/Numerical.h +0 -3
- package/ios/RnExecutorch/utils/Numerical.mm +0 -18
- package/ios/RnExecutorch/utils/ScalarType.h +0 -14
- package/ios/RnExecutorch/utils/ScalarType.mm +0 -21
- package/lib/module/hooks/useNonStaticModule.js.map +0 -1
- package/lib/typescript/hooks/useNonStaticModule.d.ts +0 -21
- package/lib/typescript/hooks/useNonStaticModule.d.ts.map +0 -1
- package/src/hooks/useNonStaticModule.ts +0 -74
- package/third-party/include/executorch/extension/kernel_util/make_boxed_from_unboxed_functor.h +0 -181
- package/third-party/include/executorch/extension/kernel_util/meta_programming.h +0 -108
- package/third-party/include/executorch/extension/kernel_util/type_list.h +0 -137
- package/third-party/include/executorch/extension/threadpool/threadpool_guard.h +0 -35
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
/**
|
|
4
|
-
* @internal
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import { getInfoAsync, makeDirectoryAsync } from 'expo-file-system';
|
|
8
3
|
import { RNEDirectory } from '../constants/directories';
|
|
9
4
|
import { Asset } from 'expo-asset';
|
|
10
5
|
import { Logger } from '../common/Logger';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
import { getInfoAsync, makeDirectoryAsync } from 'expo-file-system/legacy';
|
|
11
11
|
export let HTTP_CODE = /*#__PURE__*/function (HTTP_CODE) {
|
|
12
12
|
HTTP_CODE[HTTP_CODE["OK"] = 200] = "OK";
|
|
13
13
|
HTTP_CODE[HTTP_CODE["PARTIAL_CONTENT"] = 206] = "PARTIAL_CONTENT";
|
|
@@ -50,7 +50,7 @@ export let ResourceFetcherUtils;
|
|
|
50
50
|
let totalLength = 0;
|
|
51
51
|
let previousFilesTotalLength = 0;
|
|
52
52
|
for (const source of sources) {
|
|
53
|
-
const type =
|
|
53
|
+
const type = ResourceFetcherUtils.getType(source);
|
|
54
54
|
let length = 0;
|
|
55
55
|
try {
|
|
56
56
|
if (type === SourceType.REMOTE_FILE && typeof source === 'string') {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["RNEDirectory","Asset","Logger","getInfoAsync","makeDirectoryAsync","HTTP_CODE","DownloadStatus","SourceType","ResourceFetcherUtils","_ResourceFetcherUtils","getType","source","OBJECT","uri","fromModule","startsWith","DEV_MODE_FILE","RELEASE_MODE_FILE","LOCAL_FILE","REMOTE_FILE","getFilesSizes","sources","results","totalLength","previousFilesTotalLength","type","length","response","fetch","method","ok","warn","status","contentLength","headers","get","parseInt","error","push","removeFilePrefix","slice","hashObject","jsonString","hash","i","charCodeAt","toString","calculateDownloadProgress","currentFileLength","setProgress","progress","baseProgress","scaledProgress","updatedProgress","triggerHuggingFaceDownloadCounter","url","URL","host","pathname","baseUrl","protocol","split","createDirectoryIfNoExists","checkFileExists","intermediates","fileUri","fileInfo","exists","getFilenameFromUri","cleanUri","replace"],"sourceRoot":"../../../src","sources":["utils/ResourceFetcherUtils.ts"],"mappings":";;AAAA,SAASA,YAAY,QAAQ,0BAA0B;AAEvD,SAASC,KAAK,QAAQ,YAAY;AAClC,SAASC,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
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Error.d.ts","sourceRoot":"","sources":["../../src/Error.ts"],"names":[],"mappings":"AAAA,oBAAY,OAAO;IAEjB,cAAc,MAAO;IACrB,eAAe,MAAO;IACtB,eAAe,MAAO;IACtB,eAAe,MAAO;IACtB,oBAAoB,MAAO;IAC3B,kBAAkB,MAAO;IAGzB,yBAAyB,MAAO;IAChC,gBAAgB,MAAO;IACvB,mBAAmB,MAAO;IAK1B,EAAE,IAAO;IACT,QAAQ,IAAO;IACf,YAAY,IAAO;IACnB,WAAW,IAAO;IAGlB,YAAY,KAAO;IACnB,cAAc,KAAO;IACrB,eAAe,KAAO;IACtB,WAAW,KAAO;IAClB,eAAe,KAAO;IAGtB,QAAQ,KAAO;IACf,sBAAsB,KAAO;IAC7B,YAAY,KAAO;IACnB,cAAc,KAAO;IACrB,mBAAmB,KAAO;IAC1B,cAAc,KAAO;IAGrB,4BAA4B,KAAO;IACnC,8BAA8B,KAAO;IACrC,qBAAqB,KAAO;CAC7B;AAED,eAAO,MAAM,QAAQ,GAAI,GAAG,OAAO,GAAG,OAAO,GAAG,KAAK,KAAG,MAcvD,CAAC"}
|
|
1
|
+
{"version":3,"file":"Error.d.ts","sourceRoot":"","sources":["../../src/Error.ts"],"names":[],"mappings":"AAAA,oBAAY,OAAO;IAEjB,cAAc,MAAO;IACrB,eAAe,MAAO;IACtB,eAAe,MAAO;IACtB,eAAe,MAAO;IACtB,oBAAoB,MAAO;IAC3B,aAAa,MAAO;IACpB,kBAAkB,MAAO;IAGzB,yBAAyB,MAAO;IAChC,gBAAgB,MAAO;IACvB,mBAAmB,MAAO;IAK1B,EAAE,IAAO;IACT,QAAQ,IAAO;IACf,YAAY,IAAO;IACnB,WAAW,IAAO;IAGlB,YAAY,KAAO;IACnB,cAAc,KAAO;IACrB,eAAe,KAAO;IACtB,WAAW,KAAO;IAClB,eAAe,KAAO;IAGtB,QAAQ,KAAO;IACf,sBAAsB,KAAO;IAC7B,YAAY,KAAO;IACnB,cAAc,KAAO;IACrB,mBAAmB,KAAO;IAC1B,cAAc,KAAO;IAGrB,4BAA4B,KAAO;IACnC,8BAA8B,KAAO;IACrC,qBAAqB,KAAO;CAC7B;AAED,eAAO,MAAM,QAAQ,GAAI,GAAG,OAAO,GAAG,OAAO,GAAG,KAAK,KAAG,MAcvD,CAAC"}
|
|
@@ -182,6 +182,12 @@ export declare const WHISPER_TINY_EN: {
|
|
|
182
182
|
decoderSource: string;
|
|
183
183
|
tokenizerSource: string;
|
|
184
184
|
};
|
|
185
|
+
export declare const WHISPER_TINY_EN_QUANTIZED: {
|
|
186
|
+
isMultilingual: boolean;
|
|
187
|
+
encoderSource: string;
|
|
188
|
+
decoderSource: string;
|
|
189
|
+
tokenizerSource: string;
|
|
190
|
+
};
|
|
185
191
|
export declare const WHISPER_BASE_EN: {
|
|
186
192
|
isMultilingual: boolean;
|
|
187
193
|
encoderSource: string;
|
|
@@ -238,4 +244,21 @@ export declare const CLIP_VIT_BASE_PATCH32_TEXT: {
|
|
|
238
244
|
modelSource: string;
|
|
239
245
|
tokenizerSource: string;
|
|
240
246
|
};
|
|
247
|
+
export declare const BK_SDM_TINY_VPRED_512: {
|
|
248
|
+
schedulerSource: string;
|
|
249
|
+
tokenizerSource: string;
|
|
250
|
+
encoderSource: string;
|
|
251
|
+
unetSource: string;
|
|
252
|
+
decoderSource: string;
|
|
253
|
+
};
|
|
254
|
+
export declare const BK_SDM_TINY_VPRED_256: {
|
|
255
|
+
schedulerSource: string;
|
|
256
|
+
tokenizerSource: string;
|
|
257
|
+
encoderSource: string;
|
|
258
|
+
unetSource: string;
|
|
259
|
+
decoderSource: string;
|
|
260
|
+
};
|
|
261
|
+
export declare const FSMN_VAD: {
|
|
262
|
+
modelSource: string;
|
|
263
|
+
};
|
|
241
264
|
//# sourceMappingURL=modelUrls.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modelUrls.d.ts","sourceRoot":"","sources":["../../../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|
1
|
-
{"version":3,"file":"symbols.d.ts","sourceRoot":"","sources":["../../../../src/constants/ocr/symbols.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,SAAS;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"symbols.d.ts","sourceRoot":"","sources":["../../../../src/constants/ocr/symbols.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,SAAS;;;;;;;;;CAkBrB,CAAC;AAEF,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+HnB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LLMController.d.ts","sourceRoot":"","sources":["../../../src/controllers/LLMController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"LLMController.d.ts","sourceRoot":"","sources":["../../../src/controllers/LLMController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAKjD,OAAO,EACL,UAAU,EACV,gBAAgB,EAChB,OAAO,EACP,OAAO,EAEP,WAAW,EACZ,MAAM,cAAc,CAAC;AAKtB,qBAAa,aAAa;IACxB,OAAO,CAAC,YAAY,CAAM;IAC1B,OAAO,CAAC,UAAU,CAAmC;IACrD,OAAO,CAAC,WAAW,CAA0B;IAC7C,OAAO,CAAC,eAAe,CAAM;IAC7B,OAAO,CAAC,OAAO,CAAC,CAA0B;IAC1C,OAAO,CAAC,SAAS,CAAM;IACvB,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,eAAe,CAAiB;IAGxC,OAAO,CAAC,aAAa,CAA0B;IAC/C,OAAO,CAAC,gBAAgB,CAA6B;IACrD,OAAO,CAAC,sBAAsB,CAAsC;IACpE,OAAO,CAAC,eAAe,CAA6B;IACpD,OAAO,CAAC,oBAAo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O,EAAE;IAwB/C,WAAW,CAAC,OAAO,EAAE,MAAM;IAuCjC,aAAa,CAAC,KAAK,EAAE,MAAM;IAQlC,OAAO,CAAC,iBAAiB;CAyB1B"}
|
|
@@ -18,7 +18,7 @@ export declare class OCRController {
|
|
|
18
18
|
recognizerMedium: ResourceSource;
|
|
19
19
|
recognizerSmall: ResourceSource;
|
|
20
20
|
}, language: OCRLanguage, onDownloadProgressCallback?: (downloadProgress: number) => void) => Promise<void>;
|
|
21
|
-
forward: (
|
|
21
|
+
forward: (imageSource: string) => Promise<any>;
|
|
22
22
|
delete(): void;
|
|
23
23
|
}
|
|
24
24
|
//# sourceMappingURL=OCRController.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OCRController.d.ts","sourceRoot":"","sources":["../../../src/controllers/OCRController.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAG3C,qBAAa,aAAa;IACxB,OAAO,CAAC,YAAY,CAAM;IACnB,OAAO,EAAE,OAAO,CAAS;IACzB,YAAY,EAAE,OAAO,CAAS;IAC9B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAQ;IACnC,OAAO,CAAC,eAAe,CAA6B;IACpD,OAAO,CAAC,oBAAoB,CAAkC;IAC9D,OAAO,CAAC,aAAa,CAA0B;gBAEnC,EACV,eAA2C,EAC3C,oBAAqD,EACrD,aAAsC,GACvC;sCAH8B,OAAO;gDACG,OAAO;kCACrB,MAAM;KAC3B;IAMC,IAAI,GACT,gBAAgB,cAAc,EAC9B,mBAAmB;QACjB,eAAe,EAAE,cAAc,CAAC;QAChC,gBAAgB,EAAE,cAAc,CAAC;QACjC,eAAe,EAAE,cAAc,CAAC;KACjC,EACD,UAAU,WAAW,EACrB,6BAA6B,CAAC,gBAAgB,EAAE,MAAM,KAAK,IAAI,mBAuC/D;IAEK,OAAO,GAAU,
|
|
1
|
+
{"version":3,"file":"OCRController.d.ts","sourceRoot":"","sources":["../../../src/controllers/OCRController.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAG3C,qBAAa,aAAa;IACxB,OAAO,CAAC,YAAY,CAAM;IACnB,OAAO,EAAE,OAAO,CAAS;IACzB,YAAY,EAAE,OAAO,CAAS;IAC9B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAQ;IACnC,OAAO,CAAC,eAAe,CAA6B;IACpD,OAAO,CAAC,oBAAoB,CAAkC;IAC9D,OAAO,CAAC,aAAa,CAA0B;gBAEnC,EACV,eAA2C,EAC3C,oBAAqD,EACrD,aAAsC,GACvC;sCAH8B,OAAO;gDACG,OAAO;kCACrB,MAAM;KAC3B;IAMC,IAAI,GACT,gBAAgB,cAAc,EAC9B,mBAAmB;QACjB,eAAe,EAAE,cAAc,CAAC;QAChC,gBAAgB,EAAE,cAAc,CAAC;QACjC,eAAe,EAAE,cAAc,CAAC;KACjC,EACD,UAAU,WAAW,EACrB,6BAA6B,CAAC,gBAAgB,EAAE,MAAM,KAAK,IAAI,mBAuC/D;IAEK,OAAO,GAAU,aAAa,MAAM,kBAkBzC;IAEK,MAAM;CAWd"}
|
|
@@ -20,7 +20,7 @@ export declare class VerticalOCRController {
|
|
|
20
20
|
recognizerLarge: ResourceSource;
|
|
21
21
|
recognizerSmall: ResourceSource;
|
|
22
22
|
}, language: OCRLanguage, independentCharacters: boolean, onDownloadProgressCallback: (downloadProgress: number) => void) => Promise<void>;
|
|
23
|
-
forward: (
|
|
23
|
+
forward: (imageSource: string) => Promise<any>;
|
|
24
24
|
delete(): void;
|
|
25
25
|
}
|
|
26
26
|
//# sourceMappingURL=VerticalOCRController.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VerticalOCRController.d.ts","sourceRoot":"","sources":["../../../src/controllers/VerticalOCRController.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAG3C,qBAAa,qBAAqB;IAChC,OAAO,CAAC,eAAe,CAAM;IACtB,OAAO,EAAE,OAAO,CAAS;IACzB,YAAY,EAAE,OAAO,CAAS;IAC9B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAQ;IACnC,OAAO,CAAC,eAAe,CAA6B;IACpD,OAAO,CAAC,oBAAoB,CAAkC;IAC9D,OAAO,CAAC,aAAa,CAA0B;gBAEnC,EACV,eAA2C,EAC3C,oBAAqD,EACrD,aAAsC,GACvC;sCAH8B,OAAO;gDACG,OAAO;kCACrB,MAAM;KAC3B;IAMC,IAAI,GACT,iBAAiB;QACf,aAAa,EAAE,cAAc,CAAC;QAC9B,cAAc,EAAE,cAAc,CAAC;KAChC,EACD,mBAAmB;QACjB,eAAe,EAAE,cAAc,CAAC;QAChC,eAAe,EAAE,cAAc,CAAC;KACjC,EACD,UAAU,WAAW,EACrB,uBAAuB,OAAO,EAC9B,4BAA4B,CAAC,gBAAgB,EAAE,MAAM,KAAK,IAAI,mBA4C9D;IAEK,OAAO,GAAU,
|
|
1
|
+
{"version":3,"file":"VerticalOCRController.d.ts","sourceRoot":"","sources":["../../../src/controllers/VerticalOCRController.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAG3C,qBAAa,qBAAqB;IAChC,OAAO,CAAC,eAAe,CAAM;IACtB,OAAO,EAAE,OAAO,CAAS;IACzB,YAAY,EAAE,OAAO,CAAS;IAC9B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAQ;IACnC,OAAO,CAAC,eAAe,CAA6B;IACpD,OAAO,CAAC,oBAAoB,CAAkC;IAC9D,OAAO,CAAC,aAAa,CAA0B;gBAEnC,EACV,eAA2C,EAC3C,oBAAqD,EACrD,aAAsC,GACvC;sCAH8B,OAAO;gDACG,OAAO;kCACrB,MAAM;KAC3B;IAMC,IAAI,GACT,iBAAiB;QACf,aAAa,EAAE,cAAc,CAAC;QAC9B,cAAc,EAAE,cAAc,CAAC;KAChC,EACD,mBAAmB;QACjB,eAAe,EAAE,cAAc,CAAC;QAChC,eAAe,EAAE,cAAc,CAAC;KACjC,EACD,UAAU,WAAW,EACrB,uBAAuB,OAAO,EAC9B,4BAA4B,CAAC,gBAAgB,EAAE,MAAM,KAAK,IAAI,mBA4C9D;IAEK,OAAO,GAAU,aAAa,MAAM,kBAkBzC;IAEK,MAAM;CAWd"}
|
|
@@ -4,7 +4,7 @@ interface OCRModule {
|
|
|
4
4
|
error: string | null;
|
|
5
5
|
isReady: boolean;
|
|
6
6
|
isGenerating: boolean;
|
|
7
|
-
forward: (
|
|
7
|
+
forward: (imageSource: string) => Promise<OCRDetection[]>;
|
|
8
8
|
downloadProgress: number;
|
|
9
9
|
}
|
|
10
10
|
export declare const useOCR: ({ model, preventLoad, }: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useOCR.d.ts","sourceRoot":"","sources":["../../../../src/hooks/computer_vision/useOCR.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAG5D,UAAU,SAAS;IACjB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,OAAO,CAAC;IACtB,OAAO,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"useOCR.d.ts","sourceRoot":"","sources":["../../../../src/hooks/computer_vision/useOCR.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAG5D,UAAU,SAAS;IACjB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,OAAO,CAAC;IACtB,OAAO,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;IAC1D,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,eAAO,MAAM,MAAM,GAAI,yBAGpB;IACD,KAAK,EAAE;QACL,cAAc,EAAE,cAAc,CAAC;QAC/B,eAAe,EAAE,cAAc,CAAC;QAChC,gBAAgB,EAAE,cAAc,CAAC;QACjC,eAAe,EAAE,cAAc,CAAC;QAChC,QAAQ,EAAE,WAAW,CAAC;KACvB,CAAC;IACF,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,KAAG,SAmDH,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ResourceSource } from '../../types/common';
|
|
2
|
+
interface TextToImageType {
|
|
3
|
+
isReady: boolean;
|
|
4
|
+
isGenerating: boolean;
|
|
5
|
+
downloadProgress: number;
|
|
6
|
+
error: string | null;
|
|
7
|
+
generate: (input: string, imageSize?: number, numSteps?: number, seed?: number) => Promise<string>;
|
|
8
|
+
interrupt: () => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const useTextToImage: ({ model, inferenceCallback, preventLoad, }: {
|
|
11
|
+
model: {
|
|
12
|
+
tokenizerSource: ResourceSource;
|
|
13
|
+
schedulerSource: ResourceSource;
|
|
14
|
+
encoderSource: ResourceSource;
|
|
15
|
+
unetSource: ResourceSource;
|
|
16
|
+
decoderSource: ResourceSource;
|
|
17
|
+
};
|
|
18
|
+
inferenceCallback?: (stepIdx: number) => void;
|
|
19
|
+
preventLoad?: boolean;
|
|
20
|
+
}) => TextToImageType;
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=useTextToImage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTextToImage.d.ts","sourceRoot":"","sources":["../../../../src/hooks/computer_vision/useTextToImage.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGpD,UAAU,eAAe;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,OAAO,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;IACzB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,EAAE,CACR,KAAK,EAAE,MAAM,EACb,SAAS,CAAC,EAAE,MAAM,EAClB,QAAQ,CAAC,EAAE,MAAM,EACjB,IAAI,CAAC,EAAE,MAAM,KACV,OAAO,CAAC,MAAM,CAAC,CAAC;IACrB,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,eAAO,MAAM,cAAc,GAAI,4CAI5B;IACD,KAAK,EAAE;QACL,eAAe,EAAE,cAAc,CAAC;QAChC,eAAe,EAAE,cAAc,CAAC;QAChC,aAAa,EAAE,cAAc,CAAC;QAC9B,UAAU,EAAE,cAAc,CAAC;QAC3B,aAAa,EAAE,cAAc,CAAC;KAC/B,CAAC;IACF,iBAAiB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,KAAG,eA0DH,CAAC"}
|
|
@@ -4,7 +4,7 @@ interface OCRModule {
|
|
|
4
4
|
error: string | null;
|
|
5
5
|
isReady: boolean;
|
|
6
6
|
isGenerating: boolean;
|
|
7
|
-
forward: (
|
|
7
|
+
forward: (imageSource: string) => Promise<OCRDetection[]>;
|
|
8
8
|
downloadProgress: number;
|
|
9
9
|
}
|
|
10
10
|
export declare const useVerticalOCR: ({ model, independentCharacters, preventLoad, }: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useVerticalOCR.d.ts","sourceRoot":"","sources":["../../../../src/hooks/computer_vision/useVerticalOCR.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAG5D,UAAU,SAAS;IACjB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,OAAO,CAAC;IACtB,OAAO,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"useVerticalOCR.d.ts","sourceRoot":"","sources":["../../../../src/hooks/computer_vision/useVerticalOCR.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAG5D,UAAU,SAAS;IACjB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,OAAO,CAAC;IACtB,OAAO,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;IAC1D,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,eAAO,MAAM,cAAc,GAAI,gDAI5B;IACD,KAAK,EAAE;QACL,aAAa,EAAE,cAAc,CAAC;QAC9B,cAAc,EAAE,cAAc,CAAC;QAC/B,eAAe,EAAE,cAAc,CAAC;QAChC,eAAe,EAAE,cAAc,CAAC;QAChC,QAAQ,EAAE,WAAW,CAAC;KACvB,CAAC;IACF,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,KAAG,SAuDH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLLM.d.ts","sourceRoot":"","sources":["../../../../src/hooks/natural_language_processing/useLLM.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAIL,OAAO,EAGR,MAAM,iBAAiB,CAAC;AAMzB,eAAO,MAAM,MAAM,GAAI,yBAGpB;IACD,KAAK,EAAE;QACL,WAAW,EAAE,cAAc,CAAC;QAC5B,eAAe,EAAE,cAAc,CAAC;QAChC,qBAAqB,EAAE,cAAc,CAAC;KACvC,CAAC;IACF,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,KAAG,
|
|
1
|
+
{"version":3,"file":"useLLM.d.ts","sourceRoot":"","sources":["../../../../src/hooks/natural_language_processing/useLLM.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAIL,OAAO,EAGR,MAAM,iBAAiB,CAAC;AAMzB,eAAO,MAAM,MAAM,GAAI,yBAGpB;IACD,KAAK,EAAE;QACL,WAAW,EAAE,cAAc,CAAC;QAC5B,eAAe,EAAE,cAAc,CAAC;QAChC,qBAAqB,EAAE,cAAc,CAAC;KACvC,CAAC;IACF,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,KAAG,OAuHH,CAAC"}
|
|
@@ -13,7 +13,7 @@ export declare const useSpeechToText: ({ model, preventLoad, }: {
|
|
|
13
13
|
decode: (tokens: number[] | Int32Array<ArrayBufferLike>, encoderOutput: number[] | Float32Array<ArrayBufferLike>) => Promise<Float32Array<ArrayBufferLike>>;
|
|
14
14
|
transcribe: (waveform: number[] | Float32Array<ArrayBufferLike>, options?: DecodingOptions | undefined) => Promise<string>;
|
|
15
15
|
stream: (options?: DecodingOptions) => Promise<string>;
|
|
16
|
-
streamStop: () =>
|
|
17
|
-
streamInsert: (waveform: number[] | Float32Array<ArrayBufferLike>) =>
|
|
16
|
+
streamStop: () => void;
|
|
17
|
+
streamInsert: (waveform: number[] | Float32Array<ArrayBufferLike>) => void;
|
|
18
18
|
};
|
|
19
19
|
//# sourceMappingURL=useSpeechToText.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ResourceSource } from '../../types/common';
|
|
2
|
+
interface Props {
|
|
3
|
+
model: {
|
|
4
|
+
modelSource: ResourceSource;
|
|
5
|
+
};
|
|
6
|
+
preventLoad?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const useVAD: ({ model, preventLoad }: Props) => {
|
|
9
|
+
error: string | null;
|
|
10
|
+
isReady: boolean;
|
|
11
|
+
isGenerating: boolean;
|
|
12
|
+
downloadProgress: number;
|
|
13
|
+
forward: (waveform: Float32Array<ArrayBufferLike>) => Promise<import("../..").Segment[]>;
|
|
14
|
+
};
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=useVAD.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useVAD.d.ts","sourceRoot":"","sources":["../../../../src/hooks/natural_language_processing/useVAD.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAIpD,UAAU,KAAK;IACb,KAAK,EAAE;QAAE,WAAW,EAAE,cAAc,CAAA;KAAE,CAAC;IACvC,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,eAAO,MAAM,MAAM,GAAI,wBAAgC,KAAK;;;;;;CAKxD,CAAC"}
|
|
@@ -6,8 +6,10 @@ declare global {
|
|
|
6
6
|
var loadExecutorchModule: (source: string) => any;
|
|
7
7
|
var loadTokenizerModule: (source: string) => any;
|
|
8
8
|
var loadImageEmbeddings: (source: string) => any;
|
|
9
|
+
var loadVAD: (source: string) => any;
|
|
9
10
|
var loadTextEmbeddings: (modelSource: string, tokenizerSource: string) => any;
|
|
10
11
|
var loadLLM: (modelSource: string, tokenizerSource: string) => any;
|
|
12
|
+
var loadTextToImage: (tokenizerSource: string, encoderSource: string, unetSource: string, decoderSource: string, schedulerBetaStart: number, schedulerBetaEnd: number, schedulerNumTrainTimesteps: number, schedulerStepsOffset: number) => any;
|
|
11
13
|
var loadSpeechToText: (encoderSource: string, decoderSource: string, modelName: string) => any;
|
|
12
14
|
var loadOCR: (detectorSource: string, recognizerLarge: string, recognizerMedium: string, recognizerSmall: string, symbols: string) => any;
|
|
13
15
|
var loadVerticalOCR: (detectorLarge: string, detectorNarrow: string, recognizer: string, symbols: string, independentCharacters?: boolean) => any;
|
|
@@ -19,10 +21,12 @@ export * from './hooks/computer_vision/useImageSegmentation';
|
|
|
19
21
|
export * from './hooks/computer_vision/useOCR';
|
|
20
22
|
export * from './hooks/computer_vision/useVerticalOCR';
|
|
21
23
|
export * from './hooks/computer_vision/useImageEmbeddings';
|
|
24
|
+
export * from './hooks/computer_vision/useTextToImage';
|
|
22
25
|
export * from './hooks/natural_language_processing/useLLM';
|
|
23
26
|
export * from './hooks/natural_language_processing/useSpeechToText';
|
|
24
27
|
export * from './hooks/natural_language_processing/useTextEmbeddings';
|
|
25
28
|
export * from './hooks/natural_language_processing/useTokenizer';
|
|
29
|
+
export * from './hooks/natural_language_processing/useVAD';
|
|
26
30
|
export * from './hooks/general/useExecutorchModule';
|
|
27
31
|
export * from './modules/computer_vision/ClassificationModule';
|
|
28
32
|
export * from './modules/computer_vision/ObjectDetectionModule';
|
|
@@ -30,18 +34,21 @@ export * from './modules/computer_vision/StyleTransferModule';
|
|
|
30
34
|
export * from './modules/computer_vision/ImageSegmentationModule';
|
|
31
35
|
export * from './modules/computer_vision/OCRModule';
|
|
32
36
|
export * from './modules/computer_vision/VerticalOCRModule';
|
|
33
|
-
export * from './modules/general/ExecutorchModule';
|
|
34
37
|
export * from './modules/computer_vision/ImageEmbeddingsModule';
|
|
38
|
+
export * from './modules/computer_vision/TextToImageModule';
|
|
35
39
|
export * from './modules/natural_language_processing/LLMModule';
|
|
36
40
|
export * from './modules/natural_language_processing/SpeechToTextModule';
|
|
37
41
|
export * from './modules/natural_language_processing/TextEmbeddingsModule';
|
|
38
42
|
export * from './modules/natural_language_processing/TokenizerModule';
|
|
43
|
+
export * from './modules/natural_language_processing/VADModule';
|
|
44
|
+
export * from './modules/general/ExecutorchModule';
|
|
39
45
|
export * from './utils/ResourceFetcher';
|
|
40
46
|
export * from './utils/llm';
|
|
41
47
|
export * from './types/objectDetection';
|
|
42
48
|
export * from './types/ocr';
|
|
43
49
|
export * from './types/imageSegmentation';
|
|
44
50
|
export * from './types/llm';
|
|
51
|
+
export * from './types/vad';
|
|
45
52
|
export * from './types/common';
|
|
46
53
|
export { SpeechToTextLanguage, SpeechToTextModelConfig, DecodingOptions, } from './types/stt';
|
|
47
54
|
export * from './constants/modelUrls';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,CAAC,MAAM,CAAC;IACb,IAAI,iBAAiB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,GAAG,CAAC;IAC/C,IAAI,qBAAqB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,GAAG,CAAC;IACnD,IAAI,kBAAkB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,GAAG,CAAC;IAChD,IAAI,mBAAmB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,GAAG,CAAC;IACjD,IAAI,oBAAoB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,GAAG,CAAC;IAClD,IAAI,mBAAmB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,GAAG,CAAC;IACjD,IAAI,mBAAmB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,GAAG,CAAC;IACjD,IAAI,kBAAkB,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,KAAK,GAAG,CAAC;IAC9E,IAAI,OAAO,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,KAAK,GAAG,CAAC;IACnE,IAAI,gBAAgB,EAAE,CACpB,aAAa,EAAE,MAAM,EACrB,aAAa,EAAE,MAAM,EACrB,SAAS,EAAE,MAAM,KACd,GAAG,CAAC;IACT,IAAI,OAAO,EAAE,CACX,cAAc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ChE,cAAc,0DAA0D,CAAC;AACzE,cAAc,4DAA4D,CAAC;AAC3E,cAAc,uDAAuD,CAAC;AACtE,cAAc,iDAAiD,CAAC;AAEhE,cAAc,oCAAoC,CAAC;AAGnD,cAAc,yBAAyB,CAAC;AACxC,cAAc,aAAa,CAAC;AAG5B,cAAc,yBAAyB,CAAC;AACxC,cAAc,aAAa,CAAC;AAC5B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EACvB,eAAe,GAChB,MAAM,aAAa,CAAC;AAGrB,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC"}
|
|
@@ -10,7 +10,7 @@ export declare class OCRModule {
|
|
|
10
10
|
recognizerSmall: ResourceSource;
|
|
11
11
|
language: OCRLanguage;
|
|
12
12
|
}, onDownloadProgressCallback?: (progress: number) => void): Promise<void>;
|
|
13
|
-
forward(
|
|
13
|
+
forward(imageSource: string): Promise<any>;
|
|
14
14
|
delete(): void;
|
|
15
15
|
}
|
|
16
16
|
//# sourceMappingURL=OCRModule.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OCRModule.d.ts","sourceRoot":"","sources":["../../../../src/modules/computer_vision/OCRModule.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,qBAAa,SAAS;IACpB,OAAO,CAAC,UAAU,CAAgB;;IAM5B,IAAI,CACR,KAAK,EAAE;QACL,cAAc,EAAE,cAAc,CAAC;QAC/B,eAAe,EAAE,cAAc,CAAC;QAChC,gBAAgB,EAAE,cAAc,CAAC;QACjC,eAAe,EAAE,cAAc,CAAC;QAChC,QAAQ,EAAE,WAAW,CAAC;KACvB,EACD,0BAA0B,GAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAe;IAc7D,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"OCRModule.d.ts","sourceRoot":"","sources":["../../../../src/modules/computer_vision/OCRModule.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,qBAAa,SAAS;IACpB,OAAO,CAAC,UAAU,CAAgB;;IAM5B,IAAI,CACR,KAAK,EAAE;QACL,cAAc,EAAE,cAAc,CAAC;QAC/B,eAAe,EAAE,cAAc,CAAC;QAChC,gBAAgB,EAAE,cAAc,CAAC;QACjC,eAAe,EAAE,cAAc,CAAC;QAChC,QAAQ,EAAE,WAAW,CAAC;KACvB,EACD,0BAA0B,GAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAe;IAc7D,OAAO,CAAC,WAAW,EAAE,MAAM;IAIjC,MAAM;CAGP"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ResourceSource } from '../../types/common';
|
|
2
|
+
import { BaseModule } from '../BaseModule';
|
|
3
|
+
export declare class TextToImageModule extends BaseModule {
|
|
4
|
+
private inferenceCallback;
|
|
5
|
+
constructor(inferenceCallback?: (stepIdx: number) => void);
|
|
6
|
+
load(model: {
|
|
7
|
+
tokenizerSource: ResourceSource;
|
|
8
|
+
schedulerSource: ResourceSource;
|
|
9
|
+
encoderSource: ResourceSource;
|
|
10
|
+
unetSource: ResourceSource;
|
|
11
|
+
decoderSource: ResourceSource;
|
|
12
|
+
}, onDownloadProgressCallback?: (progress: number) => void): Promise<void>;
|
|
13
|
+
forward(input: string, imageSize?: number, numSteps?: number, seed?: number): Promise<string>;
|
|
14
|
+
interrupt(): void;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=TextToImageModule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextToImageModule.d.ts","sourceRoot":"","sources":["../../../../src/modules/computer_vision/TextToImageModule.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAI3C,qBAAa,iBAAkB,SAAQ,UAAU;IAC/C,OAAO,CAAC,iBAAiB,CAA4B;gBAEzC,iBAAiB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI;IAOnD,IAAI,CACR,KAAK,EAAE;QACL,eAAe,EAAE,cAAc,CAAC;QAChC,eAAe,EAAE,cAAc,CAAC;QAChC,aAAa,EAAE,cAAc,CAAC;QAC9B,UAAU,EAAE,cAAc,CAAC;QAC3B,aAAa,EAAE,cAAc,CAAC;KAC/B,EACD,0BAA0B,GAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAe,GAChE,OAAO,CAAC,IAAI,CAAC;IAwCV,OAAO,CACX,KAAK,EAAE,MAAM,EACb,SAAS,GAAE,MAAY,EACvB,QAAQ,GAAE,MAAU,EACpB,IAAI,CAAC,EAAE,MAAM,GACZ,OAAO,CAAC,MAAM,CAAC;IAmBX,SAAS,IAAI,IAAI;CAGzB"}
|
|
@@ -10,7 +10,7 @@ export declare class VerticalOCRModule {
|
|
|
10
10
|
recognizerSmall: ResourceSource;
|
|
11
11
|
language: OCRLanguage;
|
|
12
12
|
}, independentCharacters: boolean, onDownloadProgressCallback?: (progress: number) => void): Promise<void>;
|
|
13
|
-
forward(
|
|
13
|
+
forward(imageSource: string): Promise<any>;
|
|
14
14
|
delete(): void;
|
|
15
15
|
}
|
|
16
16
|
//# sourceMappingURL=VerticalOCRModule.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VerticalOCRModule.d.ts","sourceRoot":"","sources":["../../../../src/modules/computer_vision/VerticalOCRModule.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,UAAU,CAAwB;;IAMpC,IAAI,CACR,KAAK,EAAE;QACL,aAAa,EAAE,cAAc,CAAC;QAC9B,cAAc,EAAE,cAAc,CAAC;QAC/B,eAAe,EAAE,cAAc,CAAC;QAChC,eAAe,EAAE,cAAc,CAAC;QAChC,QAAQ,EAAE,WAAW,CAAC;KACvB,EACD,qBAAqB,EAAE,OAAO,EAC9B,0BAA0B,GAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAe;IAiB7D,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"VerticalOCRModule.d.ts","sourceRoot":"","sources":["../../../../src/modules/computer_vision/VerticalOCRModule.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,UAAU,CAAwB;;IAMpC,IAAI,CACR,KAAK,EAAE;QACL,aAAa,EAAE,cAAc,CAAC;QAC9B,cAAc,EAAE,cAAc,CAAC;QAC/B,eAAe,EAAE,cAAc,CAAC;QAChC,eAAe,EAAE,cAAc,CAAC;QAChC,QAAQ,EAAE,WAAW,CAAC;KACvB,EACD,qBAAqB,EAAE,OAAO,EAC9B,0BAA0B,GAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAe;IAiB7D,OAAO,CAAC,WAAW,EAAE,MAAM;IAIjC,MAAM;CAGP"}
|
|
@@ -4,6 +4,7 @@ export declare class SpeechToTextModule {
|
|
|
4
4
|
private modelConfig;
|
|
5
5
|
private textDecoder;
|
|
6
6
|
load(model: SpeechToTextModelConfig, onDownloadProgressCallback?: (progress: number) => void): Promise<void>;
|
|
7
|
+
delete(): void;
|
|
7
8
|
encode(waveform: Float32Array | number[]): Promise<Float32Array>;
|
|
8
9
|
decode(tokens: Int32Array | number[], encoderOutput: Float32Array | number[]): Promise<Float32Array>;
|
|
9
10
|
transcribe(waveform: Float32Array | number[], options?: DecodingOptions): Promise<string>;
|
|
@@ -11,8 +12,8 @@ export declare class SpeechToTextModule {
|
|
|
11
12
|
committed: string;
|
|
12
13
|
nonCommitted: string;
|
|
13
14
|
}>;
|
|
14
|
-
streamInsert(waveform: Float32Array | number[]):
|
|
15
|
-
streamStop():
|
|
15
|
+
streamInsert(waveform: Float32Array | number[]): void;
|
|
16
|
+
streamStop(): void;
|
|
16
17
|
private validateOptions;
|
|
17
18
|
}
|
|
18
19
|
//# sourceMappingURL=SpeechToTextModule.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpeechToTextModule.d.ts","sourceRoot":"","sources":["../../../../src/modules/natural_language_processing/SpeechToTextModule.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAG3E,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,YAAY,CAAM;IAE1B,OAAO,CAAC,WAAW,CAA2B;IAE9C,OAAO,CAAC,WAAW,CAGhB;IAEU,IAAI,CACf,KAAK,EAAE,uBAAuB,EAC9B,0BAA0B,GAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAe;
|
|
1
|
+
{"version":3,"file":"SpeechToTextModule.d.ts","sourceRoot":"","sources":["../../../../src/modules/natural_language_processing/SpeechToTextModule.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAG3E,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,YAAY,CAAM;IAE1B,OAAO,CAAC,WAAW,CAA2B;IAE9C,OAAO,CAAC,WAAW,CAGhB;IAEU,IAAI,CACf,KAAK,EAAE,uBAAuB,EAC9B,0BAA0B,GAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAe;IA6B5D,MAAM,IAAI,IAAI;IAIR,MAAM,CACjB,QAAQ,EAAE,YAAY,GAAG,MAAM,EAAE,GAChC,OAAO,CAAC,YAAY,CAAC;IAUX,MAAM,CACjB,MAAM,EAAE,UAAU,GAAG,MAAM,EAAE,EAC7B,aAAa,EAAE,YAAY,GAAG,MAAM,EAAE,GACrC,OAAO,CAAC,YAAY,CAAC;IAkBX,UAAU,CACrB,QAAQ,EAAE,YAAY,GAAG,MAAM,EAAE,EACjC,OAAO,GAAE,eAAoB,GAC5B,OAAO,CAAC,MAAM,CAAC;IAgBJ,MAAM,CAClB,OAAO,GAAE,eAAoB,GAC5B,cAAc,CAAC;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAA;KAAE,CAAC;IAqDvD,YAAY,CAAC,QAAQ,EAAE,YAAY,GAAG,MAAM,EAAE,GAAG,IAAI;IAUrD,UAAU,IAAI,IAAI;IAIzB,OAAO,CAAC,eAAe;CAQxB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ResourceSource } from '../../types/common';
|
|
2
|
+
import { Segment } from '../../types/vad';
|
|
3
|
+
import { BaseModule } from '../BaseModule';
|
|
4
|
+
export declare class VADModule extends BaseModule {
|
|
5
|
+
load(model: {
|
|
6
|
+
modelSource: ResourceSource;
|
|
7
|
+
}, onDownloadProgressCallback?: (progress: number) => void): Promise<void>;
|
|
8
|
+
forward(waveform: Float32Array): Promise<Segment[]>;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=VADModule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VADModule.d.ts","sourceRoot":"","sources":["../../../../src/modules/natural_language_processing/VADModule.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE1C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C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cAAc;;;;;;;;CAQ1B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vad.d.ts","sourceRoot":"","sources":["../../../src/types/vad.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,OAAO;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb"}
|
|
@@ -1,3 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resource Fetcher
|
|
3
|
+
*
|
|
4
|
+
* Provides an interface for downloading files (via `ResourceFetcher.fetch()`)
|
|
5
|
+
*
|
|
6
|
+
* Key functionality:
|
|
7
|
+
* - Download control: pause, resume, and cancel operations through:
|
|
8
|
+
* - Single file: `.pauseFetching()`, `.resumeFetching()`, `.cancelFetching()`
|
|
9
|
+
* - Downloaded file management:
|
|
10
|
+
* - `.getFilesTotalSize()`, `.listDownloadedFiles()`, `.listDownloadedModels()`, `.deleteResources()`
|
|
11
|
+
*
|
|
12
|
+
* Remark: The pausing/resuming/canceling works only for fetching remote resources.
|
|
13
|
+
*
|
|
14
|
+
* Most exported functions accept:
|
|
15
|
+
* - Multiple `ResourceSource` arguments, (union type of string, number or object)
|
|
16
|
+
*
|
|
17
|
+
* Method `.fetch()` takes argument as callback that reports download progress.
|
|
18
|
+
* Method`.fetch()` returns array of paths to successfully saved files or null if the download was paused or cancelled (then resume functions can return paths).
|
|
19
|
+
*
|
|
20
|
+
* Technical Implementation:
|
|
21
|
+
* - Maintains a `downloads` Map instance that tracks:
|
|
22
|
+
* - Currently downloading resources
|
|
23
|
+
* - Paused downloads
|
|
24
|
+
* - Successful downloads are automatically removed from the `downloads` Map
|
|
25
|
+
* - Uses the `ResourceSourceExtended` interface to enable pause/resume functionality:
|
|
26
|
+
* - Wraps user-provided `ResourceSource` elements
|
|
27
|
+
* - Implements linked list behavior via the `.next` attribute
|
|
28
|
+
* - Automatically processes subsequent downloads when `.next` contains a valid resource
|
|
29
|
+
*/
|
|
1
30
|
import { ResourceSource } from '../types/common';
|
|
2
31
|
import { DownloadResource } from './ResourceFetcherUtils';
|
|
3
32
|
export declare class ResourceFetcher {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResourceFetcher.d.ts","sourceRoot":"","sources":["../../../src/utils/ResourceFetcher.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ResourceFetcher.d.ts","sourceRoot":"","sources":["../../../src/utils/ResourceFetcher.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAgBH,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAML,gBAAgB,EACjB,MAAM,wBAAwB,CAAC;AAEhC,qBAAa,eAAe;IAC1B,MAAM,CAAC,SAAS,wCAA+C;WAElD,KAAK,CAChB,QAAQ,GAAE,CAAC,gBAAgB,EAAE,MAAM,KAAK,IAAe,EACvD,GAAG,OAAO,EAAE,cAAc,EAAE;mBA2CT,WAAW;IA0ChC,OAAO,CAAC,MAAM,CAAC,iBAAiB;mBAeX,KAAK;mBAcL,MAAM;mBAkDN,MAAM;WAMd,aAAa,CAAC,GAAG,OAAO,EAAE,cAAc,EAAE;WAK1C,cAAc,CAAC,GAAG,OAAO,EAAE,cAAc,EAAE;WAK3C,cAAc,CAAC,GAAG,OAAO,EAAE,cAAc,EAAE;IAKxD,OAAO,CAAC,MAAM,CAAC,UAAU;WAWZ,mBAAmB;WAKnB,oBAAoB;WAKpB,eAAe,CAAC,GAAG,OAAO,EAAE,cAAc,EAAE;WAY5C,iBAAiB,CAAC,GAAG,OAAO,EAAE,cAAc,EAAE;mBAItC,YAAY;IAqBjC,OAAO,CAAC,MAAM,CAAC,eAAe;mBAOT,qBAAqB;mBAyBrB,iBAAiB;mBAWjB,gBAAgB;CAwEtC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { ResourceSource } from '../types/common';
|
|
1
2
|
/**
|
|
2
3
|
* @internal
|
|
3
4
|
*/
|
|
4
|
-
import { DownloadResumable } from 'expo-file-system';
|
|
5
|
-
import { ResourceSource } from '../types/common';
|
|
5
|
+
import { type DownloadResumable } from 'expo-file-system/legacy';
|
|
6
6
|
export declare const enum HTTP_CODE {
|
|
7
7
|
OK = 200,
|
|
8
8
|
PARTIAL_CONTENT = 206
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResourceFetcherUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/ResourceFetcherUtils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ResourceFetcherUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/ResourceFetcherUtils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD;;GAEG;AACH,OAAO,EAGL,KAAK,iBAAiB,EACvB,MAAM,yBAAyB,CAAC;AAEjC,0BAAkB,SAAS;IACzB,EAAE,MAAM;IACR,eAAe,MAAM;CACtB;AAED,0BAAkB,cAAc;IAC9B,OAAO,IAAA;IACP,MAAM,IAAA;CACP;AAED,0BAAkB,UAAU;IAC1B,MAAM,IAAA;IACN,UAAU,IAAA;IACV,iBAAiB,IAAA;IACjB,aAAa,IAAA;IACb,WAAW,IAAA;CACZ;AAED,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,cAAc,CAAC;IACvB,UAAU,EAAE,UAAU,CAAC;IACvB,QAAQ,CAAC,EAAE,CAAC,gBAAgB,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,sBAAsB,CAAC;CAC/B;AAED,MAAM,WAAW,gBAAgB;IAC/B,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,MAAM,EAAE,cAAc,CAAC;IACvB,YAAY,EAAE,sBAAsB,CAAC;CACtC;AAED,yBAAiB,oBAAoB,CAAC;IACpC,SAAgB,OAAO,CAAC,MAAM,EAAE,cAAc,GAAG,UAAU,CAe1D;IAED,SAAsB,aAAa,CAAC,OAAO,EAAE,cAAc,EAAE;;oBAEjD,cAAc;kBAChB,UAAU;oBACR,MAAM;sCACY,MAAM;;;OAkCnC;IAED,SAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,UAE3C;IAED,SAAgB,UAAU,CAAC,UAAU,EAAE,MAAM,UAU5C;IAED,SAAgB,yBAAyB,CACvC,WAAW,EAAE,MAAM,EACnB,wBAAwB,EAAE,MAAM,EAChC,iBAAiB,EAAE,MAAM,EACzB,WAAW,EAAE,CAAC,gBAAgB,EAAE,MAAM,KAAK,IAAI,IAEvC,UAAU,MAAM,UAoBzB;IAMD,SAAsB,iCAAiC,CAAC,GAAG,EAAE,MAAM,iBASlE;IAED,SAAsB,yBAAyB,kBAI9C;IAED,SAAsB,eAAe,CAAC,OAAO,EAAE,MAAM,oBAGpD;IAED,SAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,UAI7C;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-executorch",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "An easy way to run AI models in React Native with ExecuTorch",
|
|
5
5
|
"source": "./src/index.ts",
|
|
6
6
|
"main": "./lib/module/index.js",
|
|
@@ -65,19 +65,25 @@
|
|
|
65
65
|
"registry": "https://registry.npmjs.org/"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
|
+
"expo": ">=54.0.0",
|
|
69
|
+
"expo-asset": "^12.0.0",
|
|
70
|
+
"expo-file-system": "^19.0.0",
|
|
68
71
|
"react": "*",
|
|
69
72
|
"react-native": "*"
|
|
70
73
|
},
|
|
71
74
|
"devDependencies": {
|
|
72
75
|
"@react-native-community/cli": "latest",
|
|
73
76
|
"@types/jest": "^29.5.5",
|
|
74
|
-
"@types/react": "
|
|
77
|
+
"@types/react": "~19.1.10",
|
|
78
|
+
"expo": "^54.0.0",
|
|
79
|
+
"expo-asset": "12.0.11",
|
|
80
|
+
"expo-file-system": "^19.0.20",
|
|
75
81
|
"jest": "^29.7.0",
|
|
76
82
|
"metro-react-native-babel-preset": "^0.77.0",
|
|
77
|
-
"react": "19.
|
|
78
|
-
"react-native": "0.
|
|
83
|
+
"react": "19.1.0",
|
|
84
|
+
"react-native": "0.81.5",
|
|
79
85
|
"react-native-builder-bob": "^0.40.12",
|
|
80
|
-
"typescript": "~5.
|
|
86
|
+
"typescript": "~5.9.2"
|
|
81
87
|
},
|
|
82
88
|
"resolutions": {
|
|
83
89
|
"@types/react": "^18.2.44"
|
|
@@ -116,9 +122,6 @@
|
|
|
116
122
|
},
|
|
117
123
|
"dependencies": {
|
|
118
124
|
"@huggingface/jinja": "^0.5.0",
|
|
119
|
-
"expo": "^53.0.7",
|
|
120
|
-
"expo-asset": "~11.1.5",
|
|
121
|
-
"expo-file-system": "~18.1.10",
|
|
122
125
|
"jsonrepair": "^3.12.0",
|
|
123
126
|
"jsonschema": "^1.5.0",
|
|
124
127
|
"zod": "^3.25.0"
|