react-native-executorch 0.3.3 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (343) hide show
  1. package/README.md +30 -13
  2. package/android/build.gradle +1 -1
  3. package/android/src/main/java/com/swmansion/rnexecutorch/ETModule.kt +1 -2
  4. package/android/src/main/java/com/swmansion/rnexecutorch/ImageSegmentation.kt +58 -0
  5. package/android/src/main/java/com/swmansion/rnexecutorch/LLM.kt +13 -49
  6. package/android/src/main/java/com/swmansion/rnexecutorch/RnExecutorchPackage.kt +37 -0
  7. package/android/src/main/java/com/swmansion/rnexecutorch/StyleTransfer.kt +1 -1
  8. package/android/src/main/java/com/swmansion/rnexecutorch/TextEmbeddings.kt +51 -0
  9. package/android/src/main/java/com/swmansion/rnexecutorch/Tokenizer.kt +86 -0
  10. package/android/src/main/java/com/swmansion/rnexecutorch/models/BaseModel.kt +3 -4
  11. package/android/src/main/java/com/swmansion/rnexecutorch/models/TextEmbeddings/TextEmbeddingsModel.kt +48 -0
  12. package/android/src/main/java/com/swmansion/rnexecutorch/models/TextEmbeddings/TextEmbeddingsUtils.kt +37 -0
  13. package/android/src/main/java/com/swmansion/rnexecutorch/models/classification/ClassificationModel.kt +1 -0
  14. package/android/src/main/java/com/swmansion/rnexecutorch/models/imageSegmentation/Constants.kt +26 -0
  15. package/android/src/main/java/com/swmansion/rnexecutorch/models/imageSegmentation/ImageSegmentationModel.kt +142 -0
  16. package/android/src/main/java/com/swmansion/rnexecutorch/models/ocr/utils/RecognizerUtils.kt +3 -0
  17. package/android/src/main/java/com/swmansion/rnexecutorch/models/{StyleTransferModel.kt → styleTransfer/StyleTransferModel.kt} +2 -1
  18. package/android/src/main/java/com/swmansion/rnexecutorch/utils/ArrayUtils.kt +0 -8
  19. package/android/src/main/java/com/swmansion/rnexecutorch/{models/classification/Utils.kt → utils/Numerical.kt} +1 -1
  20. package/ios/ExecutorchLib.xcframework/Info.plist +4 -4
  21. package/ios/ExecutorchLib.xcframework/ios-arm64/ExecutorchLib.framework/ExecutorchLib +0 -0
  22. package/ios/ExecutorchLib.xcframework/ios-arm64/ExecutorchLib.framework/Headers/HuggingFaceTokenizer.h +14 -0
  23. package/ios/ExecutorchLib.xcframework/ios-arm64/ExecutorchLib.framework/Headers/LLaMARunner.h +1 -23
  24. package/ios/ExecutorchLib.xcframework/ios-arm64/ExecutorchLib.framework/Info.plist +0 -0
  25. package/ios/ExecutorchLib.xcframework/ios-arm64-simulator/ExecutorchLib.framework/ExecutorchLib +0 -0
  26. package/ios/ExecutorchLib.xcframework/ios-arm64-simulator/ExecutorchLib.framework/Headers/HuggingFaceTokenizer.h +14 -0
  27. package/ios/ExecutorchLib.xcframework/ios-arm64-simulator/ExecutorchLib.framework/Headers/LLaMARunner.h +1 -23
  28. package/ios/ExecutorchLib.xcframework/ios-arm64-simulator/ExecutorchLib.framework/Info.plist +0 -0
  29. package/ios/RnExecutorch/Classification.mm +15 -18
  30. package/ios/RnExecutorch/ETModule.mm +6 -5
  31. package/ios/RnExecutorch/ImageSegmentation.h +5 -0
  32. package/ios/RnExecutorch/ImageSegmentation.mm +60 -0
  33. package/ios/RnExecutorch/LLM.mm +12 -53
  34. package/ios/RnExecutorch/OCR.mm +39 -43
  35. package/ios/RnExecutorch/ObjectDetection.mm +20 -20
  36. package/ios/RnExecutorch/SpeechToText.mm +6 -7
  37. package/ios/RnExecutorch/StyleTransfer.mm +16 -19
  38. package/ios/RnExecutorch/TextEmbeddings.h +5 -0
  39. package/ios/RnExecutorch/TextEmbeddings.mm +62 -0
  40. package/ios/RnExecutorch/Tokenizer.h +5 -0
  41. package/ios/RnExecutorch/Tokenizer.mm +83 -0
  42. package/ios/RnExecutorch/VerticalOCR.mm +36 -36
  43. package/ios/RnExecutorch/models/BaseModel.h +2 -5
  44. package/ios/RnExecutorch/models/BaseModel.mm +5 -15
  45. package/ios/RnExecutorch/models/classification/ClassificationModel.mm +2 -3
  46. package/ios/RnExecutorch/models/classification/Constants.mm +0 -1
  47. package/ios/RnExecutorch/models/image_segmentation/Constants.h +4 -0
  48. package/ios/RnExecutorch/models/image_segmentation/Constants.mm +8 -0
  49. package/ios/RnExecutorch/models/image_segmentation/ImageSegmentationModel.h +10 -0
  50. package/ios/RnExecutorch/models/image_segmentation/ImageSegmentationModel.mm +146 -0
  51. package/ios/RnExecutorch/models/object_detection/SSDLiteLargeModel.mm +1 -2
  52. package/ios/RnExecutorch/models/ocr/Detector.h +0 -2
  53. package/ios/RnExecutorch/models/ocr/Detector.mm +2 -1
  54. package/ios/RnExecutorch/models/ocr/RecognitionHandler.h +5 -4
  55. package/ios/RnExecutorch/models/ocr/RecognitionHandler.mm +9 -26
  56. package/ios/RnExecutorch/models/ocr/Recognizer.mm +1 -2
  57. package/ios/RnExecutorch/models/ocr/VerticalDetector.h +0 -2
  58. package/ios/RnExecutorch/models/ocr/VerticalDetector.mm +2 -1
  59. package/ios/RnExecutorch/models/ocr/utils/OCRUtils.mm +0 -1
  60. package/ios/RnExecutorch/models/stt/Moonshine.mm +1 -6
  61. package/ios/RnExecutorch/models/stt/SpeechToTextBaseModel.mm +7 -11
  62. package/ios/RnExecutorch/models/stt/Whisper.mm +0 -5
  63. package/ios/RnExecutorch/models/{StyleTransferModel.h → style_transfer/StyleTransferModel.h} +1 -1
  64. package/ios/RnExecutorch/models/{StyleTransferModel.mm → style_transfer/StyleTransferModel.mm} +2 -3
  65. package/ios/RnExecutorch/models/text_embeddings/TextEmbeddingsModel.h +15 -0
  66. package/ios/RnExecutorch/models/text_embeddings/TextEmbeddingsModel.mm +45 -0
  67. package/ios/RnExecutorch/models/text_embeddings/TextEmbeddingsUtils.h +8 -0
  68. package/ios/RnExecutorch/models/text_embeddings/TextEmbeddingsUtils.mm +49 -0
  69. package/ios/RnExecutorch/utils/Conversions.h +15 -0
  70. package/ios/RnExecutorch/utils/ImageProcessor.h +0 -1
  71. package/ios/RnExecutorch/{models/classification/Utils.h → utils/Numerical.h} +0 -2
  72. package/ios/RnExecutorch/{models/classification/Utils.mm → utils/Numerical.mm} +0 -2
  73. package/ios/RnExecutorch/utils/ObjectDetectionUtils.mm +0 -2
  74. package/ios/RnExecutorch/utils/SFFT.mm +1 -1
  75. package/ios/RnExecutorch/utils/ScalarType.h +0 -2
  76. package/lib/module/Error.js +16 -2
  77. package/lib/module/Error.js.map +1 -1
  78. package/lib/module/constants/{llamaDefaults.js → llmDefaults.js} +7 -3
  79. package/lib/module/constants/llmDefaults.js.map +1 -0
  80. package/lib/module/constants/modelUrls.js +88 -27
  81. package/lib/module/constants/modelUrls.js.map +1 -1
  82. package/lib/module/constants/ocr/models.js +290 -0
  83. package/lib/module/constants/ocr/models.js.map +1 -0
  84. package/lib/module/constants/ocr/symbols.js +137 -2
  85. package/lib/module/constants/ocr/symbols.js.map +1 -1
  86. package/lib/module/constants/sttDefaults.js +50 -25
  87. package/lib/module/constants/sttDefaults.js.map +1 -1
  88. package/lib/module/controllers/LLMController.js +205 -0
  89. package/lib/module/controllers/LLMController.js.map +1 -0
  90. package/lib/module/controllers/OCRController.js +5 -10
  91. package/lib/module/controllers/OCRController.js.map +1 -1
  92. package/lib/module/controllers/SpeechToTextController.js +225 -122
  93. package/lib/module/controllers/SpeechToTextController.js.map +1 -1
  94. package/lib/module/controllers/VerticalOCRController.js +6 -10
  95. package/lib/module/controllers/VerticalOCRController.js.map +1 -1
  96. package/lib/module/hooks/computer_vision/useClassification.js +8 -23
  97. package/lib/module/hooks/computer_vision/useClassification.js.map +1 -1
  98. package/lib/module/hooks/computer_vision/useImageSegmentation.js +13 -0
  99. package/lib/module/hooks/computer_vision/useImageSegmentation.js.map +1 -0
  100. package/lib/module/hooks/computer_vision/useOCR.js +11 -6
  101. package/lib/module/hooks/computer_vision/useOCR.js.map +1 -1
  102. package/lib/module/hooks/computer_vision/useObjectDetection.js +8 -23
  103. package/lib/module/hooks/computer_vision/useObjectDetection.js.map +1 -1
  104. package/lib/module/hooks/computer_vision/useStyleTransfer.js +8 -23
  105. package/lib/module/hooks/computer_vision/useStyleTransfer.js.map +1 -1
  106. package/lib/module/hooks/computer_vision/useVerticalOCR.js +10 -7
  107. package/lib/module/hooks/computer_vision/useVerticalOCR.js.map +1 -1
  108. package/lib/module/hooks/general/useExecutorchModule.js +8 -36
  109. package/lib/module/hooks/general/useExecutorchModule.js.map +1 -1
  110. package/lib/module/hooks/natural_language_processing/useLLM.js +54 -63
  111. package/lib/module/hooks/natural_language_processing/useLLM.js.map +1 -1
  112. package/lib/module/hooks/natural_language_processing/useSpeechToText.js +15 -11
  113. package/lib/module/hooks/natural_language_processing/useSpeechToText.js.map +1 -1
  114. package/lib/module/hooks/natural_language_processing/useTextEmbeddings.js +14 -0
  115. package/lib/module/hooks/natural_language_processing/useTextEmbeddings.js.map +1 -0
  116. package/lib/module/hooks/natural_language_processing/useTokenizer.js +54 -0
  117. package/lib/module/hooks/natural_language_processing/useTokenizer.js.map +1 -0
  118. package/lib/module/hooks/useModule.js +18 -62
  119. package/lib/module/hooks/useModule.js.map +1 -1
  120. package/lib/module/index.js +16 -2
  121. package/lib/module/index.js.map +1 -1
  122. package/lib/module/modules/BaseModule.js +9 -10
  123. package/lib/module/modules/BaseModule.js.map +1 -1
  124. package/lib/module/modules/computer_vision/ClassificationModule.js +8 -5
  125. package/lib/module/modules/computer_vision/ClassificationModule.js.map +1 -1
  126. package/lib/module/modules/computer_vision/ImageSegmentationModule.js +28 -0
  127. package/lib/module/modules/computer_vision/ImageSegmentationModule.js.map +1 -0
  128. package/lib/module/modules/computer_vision/ObjectDetectionModule.js +8 -5
  129. package/lib/module/modules/computer_vision/ObjectDetectionModule.js.map +1 -1
  130. package/lib/module/modules/computer_vision/StyleTransferModule.js +8 -5
  131. package/lib/module/modules/computer_vision/StyleTransferModule.js.map +1 -1
  132. package/lib/module/modules/general/ExecutorchModule.js +8 -5
  133. package/lib/module/modules/general/ExecutorchModule.js.map +1 -1
  134. package/lib/module/modules/natural_language_processing/LLMModule.js +46 -27
  135. package/lib/module/modules/natural_language_processing/LLMModule.js.map +1 -1
  136. package/lib/module/modules/natural_language_processing/SpeechToTextModule.js +8 -5
  137. package/lib/module/modules/natural_language_processing/SpeechToTextModule.js.map +1 -1
  138. package/lib/module/modules/natural_language_processing/TextEmbeddingsModule.js +14 -0
  139. package/lib/module/modules/natural_language_processing/TextEmbeddingsModule.js.map +1 -0
  140. package/lib/module/modules/natural_language_processing/TokenizerModule.js +26 -0
  141. package/lib/module/modules/natural_language_processing/TokenizerModule.js.map +1 -0
  142. package/lib/module/native/NativeClassification.js.map +1 -1
  143. package/lib/module/native/NativeImageSegmentation.js +5 -0
  144. package/lib/module/native/NativeImageSegmentation.js.map +1 -0
  145. package/lib/module/native/NativeLLM.js.map +1 -1
  146. package/lib/module/native/NativeTextEmbeddings.js +5 -0
  147. package/lib/module/native/NativeTextEmbeddings.js.map +1 -0
  148. package/lib/module/native/NativeTokenizer.js +5 -0
  149. package/lib/module/native/NativeTokenizer.js.map +1 -0
  150. package/lib/module/native/RnExecutorchModules.js +18 -113
  151. package/lib/module/native/RnExecutorchModules.js.map +1 -1
  152. package/lib/module/types/common.js.map +1 -1
  153. package/lib/module/types/imageSegmentation.js +29 -0
  154. package/lib/module/types/imageSegmentation.js.map +1 -0
  155. package/lib/module/types/llm.js +7 -0
  156. package/lib/module/types/llm.js.map +1 -0
  157. package/lib/module/types/{object_detection.js → objectDetection.js} +1 -1
  158. package/lib/module/types/objectDetection.js.map +1 -0
  159. package/lib/module/types/ocr.js +2 -0
  160. package/lib/module/types/stt.js +82 -0
  161. package/lib/module/types/stt.js.map +1 -0
  162. package/lib/module/utils/ResourceFetcher.js +156 -0
  163. package/lib/module/utils/ResourceFetcher.js.map +1 -0
  164. package/lib/module/utils/llm.js +25 -0
  165. package/lib/module/utils/llm.js.map +1 -0
  166. package/lib/module/utils/stt.js +22 -0
  167. package/lib/module/utils/stt.js.map +1 -0
  168. package/lib/typescript/Error.d.ts +4 -1
  169. package/lib/typescript/Error.d.ts.map +1 -1
  170. package/lib/typescript/constants/{llamaDefaults.d.ts → llmDefaults.d.ts} +5 -5
  171. package/lib/typescript/constants/llmDefaults.d.ts.map +1 -0
  172. package/lib/typescript/constants/modelUrls.d.ts +74 -28
  173. package/lib/typescript/constants/modelUrls.d.ts.map +1 -1
  174. package/lib/typescript/constants/ocr/models.d.ts +285 -0
  175. package/lib/typescript/constants/ocr/models.d.ts.map +1 -0
  176. package/lib/typescript/constants/ocr/symbols.d.ts +73 -1
  177. package/lib/typescript/constants/ocr/symbols.d.ts.map +1 -1
  178. package/lib/typescript/constants/sttDefaults.d.ts +8 -13
  179. package/lib/typescript/constants/sttDefaults.d.ts.map +1 -1
  180. package/lib/typescript/controllers/LLMController.d.ts +46 -0
  181. package/lib/typescript/controllers/LLMController.d.ts.map +1 -0
  182. package/lib/typescript/controllers/OCRController.d.ts.map +1 -1
  183. package/lib/typescript/controllers/SpeechToTextController.d.ts +30 -16
  184. package/lib/typescript/controllers/SpeechToTextController.d.ts.map +1 -1
  185. package/lib/typescript/controllers/VerticalOCRController.d.ts +1 -1
  186. package/lib/typescript/controllers/VerticalOCRController.d.ts.map +1 -1
  187. package/lib/typescript/hooks/computer_vision/useClassification.d.ts +5 -5
  188. package/lib/typescript/hooks/computer_vision/useClassification.d.ts.map +1 -1
  189. package/lib/typescript/hooks/computer_vision/useImageSegmentation.d.ts +37 -0
  190. package/lib/typescript/hooks/computer_vision/useImageSegmentation.d.ts.map +1 -0
  191. package/lib/typescript/hooks/computer_vision/useOCR.d.ts +2 -1
  192. package/lib/typescript/hooks/computer_vision/useOCR.d.ts.map +1 -1
  193. package/lib/typescript/hooks/computer_vision/useObjectDetection.d.ts +5 -4
  194. package/lib/typescript/hooks/computer_vision/useObjectDetection.d.ts.map +1 -1
  195. package/lib/typescript/hooks/computer_vision/useStyleTransfer.d.ts +4 -2
  196. package/lib/typescript/hooks/computer_vision/useStyleTransfer.d.ts.map +1 -1
  197. package/lib/typescript/hooks/computer_vision/useVerticalOCR.d.ts +2 -1
  198. package/lib/typescript/hooks/computer_vision/useVerticalOCR.d.ts.map +1 -1
  199. package/lib/typescript/hooks/general/useExecutorchModule.d.ts +5 -6
  200. package/lib/typescript/hooks/general/useExecutorchModule.d.ts.map +1 -1
  201. package/lib/typescript/hooks/natural_language_processing/useLLM.d.ts +6 -6
  202. package/lib/typescript/hooks/natural_language_processing/useLLM.d.ts.map +1 -1
  203. package/lib/typescript/hooks/natural_language_processing/useSpeechToText.d.ts +7 -3
  204. package/lib/typescript/hooks/natural_language_processing/useSpeechToText.d.ts.map +1 -1
  205. package/lib/typescript/hooks/natural_language_processing/useTextEmbeddings.d.ts +13 -0
  206. package/lib/typescript/hooks/natural_language_processing/useTextEmbeddings.d.ts.map +1 -0
  207. package/lib/typescript/hooks/natural_language_processing/useTokenizer.d.ts +16 -0
  208. package/lib/typescript/hooks/natural_language_processing/useTokenizer.d.ts.map +1 -0
  209. package/lib/typescript/hooks/useModule.d.ts +11 -10
  210. package/lib/typescript/hooks/useModule.d.ts.map +1 -1
  211. package/lib/typescript/index.d.ts +15 -2
  212. package/lib/typescript/index.d.ts.map +1 -1
  213. package/lib/typescript/modules/BaseModule.d.ts +4 -5
  214. package/lib/typescript/modules/BaseModule.d.ts.map +1 -1
  215. package/lib/typescript/modules/computer_vision/ClassificationModule.d.ts +7 -7
  216. package/lib/typescript/modules/computer_vision/ClassificationModule.d.ts.map +1 -1
  217. package/lib/typescript/modules/computer_vision/ImageSegmentationModule.d.ts +32 -0
  218. package/lib/typescript/modules/computer_vision/ImageSegmentationModule.d.ts.map +1 -0
  219. package/lib/typescript/modules/computer_vision/ObjectDetectionModule.d.ts +6 -5
  220. package/lib/typescript/modules/computer_vision/ObjectDetectionModule.d.ts.map +1 -1
  221. package/lib/typescript/modules/computer_vision/StyleTransferModule.d.ts +6 -5
  222. package/lib/typescript/modules/computer_vision/StyleTransferModule.d.ts.map +1 -1
  223. package/lib/typescript/modules/general/ExecutorchModule.d.ts +4 -3
  224. package/lib/typescript/modules/general/ExecutorchModule.d.ts.map +1 -1
  225. package/lib/typescript/modules/natural_language_processing/LLMModule.d.ts +19 -5
  226. package/lib/typescript/modules/natural_language_processing/LLMModule.d.ts.map +1 -1
  227. package/lib/typescript/modules/natural_language_processing/SpeechToTextModule.d.ts +7 -4
  228. package/lib/typescript/modules/natural_language_processing/SpeechToTextModule.d.ts.map +1 -1
  229. package/lib/typescript/modules/natural_language_processing/TextEmbeddingsModule.d.ts +8 -0
  230. package/lib/typescript/modules/natural_language_processing/TextEmbeddingsModule.d.ts.map +1 -0
  231. package/lib/typescript/modules/natural_language_processing/TokenizerModule.d.ts +12 -0
  232. package/lib/typescript/modules/natural_language_processing/TokenizerModule.d.ts.map +1 -0
  233. package/lib/typescript/native/NativeClassification.d.ts.map +1 -1
  234. package/lib/typescript/native/NativeImageSegmentation.d.ts +10 -0
  235. package/lib/typescript/native/NativeImageSegmentation.d.ts.map +1 -0
  236. package/lib/typescript/native/NativeLLM.d.ts +3 -4
  237. package/lib/typescript/native/NativeLLM.d.ts.map +1 -1
  238. package/lib/typescript/native/NativeObjectDetection.d.ts +1 -1
  239. package/lib/typescript/native/NativeObjectDetection.d.ts.map +1 -1
  240. package/lib/typescript/native/NativeSpeechToText.d.ts +2 -2
  241. package/lib/typescript/native/NativeSpeechToText.d.ts.map +1 -1
  242. package/lib/typescript/native/NativeTextEmbeddings.d.ts +8 -0
  243. package/lib/typescript/native/NativeTextEmbeddings.d.ts.map +1 -0
  244. package/lib/typescript/native/NativeTokenizer.d.ts +12 -0
  245. package/lib/typescript/native/NativeTokenizer.d.ts.map +1 -0
  246. package/lib/typescript/native/RnExecutorchModules.d.ts +18 -41
  247. package/lib/typescript/native/RnExecutorchModules.d.ts.map +1 -1
  248. package/lib/typescript/types/common.d.ts +1 -26
  249. package/lib/typescript/types/common.d.ts.map +1 -1
  250. package/lib/typescript/types/imageSegmentation.d.ts +25 -0
  251. package/lib/typescript/types/imageSegmentation.d.ts.map +1 -0
  252. package/lib/typescript/types/llm.d.ts +38 -0
  253. package/lib/typescript/types/llm.d.ts.map +1 -0
  254. package/lib/typescript/types/{object_detection.d.ts → objectDetection.d.ts} +1 -1
  255. package/lib/typescript/types/objectDetection.d.ts.map +1 -0
  256. package/lib/typescript/types/ocr.d.ts +2 -1
  257. package/lib/typescript/types/ocr.d.ts.map +1 -1
  258. package/lib/typescript/types/stt.d.ts +91 -0
  259. package/lib/typescript/types/stt.d.ts.map +1 -0
  260. package/lib/typescript/utils/ResourceFetcher.d.ts +17 -0
  261. package/lib/typescript/utils/ResourceFetcher.d.ts.map +1 -0
  262. package/lib/typescript/utils/llm.d.ts +3 -0
  263. package/lib/typescript/utils/llm.d.ts.map +1 -0
  264. package/lib/typescript/utils/stt.d.ts +2 -0
  265. package/lib/typescript/utils/stt.d.ts.map +1 -0
  266. package/package.json +13 -49
  267. package/react-native-executorch.podspec +1 -1
  268. package/src/Error.ts +16 -3
  269. package/src/constants/llmDefaults.ts +14 -0
  270. package/src/constants/modelUrls.ts +146 -39
  271. package/src/constants/ocr/models.ts +453 -0
  272. package/src/constants/ocr/symbols.ts +147 -3
  273. package/src/constants/sttDefaults.ts +55 -37
  274. package/src/controllers/LLMController.ts +286 -0
  275. package/src/controllers/OCRController.ts +14 -28
  276. package/src/controllers/SpeechToTextController.ts +318 -180
  277. package/src/controllers/VerticalOCRController.ts +17 -32
  278. package/src/hooks/computer_vision/useClassification.ts +11 -26
  279. package/src/hooks/computer_vision/useImageSegmentation.ts +18 -0
  280. package/src/hooks/computer_vision/useOCR.ts +17 -5
  281. package/src/hooks/computer_vision/useObjectDetection.ts +10 -24
  282. package/src/hooks/computer_vision/useStyleTransfer.ts +9 -25
  283. package/src/hooks/computer_vision/useVerticalOCR.ts +11 -4
  284. package/src/hooks/general/useExecutorchModule.ts +10 -50
  285. package/src/hooks/natural_language_processing/useLLM.ts +80 -97
  286. package/src/hooks/natural_language_processing/useSpeechToText.ts +39 -12
  287. package/src/hooks/natural_language_processing/useTextEmbeddings.ts +18 -0
  288. package/src/hooks/natural_language_processing/useTokenizer.ts +61 -0
  289. package/src/hooks/useModule.ts +32 -92
  290. package/src/index.tsx +16 -2
  291. package/src/modules/BaseModule.ts +16 -26
  292. package/src/modules/computer_vision/ClassificationModule.ts +13 -8
  293. package/src/modules/computer_vision/ImageSegmentationModule.ts +39 -0
  294. package/src/modules/computer_vision/ObjectDetectionModule.ts +13 -8
  295. package/src/modules/computer_vision/StyleTransferModule.ts +13 -8
  296. package/src/modules/general/ExecutorchModule.ts +11 -6
  297. package/src/modules/natural_language_processing/LLMModule.ts +64 -51
  298. package/src/modules/natural_language_processing/SpeechToTextModule.ts +25 -10
  299. package/src/modules/natural_language_processing/TextEmbeddingsModule.ts +18 -0
  300. package/src/modules/natural_language_processing/TokenizerModule.ts +34 -0
  301. package/src/native/NativeClassification.ts +0 -1
  302. package/src/native/NativeImageSegmentation.ts +14 -0
  303. package/src/native/NativeLLM.ts +3 -10
  304. package/src/native/NativeObjectDetection.ts +1 -1
  305. package/src/native/NativeSpeechToText.ts +2 -2
  306. package/src/native/NativeTextEmbeddings.ts +9 -0
  307. package/src/native/NativeTokenizer.ts +13 -0
  308. package/src/native/RnExecutorchModules.ts +54 -234
  309. package/src/types/common.ts +1 -44
  310. package/src/types/imageSegmentation.ts +25 -0
  311. package/src/types/llm.ts +57 -0
  312. package/src/types/ocr.ts +3 -1
  313. package/src/types/stt.ts +93 -0
  314. package/src/utils/ResourceFetcher.ts +196 -0
  315. package/src/utils/llm.ts +34 -0
  316. package/src/utils/stt.ts +28 -0
  317. package/android/src/main/java/com/swmansion/rnexecutorch/utils/llms/ConversationManager.kt +0 -68
  318. package/ios/ExecutorchLib.xcframework/ios-arm64-simulator/ExecutorchLib.framework/_CodeSignature/CodeResources +0 -124
  319. package/ios/RnExecutorch/utils/llms/Constants.h +0 -6
  320. package/ios/RnExecutorch/utils/llms/Constants.mm +0 -23
  321. package/ios/RnExecutorch/utils/llms/ConversationManager.h +0 -26
  322. package/ios/RnExecutorch/utils/llms/ConversationManager.mm +0 -71
  323. package/lib/module/constants/llamaDefaults.js.map +0 -1
  324. package/lib/module/modules/computer_vision/BaseCVModule.js +0 -14
  325. package/lib/module/modules/computer_vision/BaseCVModule.js.map +0 -1
  326. package/lib/module/types/object_detection.js.map +0 -1
  327. package/lib/module/utils/fetchResource.js +0 -93
  328. package/lib/module/utils/fetchResource.js.map +0 -1
  329. package/lib/module/utils/listDownloadedResources.js +0 -13
  330. package/lib/module/utils/listDownloadedResources.js.map +0 -1
  331. package/lib/typescript/constants/llamaDefaults.d.ts.map +0 -1
  332. package/lib/typescript/modules/computer_vision/BaseCVModule.d.ts +0 -9
  333. package/lib/typescript/modules/computer_vision/BaseCVModule.d.ts.map +0 -1
  334. package/lib/typescript/types/object_detection.d.ts.map +0 -1
  335. package/lib/typescript/utils/fetchResource.d.ts +0 -3
  336. package/lib/typescript/utils/fetchResource.d.ts.map +0 -1
  337. package/lib/typescript/utils/listDownloadedResources.d.ts +0 -3
  338. package/lib/typescript/utils/listDownloadedResources.d.ts.map +0 -1
  339. package/src/constants/llamaDefaults.ts +0 -9
  340. package/src/modules/computer_vision/BaseCVModule.ts +0 -22
  341. package/src/utils/fetchResource.ts +0 -106
  342. package/src/utils/listDownloadedResources.ts +0 -12
  343. /package/src/types/{object_detection.ts → objectDetection.ts} +0 -0
@@ -1,7 +1,8 @@
1
- import { BaseCVModule } from './BaseCVModule';
2
- import { _StyleTransferModule } from '../../native/RnExecutorchModules';
3
- export declare class StyleTransferModule extends BaseCVModule {
4
- static module: _StyleTransferModule;
5
- static forward(input: string): Promise<string>;
1
+ import { ResourceSource } from '../../types/common';
2
+ import { BaseModule } from '../BaseModule';
3
+ export declare class StyleTransferModule extends BaseModule {
4
+ protected static nativeModule: import("../../native/NativeStyleTransfer").Spec;
5
+ static load(modelSource: ResourceSource): Promise<void>;
6
+ static forward(input: string): ReturnType<typeof this.nativeModule.forward>;
6
7
  }
7
8
  //# sourceMappingURL=StyleTransferModule.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"StyleTransferModule.d.ts","sourceRoot":"","sources":["../../../../src/modules/computer_vision/StyleTransferModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAExE,qBAAa,mBAAoB,SAAQ,YAAY;IACnD,MAAM,CAAC,MAAM,uBAA8B;WAE9B,OAAO,CAAC,KAAK,EAAE,MAAM;CAKnC"}
1
+ {"version":3,"file":"StyleTransferModule.d.ts","sourceRoot":"","sources":["../../../../src/modules/computer_vision/StyleTransferModule.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,qBAAa,mBAAoB,SAAQ,UAAU;IACjD,iBAA0B,YAAY,kDAA6B;WAE7C,IAAI,CAAC,WAAW,EAAE,cAAc;WAIhC,OAAO,CAC3B,KAAK,EAAE,MAAM,GACZ,UAAU,CAAC,OAAO,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC;CAGhD"}
@@ -1,8 +1,9 @@
1
- import { BaseModule } from '../BaseModule';
2
- import { _ETModule } from '../../native/RnExecutorchModules';
1
+ import { ResourceSource } from '../../types/common';
3
2
  import { ETInput } from '../../types/common';
3
+ import { BaseModule } from '../BaseModule';
4
4
  export declare class ExecutorchModule extends BaseModule {
5
- static module: _ETModule;
5
+ protected static nativeModule: import("../../native/NativeETModule").Spec;
6
+ static load(modelSource: ResourceSource): Promise<void>;
6
7
  static forward(input: ETInput[] | ETInput, shape: number[][]): Promise<number[][]>;
7
8
  static loadMethod(methodName: string): Promise<void>;
8
9
  static loadForward(): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"ExecutorchModule.d.ts","sourceRoot":"","sources":["../../../../src/modules/general/ExecutorchModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAG7C,qBAAa,gBAAiB,SAAQ,UAAU;IAC9C,MAAM,CAAC,MAAM,YAAmB;WAEnB,OAAO,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;WA4BrD,UAAU,CAAC,UAAU,EAAE,MAAM;WAQ7B,WAAW;CAGzB"}
1
+ {"version":3,"file":"ExecutorchModule.d.ts","sourceRoot":"","sources":["../../../../src/modules/general/ExecutorchModule.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE7C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,qBAAa,gBAAiB,SAAQ,UAAU;IAC9C,iBAA0B,YAAY,6CAAwB;WAExC,IAAI,CAAC,WAAW,EAAE,cAAc;WAIhC,OAAO,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;WA4B9D,UAAU,CAAC,UAAU,EAAE,MAAM;WAQ7B,WAAW;CAGzB"}
@@ -1,10 +1,24 @@
1
+ import { LLMController } from '../../controllers/LLMController';
1
2
  import { ResourceSource } from '../../types/common';
3
+ import { ChatConfig, LLMTool, Message, ToolsConfig } from '../../types/llm';
2
4
  export declare class LLMModule {
3
- static onDownloadProgressCallback: (_downloadProgress: number) => void;
4
- static load(modelSource: ResourceSource, tokenizerSource: ResourceSource, systemPrompt?: string, messageHistory?: import("../../types/common").MessageType[], contextWindowLength?: number): Promise<void>;
5
- static generate(input: string): Promise<void>;
6
- static onDownloadProgress(callback: (downloadProgress: number) => void): void;
7
- static onToken(callback: (data: string | undefined) => void): any;
5
+ static controller: LLMController;
6
+ static load({ modelSource, tokenizerSource, tokenizerConfigSource, onDownloadProgressCallback, responseCallback, messageHistoryCallback, }: {
7
+ modelSource: ResourceSource;
8
+ tokenizerSource: ResourceSource;
9
+ tokenizerConfigSource: ResourceSource;
10
+ onDownloadProgressCallback?: (_downloadProgress: number) => void;
11
+ responseCallback?: (response: string) => void;
12
+ messageHistoryCallback?: (messageHistory: Message[]) => void;
13
+ }): Promise<void>;
14
+ static configure({ chatConfig, toolsConfig, }: {
15
+ chatConfig?: Partial<ChatConfig>;
16
+ toolsConfig?: ToolsConfig;
17
+ }): void;
18
+ static forward(input: string): Promise<string>;
19
+ static generate(messages: Message[], tools?: LLMTool[]): Promise<string>;
20
+ static sendMessage(message: string): Promise<Message[]>;
21
+ static deleteMessage(index: number): Promise<Message[]>;
8
22
  static interrupt(): void;
9
23
  static delete(): void;
10
24
  }
@@ -1 +1 @@
1
- {"version":3,"file":"LLMModule.d.ts","sourceRoot":"","sources":["../../../../src/modules/natural_language_processing/LLMModule.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,qBAAa,SAAS;IACpB,MAAM,CAAC,0BAA0B,GAAI,mBAAmB,MAAM,UAAQ;WAEzD,IAAI,CACf,WAAW,EAAE,cAAc,EAC3B,eAAe,EAAE,cAAc,EAC/B,YAAY,SAAwB,EACpC,cAAc,6CAA0B,EACxC,mBAAmB,SAAgC;WAqBxC,QAAQ,CAAC,KAAK,EAAE,MAAM;IAQnC,MAAM,CAAC,kBAAkB,CAAC,QAAQ,EAAE,CAAC,gBAAgB,EAAE,MAAM,KAAK,IAAI;IAItE,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI;IAI3D,MAAM,CAAC,SAAS;IAIhB,MAAM,CAAC,MAAM;CAGd"}
1
+ {"version":3,"file":"LLMModule.d.ts","sourceRoot":"","sources":["../../../../src/modules/natural_language_processing/LLMModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE5E,qBAAa,SAAS;IACpB,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC;WAEpB,IAAI,CAAC,EAChB,WAAW,EACX,eAAe,EACf,qBAAqB,EACrB,0BAA0B,EAC1B,gBAAgB,EAChB,sBAAsB,GACvB,EAAE;QACD,WAAW,EAAE,cAAc,CAAC;QAC5B,eAAe,EAAE,cAAc,CAAC;QAChC,qBAAqB,EAAE,cAAc,CAAC;QACtC,0BAA0B,CAAC,EAAE,CAAC,iBAAiB,EAAE,MAAM,KAAK,IAAI,CAAC;QACjE,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;QAC9C,sBAAsB,CAAC,EAAE,CAAC,cAAc,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;KAC9D;IAaD,MAAM,CAAC,SAAS,CAAC,EACf,UAAU,EACV,WAAW,GACZ,EAAE;QACD,UAAU,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;QACjC,WAAW,CAAC,EAAE,WAAW,CAAC;KAC3B;WAIY,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;WAKvC,QAAQ,CACnB,QAAQ,EAAE,OAAO,EAAE,EACnB,KAAK,CAAC,EAAE,OAAO,EAAE,GAChB,OAAO,CAAC,MAAM,CAAC;WAKL,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;WAKhD,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IAK7D,MAAM,CAAC,SAAS;IAIhB,MAAM,CAAC,MAAM;CAGd"}
@@ -1,12 +1,15 @@
1
1
  import { ResourceSource } from '../../types/common';
2
2
  import { SpeechToTextController } from '../../controllers/SpeechToTextController';
3
+ import { AvailableModels, SpeechToTextLanguage } from '../../types/stt';
4
+ import { STREAMING_ACTION } from '../../constants/sttDefaults';
3
5
  export declare class SpeechToText {
4
6
  static module: SpeechToTextController;
5
7
  static onDownloadProgressCallback: (_downloadProgress: number) => void;
6
- static load(modelName: 'moonshine' | 'whisper', transcribeCallback: (sequence: string) => void, modelDownloadProgessCallback?: (downloadProgress: number) => void, encoderSource?: ResourceSource, decoderSource?: ResourceSource, tokenizerSource?: ResourceSource, overlapSeconds?: ConstructorParameters<typeof SpeechToTextController>['0']['overlapSeconds'], windowSize?: ConstructorParameters<typeof SpeechToTextController>['0']['windowSize'], streamingConfig?: ConstructorParameters<typeof SpeechToTextController>['0']['streamingConfig']): Promise<void>;
8
+ static load(modelName: AvailableModels, transcribeCallback: (sequence: string) => void, modelDownloadProgressCallback?: (downloadProgress: number) => void, encoderSource?: ResourceSource, decoderSource?: ResourceSource, tokenizerSource?: ResourceSource, overlapSeconds?: ConstructorParameters<typeof SpeechToTextController>['0']['overlapSeconds'], windowSize?: ConstructorParameters<typeof SpeechToTextController>['0']['windowSize'], streamingConfig?: ConstructorParameters<typeof SpeechToTextController>['0']['streamingConfig']): Promise<void>;
7
9
  static configureStreaming(overlapSeconds: Parameters<SpeechToTextController['configureStreaming']>[0], windowSize: Parameters<SpeechToTextController['configureStreaming']>[1], streamingConfig: Parameters<SpeechToTextController['configureStreaming']>[2]): void;
8
- static transcribe(waveform: number[]): ReturnType<SpeechToTextController['transcribe']>;
9
- static encode(waveform: number[]): Promise<any>;
10
- static decode(seq: number[], encodings?: number[]): Promise<any>;
10
+ static encode(waveform: number[]): Promise<number[]>;
11
+ static decode(seq: number[], encodings: number[]): Promise<number>;
12
+ static transcribe(waveform: number[], audioLanguage?: SpeechToTextLanguage): ReturnType<SpeechToTextController['transcribe']>;
13
+ static streamingTranscribe(streamAction: STREAMING_ACTION, waveform?: number[], audioLanguage?: SpeechToTextLanguage): ReturnType<SpeechToTextController['streamingTranscribe']>;
11
14
  }
12
15
  //# 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":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0CAA0C,CAAC;AAElF,qBAAa,YAAY;IACvB,MAAM,CAAC,MAAM,EAAE,sBAAsB,CAAC;IAEtC,MAAM,CAAC,0BAA0B,GAAI,mBAAmB,MAAM,UAAQ;WAEzD,IAAI,CACf,SAAS,EAAE,WAAW,GAAG,SAAS,EAClC,kBAAkB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,EAC9C,4BAA4B,CAAC,EAAE,CAAC,gBAAgB,EAAE,MAAM,KAAK,IAAI,EACjE,aAAa,CAAC,EAAE,cAAc,EAC9B,aAAa,CAAC,EAAE,cAAc,EAC9B,eAAe,CAAC,EAAE,cAAc,EAChC,cAAc,CAAC,EAAE,qBAAqB,CACpC,OAAO,sBAAsB,CAC9B,CAAC,GAAG,CAAC,CAAC,gBAAgB,CAAC,EACxB,UAAU,CAAC,EAAE,qBAAqB,CAChC,OAAO,sBAAsB,CAC9B,CAAC,GAAG,CAAC,CAAC,YAAY,CAAC,EACpB,eAAe,CAAC,EAAE,qBAAqB,CACrC,OAAO,sBAAsB,CAC9B,CAAC,GAAG,CAAC,CAAC,iBAAiB,CAAC;IAiB3B,MAAM,CAAC,kBAAkB,CACvB,cAAc,EAAE,UAAU,CAAC,sBAAsB,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC,EAC3E,UAAU,EAAE,UAAU,CAAC,sBAAsB,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC,EACvE,eAAe,EAAE,UAAU,CAAC,sBAAsB,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC;WASjE,UAAU,CACrB,QAAQ,EAAE,MAAM,EAAE,GACjB,UAAU,CAAC,sBAAsB,CAAC,YAAY,CAAC,CAAC;WAItC,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE;WAIzB,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE;CAGxD"}
1
+ {"version":3,"file":"SpeechToTextModule.d.ts","sourceRoot":"","sources":["../../../../src/modules/natural_language_processing/SpeechToTextModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0CAA0C,CAAC;AAClF,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE/D,qBAAa,YAAY;IACvB,MAAM,CAAC,MAAM,EAAE,sBAAsB,CAAC;IAEtC,MAAM,CAAC,0BAA0B,GAAI,mBAAmB,MAAM,UAAQ;WAEzD,IAAI,CACf,SAAS,EAAE,eAAe,EAC1B,kBAAkB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,EAC9C,6BAA6B,CAAC,EAAE,CAAC,gBAAgB,EAAE,MAAM,KAAK,IAAI,EAClE,aAAa,CAAC,EAAE,cAAc,EAC9B,aAAa,CAAC,EAAE,cAAc,EAC9B,eAAe,CAAC,EAAE,cAAc,EAChC,cAAc,CAAC,EAAE,qBAAqB,CACpC,OAAO,sBAAsB,CAC9B,CAAC,GAAG,CAAC,CAAC,gBAAgB,CAAC,EACxB,UAAU,CAAC,EAAE,qBAAqB,CAChC,OAAO,sBAAsB,CAC9B,CAAC,GAAG,CAAC,CAAC,YAAY,CAAC,EACpB,eAAe,CAAC,EAAE,qBAAqB,CACrC,OAAO,sBAAsB,CAC9B,CAAC,GAAG,CAAC,CAAC,iBAAiB,CAAC;IAiB3B,MAAM,CAAC,kBAAkB,CACvB,cAAc,EAAE,UAAU,CAAC,sBAAsB,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC,EAC3E,UAAU,EAAE,UAAU,CAAC,sBAAsB,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC,EACvE,eAAe,EAAE,UAAU,CAAC,sBAAsB,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC;WASjE,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE;WAIzB,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE;WAIzC,UAAU,CACrB,QAAQ,EAAE,MAAM,EAAE,EAClB,aAAa,CAAC,EAAE,oBAAoB,GACnC,UAAU,CAAC,sBAAsB,CAAC,YAAY,CAAC,CAAC;WAItC,mBAAmB,CAC9B,YAAY,EAAE,gBAAgB,EAC9B,QAAQ,CAAC,EAAE,MAAM,EAAE,EACnB,aAAa,CAAC,EAAE,oBAAoB,GACnC,UAAU,CAAC,sBAAsB,CAAC,qBAAqB,CAAC,CAAC;CAO7D"}
@@ -0,0 +1,8 @@
1
+ import { ResourceSource } from '../../types/common';
2
+ import { BaseModule } from '../BaseModule';
3
+ export declare class TextEmbeddingsModule extends BaseModule {
4
+ protected static nativeModule: import("../../native/NativeTextEmbeddings").Spec;
5
+ static load(modelSource: ResourceSource, tokenizerSource: ResourceSource): Promise<void>;
6
+ static forward(input: string): Promise<number[]>;
7
+ }
8
+ //# sourceMappingURL=TextEmbeddingsModule.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextEmbeddingsModule.d.ts","sourceRoot":"","sources":["../../../../src/modules/natural_language_processing/TextEmbeddingsModule.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,qBAAa,oBAAqB,SAAQ,UAAU;IAClD,iBAA0B,YAAY,mDAA8B;WAE9C,IAAI,CACxB,WAAW,EAAE,cAAc,EAC3B,eAAe,EAAE,cAAc;WAKX,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;CAGhE"}
@@ -0,0 +1,12 @@
1
+ import { ResourceSource } from '../../types/common';
2
+ import { BaseModule } from '../BaseModule';
3
+ export declare class TokenizerModule extends BaseModule {
4
+ protected static nativeModule: import("../../native/NativeTokenizer").Spec;
5
+ static load(tokenizerSource: ResourceSource): Promise<void>;
6
+ static decode(input: number[], skipSpecialTokens?: boolean): Promise<string>;
7
+ static encode(input: string): Promise<number[]>;
8
+ static getVocabSize(): Promise<number>;
9
+ static idToToken(tokenId: number): Promise<string>;
10
+ static tokenToId(token: string): Promise<number>;
11
+ }
12
+ //# sourceMappingURL=TokenizerModule.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TokenizerModule.d.ts","sourceRoot":"","sources":["../../../../src/modules/natural_language_processing/TokenizerModule.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,qBAAa,eAAgB,SAAQ,UAAU;IAC7C,iBAA0B,YAAY,8CAAyB;WAEzC,IAAI,CAAC,eAAe,EAAE,cAAc;WAI7C,MAAM,CACjB,KAAK,EAAE,MAAM,EAAE,EACf,iBAAiB,UAAQ,GACxB,OAAO,CAAC,MAAM,CAAC;WAIL,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;WAIxC,YAAY,IAAI,OAAO,CAAC,MAAM,CAAC;WAI/B,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;WAI3C,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAGvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"NativeClassification.d.ts","sourceRoot":"","sources":["../../../src/native/NativeClassification.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,UAAU,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAEjD,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC,CAAC;CACjE;;AAED,wBAA+D"}
1
+ {"version":3,"file":"NativeClassification.d.ts","sourceRoot":"","sources":["../../../src/native/NativeClassification.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,UAAU,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACjD,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC,CAAC;CACjE;;AAED,wBAA+D"}
@@ -0,0 +1,10 @@
1
+ import type { TurboModule } from 'react-native';
2
+ export interface Spec extends TurboModule {
3
+ loadModule(modelSource: string): Promise<number>;
4
+ forward(input: string, classesOfInterest: string[], resize: boolean): Promise<{
5
+ [category: string]: number[];
6
+ }>;
7
+ }
8
+ declare const _default: Spec | null;
9
+ export default _default;
10
+ //# sourceMappingURL=NativeImageSegmentation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NativeImageSegmentation.d.ts","sourceRoot":"","sources":["../../../src/native/NativeImageSegmentation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,UAAU,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAEjD,OAAO,CACL,KAAK,EAAE,MAAM,EACb,iBAAiB,EAAE,MAAM,EAAE,EAC3B,MAAM,EAAE,OAAO,GACd,OAAO,CAAC;QAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;KAAE,CAAC,CAAC;CAC9C;;AAED,wBAAkE"}
@@ -1,11 +1,10 @@
1
1
  import type { TurboModule } from 'react-native';
2
2
  import type { EventEmitter } from 'react-native/Libraries/Types/CodegenTypes';
3
- import { MessageType } from '../types/common';
4
3
  export interface Spec extends TurboModule {
5
- loadLLM(modelSource: string, tokenizerSource: string, systemPrompt: string, messageHistory: MessageType[], contextWindowLength: number): Promise<string>;
6
- runInference(input: string): Promise<string>;
4
+ loadLLM(modelSource: string, tokenizerSource: string): Promise<string>;
5
+ forward(input: string): Promise<string>;
7
6
  interrupt(): void;
8
- deleteModule(): void;
7
+ releaseResources(): void;
9
8
  readonly onToken: EventEmitter<string>;
10
9
  }
11
10
  declare const _default: Spec | null;
@@ -1 +1 @@
1
- {"version":3,"file":"NativeLLM.d.ts","sourceRoot":"","sources":["../../../src/native/NativeLLM.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,OAAO,CACL,WAAW,EAAE,MAAM,EACnB,eAAe,EAAE,MAAM,EACvB,YAAY,EAAE,MAAM,EACpB,cAAc,EAAE,WAAW,EAAE,EAC7B,mBAAmB,EAAE,MAAM,GAC1B,OAAO,CAAC,MAAM,CAAC,CAAC;IACnB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAC7C,SAAS,IAAI,IAAI,CAAC;IAClB,YAAY,IAAI,IAAI,CAAC;IAErB,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;CACxC;;AAED,wBAAoD"}
1
+ {"version":3,"file":"NativeLLM.d.ts","sourceRoot":"","sources":["../../../src/native/NativeLLM.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AAE9E,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,OAAO,CAAC,WAAW,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACvE,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACxC,SAAS,IAAI,IAAI,CAAC;IAClB,gBAAgB,IAAI,IAAI,CAAC;IAEzB,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;CACxC;;AAED,wBAAoD"}
@@ -1,5 +1,5 @@
1
1
  import type { TurboModule } from 'react-native';
2
- import { Detection } from '../types/object_detection';
2
+ import { Detection } from '../types/objectDetection';
3
3
  export interface Spec extends TurboModule {
4
4
  loadModule(modelSource: string): Promise<number>;
5
5
  forward(input: string): Promise<Detection[]>;
@@ -1 +1 @@
1
- {"version":3,"file":"NativeObjectDetection.d.ts","sourceRoot":"","sources":["../../../src/native/NativeObjectDetection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAEtD,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,UAAU,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACjD,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC,CAAC;CAC9C;;AAED,wBAAgE"}
1
+ {"version":3,"file":"NativeObjectDetection.d.ts","sourceRoot":"","sources":["../../../src/native/NativeObjectDetection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAErD,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,UAAU,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACjD,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC,CAAC;CAC9C;;AAED,wBAAgE"}
@@ -3,8 +3,8 @@ import type { EventEmitter } from 'react-native/Libraries/Types/CodegenTypes';
3
3
  export interface Spec extends TurboModule {
4
4
  loadModule(modelName: string, modelSources: (string | number)[]): Promise<number>;
5
5
  generate(waveform: number[]): Promise<number[]>;
6
- encode(input: number[][]): Promise<number[]>;
7
- decode(prevTokens: number[], encoderOutput: number[]): Promise<number[]>;
6
+ encode(input: number[]): Promise<number[]>;
7
+ decode(prevTokens: number[], encoderOutput: number[]): Promise<number>;
8
8
  readonly onToken: EventEmitter<number>;
9
9
  }
10
10
  declare const _default: Spec | null;
@@ -1 +1 @@
1
- {"version":3,"file":"NativeSpeechToText.d.ts","sourceRoot":"","sources":["../../../src/native/NativeSpeechToText.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AAE9E,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,UAAU,CACR,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,GAChC,OAAO,CAAC,MAAM,CAAC,CAAC;IACnB,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAChD,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAC7C,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,aAAa,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAEzE,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;CACxC;;AAED,wBAA6D"}
1
+ {"version":3,"file":"NativeSpeechToText.d.ts","sourceRoot":"","sources":["../../../src/native/NativeSpeechToText.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AAE9E,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,UAAU,CACR,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,GAChC,OAAO,CAAC,MAAM,CAAC,CAAC;IACnB,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAChD,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAC3C,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,aAAa,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAEvE,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;CACxC;;AAED,wBAA6D"}
@@ -0,0 +1,8 @@
1
+ import type { TurboModule } from 'react-native';
2
+ export interface Spec extends TurboModule {
3
+ loadModule(modelSource: string, tokenizerSource: string): Promise<number>;
4
+ forward(input: string): Promise<number[]>;
5
+ }
6
+ declare const _default: Spec | null;
7
+ export default _default;
8
+ //# sourceMappingURL=NativeTextEmbeddings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NativeTextEmbeddings.d.ts","sourceRoot":"","sources":["../../../src/native/NativeTextEmbeddings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,UAAU,CAAC,WAAW,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAC1E,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;CAC3C;;AAED,wBAA+D"}
@@ -0,0 +1,12 @@
1
+ import type { TurboModule } from 'react-native';
2
+ export interface Spec extends TurboModule {
3
+ loadModule(tokenizerSource: string): Promise<number>;
4
+ decode(input: number[], skipSpecialTokens: boolean): Promise<string>;
5
+ encode(input: string): Promise<number[]>;
6
+ getVocabSize(): Promise<number>;
7
+ idToToken(tokenId: number): Promise<string>;
8
+ tokenToId(token: string): Promise<number>;
9
+ }
10
+ declare const _default: Spec | null;
11
+ export default _default;
12
+ //# sourceMappingURL=NativeTokenizer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NativeTokenizer.d.ts","sourceRoot":"","sources":["../../../src/native/NativeTokenizer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,UAAU,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACrD,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,iBAAiB,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACrE,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IACzC,YAAY,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAChC,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAC5C,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAC3C;;AAED,wBAA0D"}
@@ -1,47 +1,24 @@
1
- import { Spec as ClassificationInterface } from './NativeClassification';
2
1
  import { Spec as ObjectDetectionInterface } from './NativeObjectDetection';
3
2
  import { Spec as StyleTransferInterface } from './NativeStyleTransfer';
3
+ import { Spec as ImageSegmentationInterface } from './NativeImageSegmentation';
4
4
  import { Spec as ETModuleInterface } from './NativeETModule';
5
5
  import { Spec as OCRInterface } from './NativeOCR';
6
6
  import { Spec as VerticalOCRInterface } from './NativeVerticalOCR';
7
- declare const LLM: any;
8
- declare const ETModule: any;
9
- declare const Classification: any;
10
- declare const ObjectDetection: any;
11
- declare const StyleTransfer: any;
12
- declare const SpeechToText: any;
13
- declare const OCR: any;
14
- declare const VerticalOCR: any;
15
- declare class _ObjectDetectionModule {
16
- forward(input: string): ReturnType<ObjectDetectionInterface['forward']>;
17
- loadModule(modelSource: string | number): ReturnType<ObjectDetectionInterface['loadModule']>;
18
- }
19
- declare class _StyleTransferModule {
20
- forward(input: string): ReturnType<StyleTransferInterface['forward']>;
21
- loadModule(modelSource: string | number): ReturnType<StyleTransferInterface['loadModule']>;
22
- }
23
- declare class _SpeechToTextModule {
24
- generate(waveform: number[][]): Promise<number[]>;
25
- loadModule(modelName: String, modelSources: (string | number)[]): Promise<any>;
26
- encode(input: number[]): Promise<any>;
27
- decode(prevTokens: number[], encoderOutput?: number[]): Promise<any>;
28
- }
29
- declare class _ClassificationModule {
30
- forward(input: string): ReturnType<ClassificationInterface['forward']>;
31
- loadModule(modelSource: string | number): ReturnType<ClassificationInterface['loadModule']>;
32
- }
33
- declare class _OCRModule {
34
- forward(input: string): ReturnType<OCRInterface['forward']>;
35
- loadModule(detectorSource: string, recognizerSourceLarge: string, recognizerSourceMedium: string, recognizerSourceSmall: string, symbols: string): Promise<any>;
36
- }
37
- declare class _VerticalOCRModule {
38
- forward(input: string): ReturnType<VerticalOCRInterface['forward']>;
39
- loadModule(detectorLargeSource: string, detectorMediumSource: string, recognizerSource: string, symbols: string, independentCharacters: boolean): ReturnType<VerticalOCRInterface['loadModule']>;
40
- }
41
- declare class _ETModule {
42
- forward(inputs: number[][], shapes: number[][], inputTypes: number[]): ReturnType<ETModuleInterface['forward']>;
43
- loadModule(modelSource: string): ReturnType<ETModuleInterface['loadModule']>;
44
- loadMethod(methodName: string): ReturnType<ETModuleInterface['loadMethod']>;
45
- }
46
- export { LLM, ETModule, Classification, ObjectDetection, StyleTransfer, SpeechToText, OCR, VerticalOCR, _ETModule, _ClassificationModule, _StyleTransferModule, _ObjectDetectionModule, _SpeechToTextModule, _OCRModule, _VerticalOCRModule, };
7
+ import { Spec as SpeechToTextInterface } from './NativeSpeechToText';
8
+ import { Spec as TextEmbeddingsInterface } from './NativeTextEmbeddings';
9
+ import { Spec as LLMInterface } from './NativeLLM';
10
+ import { Spec as ClassificationInterface } from './NativeClassification';
11
+ import { Spec as TokenizerInterface } from './NativeTokenizer';
12
+ declare const LLMNativeModule: LLMInterface;
13
+ declare const ETModuleNativeModule: ETModuleInterface;
14
+ declare const ClassificationNativeModule: ClassificationInterface;
15
+ declare const ImageSegmentationNativeModule: ImageSegmentationInterface;
16
+ declare const ObjectDetectionNativeModule: ObjectDetectionInterface;
17
+ declare const StyleTransferNativeModule: StyleTransferInterface;
18
+ declare const SpeechToTextNativeModule: SpeechToTextInterface;
19
+ declare const OCRNativeModule: OCRInterface;
20
+ declare const VerticalOCRNativeModule: VerticalOCRInterface;
21
+ declare const TokenizerNativeModule: TokenizerInterface;
22
+ declare const TextEmbeddingsNativeModule: TextEmbeddingsInterface;
23
+ export { LLMNativeModule, ETModuleNativeModule, ClassificationNativeModule, ObjectDetectionNativeModule, StyleTransferNativeModule, ImageSegmentationNativeModule, SpeechToTextNativeModule, OCRNativeModule, VerticalOCRNativeModule, TextEmbeddingsNativeModule, TokenizerNativeModule, };
47
24
  //# sourceMappingURL=RnExecutorchModules.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RnExecutorchModules.d.ts","sourceRoot":"","sources":["../../../src/native/RnExecutorchModules.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,IAAI,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAE,IAAI,IAAI,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,IAAI,IAAI,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,IAAI,IAAI,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,IAAI,IAAI,YAAY,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,IAAI,IAAI,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAUnE,QAAA,MAAM,GAAG,KASJ,CAAC;AAIN,QAAA,MAAM,QAAQ,KAST,CAAC;AAIN,QAAA,MAAM,cAAc,KASf,CAAC;AAIN,QAAA,MAAM,eAAe,KAShB,CAAC;AAIN,QAAA,MAAM,aAAa,KASd,CAAC;AAIN,QAAA,MAAM,YAAY,KASb,CAAC;AAIN,QAAA,MAAM,GAAG,KASJ,CAAC;AAIN,QAAA,MAAM,WAAW,KASZ,CAAC;AAEN,cAAM,sBAAsB;IACpB,OAAO,CACX,KAAK,EAAE,MAAM,GACZ,UAAU,CAAC,wBAAwB,CAAC,SAAS,CAAC,CAAC;IAG5C,UAAU,CACd,WAAW,EAAE,MAAM,GAAG,MAAM,GAC3B,UAAU,CAAC,wBAAwB,CAAC,YAAY,CAAC,CAAC;CAGtD;AAED,cAAM,oBAAoB;IAClB,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,CAAC,sBAAsB,CAAC,SAAS,CAAC,CAAC;IAGrE,UAAU,CACd,WAAW,EAAE,MAAM,GAAG,MAAM,GAC3B,UAAU,CAAC,sBAAsB,CAAC,YAAY,CAAC,CAAC;CAGpD;AAED,cAAM,mBAAmB;IACjB,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAIjD,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE;IAI/D,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE;IAItB,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,aAAa,CAAC,EAAE,MAAM,EAAE;CAG5D;AAED,cAAM,qBAAqB;IACnB,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;IAGtE,UAAU,CACd,WAAW,EAAE,MAAM,GAAG,MAAM,GAC3B,UAAU,CAAC,uBAAuB,CAAC,YAAY,CAAC,CAAC;CAGrD;AAED,cAAM,UAAU;IACR,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;IAI3D,UAAU,CACd,cAAc,EAAE,MAAM,EACtB,qBAAqB,EAAE,MAAM,EAC7B,sBAAsB,EAAE,MAAM,EAC9B,qBAAqB,EAAE,MAAM,EAC7B,OAAO,EAAE,MAAM;CAUlB;AAED,cAAM,kBAAkB;IAChB,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,CAAC,oBAAoB,CAAC,SAAS,CAAC,CAAC;IAInE,UAAU,CACd,mBAAmB,EAAE,MAAM,EAC3B,oBAAoB,EAAE,MAAM,EAC5B,gBAAgB,EAAE,MAAM,EACxB,OAAO,EAAE,MAAM,EACf,qBAAqB,EAAE,OAAO,GAC7B,UAAU,CAAC,oBAAoB,CAAC,YAAY,CAAC,CAAC;CASlD;AAED,cAAM,SAAS;IACP,OAAO,CACX,MAAM,EAAE,MAAM,EAAE,EAAE,EAClB,MAAM,EAAE,MAAM,EAAE,EAAE,EAClB,UAAU,EAAE,MAAM,EAAE,GACnB,UAAU,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC;IAGrC,UAAU,CACd,WAAW,EAAE,MAAM,GAClB,UAAU,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC;IAGxC,UAAU,CACd,UAAU,EAAE,MAAM,GACjB,UAAU,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC;CAG/C;AAED,OAAO,EACL,GAAG,EACH,QAAQ,EACR,cAAc,EACd,eAAe,EACf,aAAa,EACb,YAAY,EACZ,GAAG,EACH,WAAW,EACX,SAAS,EACT,qBAAqB,EACrB,oBAAoB,EACpB,sBAAsB,EACtB,mBAAmB,EACnB,UAAU,EACV,kBAAkB,GACnB,CAAC"}
1
+ {"version":3,"file":"RnExecutorchModules.d.ts","sourceRoot":"","sources":["../../../src/native/RnExecutorchModules.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,IAAI,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,IAAI,IAAI,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,IAAI,IAAI,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EAAE,IAAI,IAAI,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,IAAI,IAAI,YAAY,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,IAAI,IAAI,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,IAAI,IAAI,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,IAAI,IAAI,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAE,IAAI,IAAI,YAAY,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,IAAI,IAAI,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAE,IAAI,IAAI,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAqB/D,QAAA,MAAM,eAAe,EAAE,YAEtB,CAAC;AACF,QAAA,MAAM,oBAAoB,EAAE,iBAE3B,CAAC;AACF,QAAA,MAAM,0BAA0B,EAAE,uBACwC,CAAC;AAC3E,QAAA,MAAM,6BAA6B,EAAE,0BACwC,CAAC;AAC9E,QAAA,MAAM,2BAA2B,EAAE,wBACwC,CAAC;AAC5E,QAAA,MAAM,yBAAyB,EAAE,sBACwC,CAAC;AAC1E,QAAA,MAAM,wBAAwB,EAAE,qBACwC,CAAC;AACzE,QAAA,MAAM,eAAe,EAAE,YAEtB,CAAC;AACF,QAAA,MAAM,uBAAuB,EAAE,oBACwC,CAAC;AACxE,QAAA,MAAM,qBAAqB,EAAE,kBAE5B,CAAC;AACF,QAAA,MAAM,0BAA0B,EAAE,uBACwC,CAAC;AAE3E,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,0BAA0B,EAC1B,2BAA2B,EAC3B,yBAAyB,EACzB,6BAA6B,EAC7B,wBAAwB,EACxB,eAAe,EACf,uBAAuB,EACvB,0BAA0B,EAC1B,qBAAqB,GACtB,CAAC"}
@@ -1,29 +1,4 @@
1
- import { _ClassificationModule, _StyleTransferModule, _ObjectDetectionModule, ETModule, _ETModule } from '../native/RnExecutorchModules';
2
1
  export declare const getTypeIdentifier: (input: ETInput) => number;
3
- export type ResourceSource = string | number;
4
- export interface Model {
5
- generate: (input: string) => Promise<void>;
6
- response: string;
7
- downloadProgress: number;
8
- error: string | null;
9
- isModelGenerating: boolean;
10
- isGenerating: boolean;
11
- isModelReady: boolean;
12
- isReady: boolean;
13
- interrupt: () => void;
14
- }
2
+ export type ResourceSource = string | number | object;
15
3
  export type ETInput = Int8Array | Int32Array | BigInt64Array | Float32Array | Float64Array;
16
- export interface ExecutorchModule {
17
- error: string | null;
18
- isReady: boolean;
19
- isGenerating: boolean;
20
- forward: (inputs: ETInput[] | ETInput, shapes: number[][]) => ReturnType<_ETModule['forward']>;
21
- loadMethod: (methodName: string) => Promise<void>;
22
- loadForward: () => Promise<void>;
23
- }
24
- export type Module = _ClassificationModule | _StyleTransferModule | _ObjectDetectionModule | typeof ETModule;
25
- export interface MessageType {
26
- role: 'user' | 'assistant';
27
- content: string;
28
- }
29
4
  //# sourceMappingURL=common.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/types/common.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,sBAAsB,EACtB,QAAQ,EACR,SAAS,EACV,MAAM,+BAA+B,CAAC;AAEvC,eAAO,MAAM,iBAAiB,GAAI,OAAO,OAAO,KAAG,MAOlD,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,MAAM,CAAC;AAE7C,MAAM,WAAW,KAAK;IACpB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3C,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,MAAM,CAAC;IACzB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,YAAY,EAAE,OAAO,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC;IACtB,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,MAAM,MAAM,OAAO,GACf,SAAS,GACT,UAAU,GACV,aAAa,GACb,YAAY,GACZ,YAAY,CAAC;AAEjB,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,OAAO,CAAC;IACtB,OAAO,EAAE,CACP,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,EAC3B,MAAM,EAAE,MAAM,EAAE,EAAE,KACf,UAAU,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC;IACtC,UAAU,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAClD,WAAW,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAClC;AAED,MAAM,MAAM,MAAM,GACd,qBAAqB,GACrB,oBAAoB,GACpB,sBAAsB,GACtB,OAAO,QAAQ,CAAC;AAEpB,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC;CACjB"}
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/types/common.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,GAAI,OAAO,OAAO,KAAG,MAOlD,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAEtD,MAAM,MAAM,OAAO,GACf,SAAS,GACT,UAAU,GACV,aAAa,GACb,YAAY,GACZ,YAAY,CAAC"}
@@ -0,0 +1,25 @@
1
+ export declare enum DeeplabLabel {
2
+ BACKGROUND = 0,
3
+ AEROPLANE = 1,
4
+ BICYCLE = 2,
5
+ BIRD = 3,
6
+ BOAT = 4,
7
+ BOTTLE = 5,
8
+ BUS = 6,
9
+ CAR = 7,
10
+ CAT = 8,
11
+ CHAIR = 9,
12
+ COW = 10,
13
+ DININGTABLE = 11,
14
+ DOG = 12,
15
+ HORSE = 13,
16
+ MOTORBIKE = 14,
17
+ PERSON = 15,
18
+ POTTEDPLANT = 16,
19
+ SHEEP = 17,
20
+ SOFA = 18,
21
+ TRAIN = 19,
22
+ TVMONITOR = 20,
23
+ ARGMAX = 21
24
+ }
25
+ //# sourceMappingURL=imageSegmentation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"imageSegmentation.d.ts","sourceRoot":"","sources":["../../../src/types/imageSegmentation.ts"],"names":[],"mappings":"AACA,oBAAY,YAAY;IACtB,UAAU,IAAA;IACV,SAAS,IAAA;IACT,OAAO,IAAA;IACP,IAAI,IAAA;IACJ,IAAI,IAAA;IACJ,MAAM,IAAA;IACN,GAAG,IAAA;IACH,GAAG,IAAA;IACH,GAAG,IAAA;IACH,KAAK,IAAA;IACL,GAAG,KAAA;IACH,WAAW,KAAA;IACX,GAAG,KAAA;IACH,KAAK,KAAA;IACL,SAAS,KAAA;IACT,MAAM,KAAA;IACN,WAAW,KAAA;IACX,KAAK,KAAA;IACL,IAAI,KAAA;IACJ,KAAK,KAAA;IACL,SAAS,KAAA;IACT,MAAM,KAAA;CACP"}
@@ -0,0 +1,38 @@
1
+ export interface LLMType {
2
+ messageHistory: Message[];
3
+ response: string;
4
+ isReady: boolean;
5
+ isGenerating: boolean;
6
+ downloadProgress: number;
7
+ error: string | null;
8
+ configure: ({ chatConfig, toolsConfig, }: {
9
+ chatConfig?: Partial<ChatConfig>;
10
+ toolsConfig?: ToolsConfig;
11
+ }) => void;
12
+ generate: (messages: Message[], tools?: LLMTool[]) => Promise<void>;
13
+ sendMessage: (message: string) => Promise<void>;
14
+ deleteMessage: (index: number) => void;
15
+ interrupt: () => void;
16
+ }
17
+ export type MessageRole = 'user' | 'assistant' | 'system';
18
+ export interface Message {
19
+ role: MessageRole;
20
+ content: string;
21
+ }
22
+ export interface ToolCall {
23
+ toolName: string;
24
+ arguments: Object;
25
+ }
26
+ export type LLMTool = Object;
27
+ export interface ChatConfig {
28
+ initialMessageHistory: Message[];
29
+ contextWindowLength: number;
30
+ systemPrompt: string;
31
+ }
32
+ export interface ToolsConfig {
33
+ tools: LLMTool[];
34
+ executeToolCallback: (call: ToolCall) => Promise<string | null>;
35
+ displayToolCalls?: boolean;
36
+ }
37
+ export declare const SPECIAL_TOKENS: string[];
38
+ //# sourceMappingURL=llm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"llm.d.ts","sourceRoot":"","sources":["../../../src/types/llm.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,OAAO;IACtB,cAAc,EAAE,OAAO,EAAE,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,OAAO,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;IACzB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,SAAS,EAAE,CAAC,EACV,UAAU,EACV,WAAW,GACZ,EAAE;QACD,UAAU,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;QACjC,WAAW,CAAC,EAAE,WAAW,CAAC;KAC3B,KAAK,IAAI,CAAC;IACX,QAAQ,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,EAAE,KAAK,CAAC,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACpE,WAAW,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAChD,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,WAAW,GAAG,QAAQ,CAAC;AAE1D,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,WAAW,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,QAAQ;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB;AAID,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC;AAE7B,MAAM,WAAW,UAAU;IACzB,qBAAqB,EAAE,OAAO,EAAE,CAAC;IACjC,mBAAmB,EAAE,MAAM,CAAC;IAC5B,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,OAAO,EAAE,CAAC;IACjB,mBAAmB,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAChE,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,eAAO,MAAM,cAAc,UAQ1B,CAAC"}
@@ -102,4 +102,4 @@ declare enum CocoLabel {
102
102
  HAIR_BRUSH = 91
103
103
  }
104
104
  export {};
105
- //# sourceMappingURL=object_detection.d.ts.map
105
+ //# sourceMappingURL=objectDetection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"objectDetection.d.ts","sourceRoot":"","sources":["../../../src/types/objectDetection.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,IAAI,CAAC;IACX,KAAK,EAAE,MAAM,OAAO,SAAS,CAAC;IAC9B,KAAK,EAAE,MAAM,CAAC;CACf;AAED,aAAK,SAAS;IACZ,MAAM,IAAI;IACV,OAAO,IAAI;IACX,GAAG,IAAI;IACP,UAAU,IAAI;IACd,QAAQ,IAAI;IACZ,GAAG,IAAI;IACP,KAAK,IAAI;IACT,KAAK,IAAI;IACT,IAAI,IAAI;IACR,aAAa,KAAK;IAClB,YAAY,KAAK;IACjB,WAAW,KAAK;IAChB,SAAS,KAAK;IACd,OAAO,KAAK;IACZ,KAAK,KAAK;IACV,IAAI,KAAK;IACT,GAAG,KAAK;IACR,GAAG,KAAK;IACR,KAAK,KAAK;IACV,KAAK,KAAK;IACV,GAAG,KAAK;IACR,QAAQ,KAAK;IACb,IAAI,KAAK;IACT,KAAK,KAAK;IACV,OAAO,KAAK;IACZ,GAAG,KAAK;IACR,QAAQ,KAAK;IACb,QAAQ,KAAK;IACb,IAAI,KAAK;IACT,GAAG,KAAK;IACR,OAAO,KAAK;IACZ,GAAG,KAAK;IACR,QAAQ,KAAK;IACb,OAAO,KAAK;IACZ,IAAI,KAAK;IACT,SAAS,KAAK;IACd,MAAM,KAAK;IACX,IAAI,KAAK;IACT,QAAQ,KAAK;IACb,UAAU,KAAK;IACf,SAAS,KAAK;IACd,aAAa,KAAK;IAClB,MAAM,KAAK;IACX,KAAK,KAAK;IACV,UAAU,KAAK;IACf,GAAG,KAAK;IACR,IAAI,KAAK;IACT,KAAK,KAAK;IACV,KAAK,KAAK;IACV,IAAI,KAAK;IACT,MAAM,KAAK;IACX,KAAK,KAAK;IACV,QAAQ,KAAK;IACb,MAAM,KAAK;IACX,QAAQ,KAAK;IACb,MAAM,KAAK;IACX,OAAO,KAAK;IACZ,KAAK,KAAK;IACV,KAAK,KAAK;IACV,IAAI,KAAK;IACT,KAAK,KAAK;IACV,KAAK,KAAK;IACV,YAAY,KAAK;IACjB,GAAG,KAAK;IACR,MAAM,KAAK;IACX,YAAY,KAAK;IACjB,MAAM,KAAK;IACX,IAAI,KAAK;IACT,MAAM,KAAK;IACX,IAAI,KAAK;IACT,EAAE,KAAK;IACP,MAAM,KAAK;IACX,KAAK,KAAK;IACV,MAAM,KAAK;IACX,QAAQ,KAAK;IACb,UAAU,KAAK;IACf,SAAS,KAAK;IACd,IAAI,KAAK;IACT,OAAO,KAAK;IACZ,IAAI,KAAK;IACT,YAAY,KAAK;IACjB,OAAO,KAAK;IACZ,IAAI,KAAK;IACT,KAAK,KAAK;IACV,IAAI,KAAK;IACT,QAAQ,KAAK;IACb,UAAU,KAAK;IACf,UAAU,KAAK;IACf,UAAU,KAAK;IACf,UAAU,KAAK;CAChB"}
@@ -1,3 +1,4 @@
1
+ import { symbols } from '../constants/ocr/symbols';
1
2
  export interface OCRDetection {
2
3
  bbox: OCRBbox[];
3
4
  text: string;
@@ -7,5 +8,5 @@ export interface OCRBbox {
7
8
  x: number;
8
9
  y: number;
9
10
  }
10
- export type OCRLanguage = 'en';
11
+ export type OCRLanguage = keyof typeof symbols;
11
12
  //# sourceMappingURL=ocr.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ocr.d.ts","sourceRoot":"","sources":["../../../src/types/ocr.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,OAAO,EAAE,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,OAAO;IACtB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC"}
1
+ {"version":3,"file":"ocr.d.ts","sourceRoot":"","sources":["../../../src/types/ocr.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAEnD,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,OAAO,EAAE,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,OAAO;IACtB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,OAAO,CAAC"}
@@ -0,0 +1,91 @@
1
+ export interface ModelConfig {
2
+ sources: {
3
+ encoder: string;
4
+ decoder: string;
5
+ };
6
+ tokenizer: {
7
+ source: string;
8
+ bos: number;
9
+ eos: number;
10
+ };
11
+ isMultilingual: boolean;
12
+ }
13
+ export declare enum SpeechToTextLanguage {
14
+ Afrikaans = "af",
15
+ Albanian = "sq",
16
+ Arabic = "ar",
17
+ Armenian = "hy",
18
+ Azerbaijani = "az",
19
+ Basque = "eu",
20
+ Belarusian = "be",
21
+ Bengali = "bn",
22
+ Bosnian = "bs",
23
+ Bulgarian = "bg",
24
+ Burmese = "my",
25
+ Catalan = "ca",
26
+ Chinese = "zh",
27
+ Croatian = "hr",
28
+ Czech = "cs",
29
+ Danish = "da",
30
+ Dutch = "nl",
31
+ Estonian = "et",
32
+ English = "en",
33
+ Finnish = "fi",
34
+ French = "fr",
35
+ Galician = "gl",
36
+ Georgian = "ka",
37
+ German = "de",
38
+ Greek = "el",
39
+ Gujarati = "gu",
40
+ HaitianCreole = "ht",
41
+ Hebrew = "he",
42
+ Hindi = "hi",
43
+ Hungarian = "hu",
44
+ Icelandic = "is",
45
+ Indonesian = "id",
46
+ Italian = "it",
47
+ Japanese = "ja",
48
+ Kannada = "kn",
49
+ Kazakh = "kk",
50
+ Khmer = "km",
51
+ Korean = "ko",
52
+ Lao = "lo",
53
+ Latvian = "lv",
54
+ Lithuanian = "lt",
55
+ Macedonian = "mk",
56
+ Malagasy = "mg",
57
+ Malay = "ms",
58
+ Malayalam = "ml",
59
+ Maltese = "mt",
60
+ Marathi = "mr",
61
+ Nepali = "ne",
62
+ Norwegian = "no",
63
+ Persian = "fa",
64
+ Polish = "pl",
65
+ Portuguese = "pt",
66
+ Punjabi = "pa",
67
+ Romanian = "ro",
68
+ Russian = "ru",
69
+ Serbian = "sr",
70
+ Sinhala = "si",
71
+ Slovak = "sk",
72
+ Slovenian = "sl",
73
+ Spanish = "es",
74
+ Sundanese = "su",
75
+ Swahili = "sw",
76
+ Swedish = "sv",
77
+ Tagalog = "tl",
78
+ Tajik = "tg",
79
+ Tamil = "ta",
80
+ Telugu = "te",
81
+ Thai = "th",
82
+ Turkish = "tr",
83
+ Ukrainian = "uk",
84
+ Urdu = "ur",
85
+ Uzbek = "uz",
86
+ Vietnamese = "vi",
87
+ Welsh = "cy",
88
+ Yiddish = "yi"
89
+ }
90
+ export type AvailableModels = 'whisper' | 'moonshine' | 'whisperMultilingual';
91
+ //# sourceMappingURL=stt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stt.d.ts","sourceRoot":"","sources":["../../../src/types/stt.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE;QACP,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,SAAS,EAAE;QACT,MAAM,EAAE,MAAM,CAAC;QACf,GAAG,EAAE,MAAM,CAAC;QACZ,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;IACF,cAAc,EAAE,OAAO,CAAC;CACzB;AAGD,oBAAY,oBAAoB;IAC9B,SAAS,OAAO;IAChB,QAAQ,OAAO;IACf,MAAM,OAAO;IACb,QAAQ,OAAO;IACf,WAAW,OAAO;IAClB,MAAM,OAAO;IACb,UAAU,OAAO;IACjB,OAAO,OAAO;IACd,OAAO,OAAO;IACd,SAAS,OAAO;IAChB,OAAO,OAAO;IACd,OAAO,OAAO;IACd,OAAO,OAAO;IACd,QAAQ,OAAO;IACf,KAAK,OAAO;IACZ,MAAM,OAAO;IACb,KAAK,OAAO;IACZ,QAAQ,OAAO;IACf,OAAO,OAAO;IACd,OAAO,OAAO;IACd,MAAM,OAAO;IACb,QAAQ,OAAO;IACf,QAAQ,OAAO;IACf,MAAM,OAAO;IACb,KAAK,OAAO;IACZ,QAAQ,OAAO;IACf,aAAa,OAAO;IACpB,MAAM,OAAO;IACb,KAAK,OAAO;IACZ,SAAS,OAAO;IAChB,SAAS,OAAO;IAChB,UAAU,OAAO;IACjB,OAAO,OAAO;IACd,QAAQ,OAAO;IACf,OAAO,OAAO;IACd,MAAM,OAAO;IACb,KAAK,OAAO;IACZ,MAAM,OAAO;IACb,GAAG,OAAO;IACV,OAAO,OAAO;IACd,UAAU,OAAO;IACjB,UAAU,OAAO;IACjB,QAAQ,OAAO;IACf,KAAK,OAAO;IACZ,SAAS,OAAO;IAChB,OAAO,OAAO;IACd,OAAO,OAAO;IACd,MAAM,OAAO;IACb,SAAS,OAAO;IAChB,OAAO,OAAO;IACd,MAAM,OAAO;IACb,UAAU,OAAO;IACjB,OAAO,OAAO;IACd,QAAQ,OAAO;IACf,OAAO,OAAO;IACd,OAAO,OAAO;IACd,OAAO,OAAO;IACd,MAAM,OAAO;IACb,SAAS,OAAO;IAChB,OAAO,OAAO;IACd,SAAS,OAAO;IAChB,OAAO,OAAO;IACd,OAAO,OAAO;IACd,OAAO,OAAO;IACd,KAAK,OAAO;IACZ,KAAK,OAAO;IACZ,MAAM,OAAO;IACb,IAAI,OAAO;IACX,OAAO,OAAO;IACd,SAAS,OAAO;IAChB,IAAI,OAAO;IACX,KAAK,OAAO;IACZ,UAAU,OAAO;IACjB,KAAK,OAAO;IACZ,OAAO,OAAO;CACf;AAED,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,WAAW,GAAG,qBAAqB,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { ResourceSource } from '../types/common';
2
+ export declare class ResourceFetcher {
3
+ static fetch(source: ResourceSource, callback?: (downloadProgress: number) => void): Promise<string>;
4
+ static fetchMultipleResources(callback?: (downloadProgress: number) => void, ...sources: ResourceSource[]): Promise<string[]>;
5
+ static deleteMultipleResources(...sources: ResourceSource[]): Promise<void>;
6
+ private static calculateDownloadProgress;
7
+ static listDownloadedFiles(): Promise<string[]>;
8
+ static listDownloadedModels(): Promise<string[]>;
9
+ private static handleObject;
10
+ private static getFilenameFromUri;
11
+ private static removeFilePrefix;
12
+ private static hashObject;
13
+ private static triggerHuggingFaceDownloadCounter;
14
+ private static createDirectoryIfNoExists;
15
+ private static checkFileExists;
16
+ }
17
+ //# sourceMappingURL=ResourceFetcher.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ResourceFetcher.d.ts","sourceRoot":"","sources":["../../../src/utils/ResourceFetcher.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD,qBAAa,eAAe;WACb,KAAK,CAChB,MAAM,EAAE,cAAc,EACtB,QAAQ,GAAE,CAAC,gBAAgB,EAAE,MAAM,KAAK,IAAe;WAuD5C,sBAAsB,CACjC,QAAQ,GAAE,CAAC,gBAAgB,EAAE,MAAM,KAAK,IAAe,EACvD,GAAG,OAAO,EAAE,cAAc,EAAE;WAgBjB,uBAAuB,CAAC,GAAG,OAAO,EAAE,cAAc,EAAE;IAUjE,OAAO,CAAC,MAAM,CAAC,yBAAyB;WAkB3B,mBAAmB;WAKnB,oBAAoB;mBAKZ,YAAY;IAkBjC,OAAO,CAAC,MAAM,CAAC,kBAAkB;IAMjC,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAI/B,OAAO,CAAC,MAAM,CAAC,UAAU;IAgBzB,OAAO,CAAC,MAAM,CAAC,iCAAiC;mBAW3B,yBAAyB;mBAMzB,eAAe;CAIrC"}