react-native-executorch 0.5.1-rc.0 → 0.5.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 (178) hide show
  1. package/README.md +132 -0
  2. package/common/rnexecutorch/models/speech_to_text/SpeechToText.cpp +4 -10
  3. package/common/rnexecutorch/models/speech_to_text/SpeechToText.h +1 -1
  4. package/common/rnexecutorch/models/speech_to_text/SpeechToTextStrategy.h +3 -2
  5. package/common/rnexecutorch/models/speech_to_text/WhisperStrategy.cpp +16 -4
  6. package/common/rnexecutorch/models/speech_to_text/WhisperStrategy.h +2 -2
  7. package/lib/Error.d.ts +30 -0
  8. package/lib/Error.js +50 -0
  9. package/lib/constants/directories.d.ts +1 -0
  10. package/lib/constants/directories.js +2 -0
  11. package/lib/constants/llmDefaults.d.ts +6 -0
  12. package/lib/constants/llmDefaults.js +16 -0
  13. package/lib/constants/modelUrls.d.ts +217 -83
  14. package/lib/constants/modelUrls.js +304 -98
  15. package/lib/constants/ocr/models.d.ts +882 -0
  16. package/lib/constants/ocr/models.js +182 -0
  17. package/lib/constants/ocr/symbols.d.ts +75 -0
  18. package/lib/constants/ocr/symbols.js +139 -0
  19. package/lib/{typescript/constants → constants}/sttDefaults.d.ts +0 -1
  20. package/lib/constants/sttDefaults.js +12 -10
  21. package/lib/controllers/LLMController.d.ts +47 -0
  22. package/lib/controllers/LLMController.js +14 -11
  23. package/lib/controllers/OCRController.d.ts +23 -0
  24. package/lib/controllers/OCRController.js +12 -5
  25. package/lib/controllers/SpeechToTextController.d.ts +8 -4
  26. package/lib/controllers/SpeechToTextController.js +15 -9
  27. package/lib/controllers/VerticalOCRController.d.ts +25 -0
  28. package/lib/controllers/VerticalOCRController.js +75 -0
  29. package/lib/hooks/computer_vision/useClassification.d.ts +15 -0
  30. package/lib/hooks/computer_vision/useClassification.js +7 -0
  31. package/lib/hooks/computer_vision/useImageEmbeddings.d.ts +15 -0
  32. package/lib/hooks/computer_vision/useImageEmbeddings.js +7 -0
  33. package/lib/hooks/computer_vision/useImageSegmentation.d.ts +38 -0
  34. package/lib/hooks/computer_vision/useImageSegmentation.js +7 -0
  35. package/lib/hooks/computer_vision/useOCR.d.ts +20 -0
  36. package/lib/hooks/computer_vision/useOCR.js +42 -0
  37. package/lib/hooks/computer_vision/useObjectDetection.d.ts +15 -0
  38. package/lib/hooks/computer_vision/useObjectDetection.js +7 -0
  39. package/lib/hooks/computer_vision/useStyleTransfer.d.ts +15 -0
  40. package/lib/hooks/computer_vision/useStyleTransfer.js +7 -0
  41. package/lib/hooks/computer_vision/useVerticalOCR.d.ts +21 -0
  42. package/lib/hooks/computer_vision/useVerticalOCR.js +45 -0
  43. package/lib/hooks/general/useExecutorchModule.d.ts +13 -0
  44. package/lib/hooks/general/useExecutorchModule.js +7 -0
  45. package/lib/hooks/natural_language_processing/useLLM.d.ts +10 -0
  46. package/lib/hooks/natural_language_processing/useLLM.js +78 -0
  47. package/lib/hooks/natural_language_processing/useSpeechToText.d.ts +27 -0
  48. package/lib/hooks/natural_language_processing/useSpeechToText.js +19 -14
  49. package/lib/hooks/natural_language_processing/useTextEmbeddings.d.ts +16 -0
  50. package/lib/hooks/natural_language_processing/useTextEmbeddings.js +7 -0
  51. package/lib/hooks/natural_language_processing/useTokenizer.d.ts +17 -0
  52. package/lib/hooks/natural_language_processing/useTokenizer.js +52 -0
  53. package/lib/hooks/useModule.d.ts +17 -0
  54. package/lib/hooks/useModule.js +45 -0
  55. package/lib/hooks/useNonStaticModule.d.ts +20 -0
  56. package/lib/hooks/useNonStaticModule.js +49 -0
  57. package/lib/index.d.ts +1 -1
  58. package/lib/index.js +3 -2
  59. package/lib/module/constants/modelUrls.js +61 -36
  60. package/lib/module/constants/modelUrls.js.map +1 -1
  61. package/lib/module/constants/ocr/models.js +1 -1
  62. package/lib/module/hooks/natural_language_processing/useSpeechToText.js +71 -34
  63. package/lib/module/hooks/natural_language_processing/useSpeechToText.js.map +1 -1
  64. package/lib/module/index.js +2 -3
  65. package/lib/module/index.js.map +1 -1
  66. package/lib/module/modules/natural_language_processing/SpeechToTextModule.js +72 -31
  67. package/lib/module/modules/natural_language_processing/SpeechToTextModule.js.map +1 -1
  68. package/lib/module/types/stt.js +1 -85
  69. package/lib/module/types/stt.js.map +1 -1
  70. package/lib/module/utils/ResourceFetcher.js +6 -8
  71. package/lib/module/utils/ResourceFetcher.js.map +1 -1
  72. package/lib/module/utils/ResourceFetcherUtils.js +20 -20
  73. package/lib/module/utils/ResourceFetcherUtils.js.map +1 -1
  74. package/lib/module/utils/SpeechToTextModule/ASR.js +191 -0
  75. package/lib/module/utils/SpeechToTextModule/ASR.js.map +1 -0
  76. package/lib/module/utils/SpeechToTextModule/OnlineProcessor.js +73 -0
  77. package/lib/module/utils/SpeechToTextModule/OnlineProcessor.js.map +1 -0
  78. package/lib/module/utils/SpeechToTextModule/hypothesisBuffer.js +56 -0
  79. package/lib/module/utils/SpeechToTextModule/hypothesisBuffer.js.map +1 -0
  80. package/lib/modules/BaseModule.d.ts +8 -0
  81. package/lib/modules/BaseModule.js +25 -0
  82. package/lib/modules/BaseNonStaticModule.d.ts +9 -0
  83. package/lib/modules/BaseNonStaticModule.js +14 -0
  84. package/lib/modules/computer_vision/ClassificationModule.d.ts +8 -0
  85. package/lib/modules/computer_vision/ClassificationModule.js +17 -0
  86. package/lib/modules/computer_vision/ImageEmbeddingsModule.d.ts +8 -0
  87. package/lib/modules/computer_vision/ImageEmbeddingsModule.js +17 -0
  88. package/lib/modules/computer_vision/ImageSegmentationModule.d.ts +11 -0
  89. package/lib/modules/computer_vision/ImageSegmentationModule.js +27 -0
  90. package/lib/modules/computer_vision/OCRModule.d.ts +15 -0
  91. package/lib/modules/computer_vision/OCRModule.js +20 -0
  92. package/lib/modules/computer_vision/ObjectDetectionModule.d.ts +9 -0
  93. package/lib/modules/computer_vision/ObjectDetectionModule.js +17 -0
  94. package/lib/modules/computer_vision/StyleTransferModule.d.ts +8 -0
  95. package/lib/modules/computer_vision/StyleTransferModule.js +17 -0
  96. package/lib/modules/computer_vision/VerticalOCRModule.d.ts +15 -0
  97. package/lib/modules/computer_vision/VerticalOCRModule.js +22 -0
  98. package/lib/modules/general/ExecutorchModule.d.ts +7 -0
  99. package/lib/modules/general/ExecutorchModule.js +14 -0
  100. package/lib/modules/natural_language_processing/LLMModule.d.ts +28 -0
  101. package/lib/modules/natural_language_processing/LLMModule.js +45 -0
  102. package/lib/modules/natural_language_processing/SpeechToTextModule.d.ts +18 -8
  103. package/lib/modules/natural_language_processing/SpeechToTextModule.js +21 -15
  104. package/lib/modules/natural_language_processing/TextEmbeddingsModule.d.ts +9 -0
  105. package/lib/modules/natural_language_processing/TextEmbeddingsModule.js +21 -0
  106. package/lib/modules/natural_language_processing/TokenizerModule.d.ts +12 -0
  107. package/lib/modules/natural_language_processing/TokenizerModule.js +5 -4
  108. package/lib/native/NativeETInstaller.d.ts +6 -0
  109. package/lib/native/NativeETInstaller.js +2 -0
  110. package/lib/native/NativeOCR.d.ts +8 -0
  111. package/lib/native/NativeOCR.js +2 -0
  112. package/lib/native/NativeVerticalOCR.d.ts +8 -0
  113. package/lib/native/NativeVerticalOCR.js +2 -0
  114. package/lib/types/common.d.ts +31 -0
  115. package/lib/types/common.js +25 -0
  116. package/lib/types/imageSegmentation.d.ts +24 -0
  117. package/lib/types/imageSegmentation.js +26 -0
  118. package/lib/types/llm.d.ts +46 -0
  119. package/lib/types/llm.js +9 -0
  120. package/lib/types/objectDetection.d.ts +104 -0
  121. package/lib/types/objectDetection.js +94 -0
  122. package/lib/types/ocr.d.ts +11 -0
  123. package/lib/types/ocr.js +1 -0
  124. package/lib/types/stt.d.ts +94 -0
  125. package/lib/types/stt.js +85 -0
  126. package/lib/typescript/constants/modelUrls.d.ts +24 -7
  127. package/lib/typescript/constants/modelUrls.d.ts.map +1 -1
  128. package/lib/typescript/constants/ocr/models.d.ts +126 -126
  129. package/lib/typescript/hooks/natural_language_processing/useSpeechToText.d.ts +15 -24
  130. package/lib/typescript/hooks/natural_language_processing/useSpeechToText.d.ts.map +1 -1
  131. package/lib/typescript/index.d.ts +2 -3
  132. package/lib/typescript/index.d.ts.map +1 -1
  133. package/lib/typescript/modules/natural_language_processing/SpeechToTextModule.d.ts +19 -22
  134. package/lib/typescript/modules/natural_language_processing/SpeechToTextModule.d.ts.map +1 -1
  135. package/lib/typescript/types/stt.d.ts +17 -91
  136. package/lib/typescript/types/stt.d.ts.map +1 -1
  137. package/lib/typescript/utils/ResourceFetcher.d.ts.map +1 -1
  138. package/lib/typescript/utils/ResourceFetcherUtils.d.ts.map +1 -1
  139. package/lib/typescript/utils/SpeechToTextModule/ASR.d.ts +27 -0
  140. package/lib/typescript/utils/SpeechToTextModule/ASR.d.ts.map +1 -0
  141. package/lib/typescript/utils/SpeechToTextModule/OnlineProcessor.d.ts +23 -0
  142. package/lib/typescript/utils/SpeechToTextModule/OnlineProcessor.d.ts.map +1 -0
  143. package/lib/typescript/utils/SpeechToTextModule/hypothesisBuffer.d.ts +13 -0
  144. package/lib/typescript/utils/SpeechToTextModule/hypothesisBuffer.d.ts.map +1 -0
  145. package/lib/utils/ResourceFetcher.d.ts +24 -0
  146. package/lib/utils/ResourceFetcher.js +305 -0
  147. package/lib/utils/ResourceFetcherUtils.d.ts +54 -0
  148. package/lib/utils/ResourceFetcherUtils.js +9 -0
  149. package/lib/utils/llm.d.ts +6 -0
  150. package/lib/utils/llm.js +1 -0
  151. package/lib/utils/stt.d.ts +1 -0
  152. package/lib/utils/stt.js +21 -0
  153. package/package.json +5 -3
  154. package/src/constants/modelUrls.ts +70 -37
  155. package/src/constants/ocr/models.ts +1 -1
  156. package/src/hooks/natural_language_processing/useSpeechToText.ts +87 -92
  157. package/src/index.ts +6 -8
  158. package/src/modules/natural_language_processing/SpeechToTextModule.ts +81 -69
  159. package/src/types/stt.ts +97 -92
  160. package/src/utils/ResourceFetcher.ts +9 -7
  161. package/src/utils/ResourceFetcherUtils.ts +15 -17
  162. package/src/utils/SpeechToTextModule/ASR.ts +303 -0
  163. package/src/utils/SpeechToTextModule/OnlineProcessor.ts +87 -0
  164. package/src/utils/SpeechToTextModule/hypothesisBuffer.ts +79 -0
  165. package/common/rnexecutorch/models/speech_to_text/MoonshineStrategy.cpp +0 -31
  166. package/common/rnexecutorch/models/speech_to_text/MoonshineStrategy.h +0 -21
  167. package/lib/module/constants/sttDefaults.js +0 -74
  168. package/lib/module/constants/sttDefaults.js.map +0 -1
  169. package/lib/module/controllers/SpeechToTextController.js +0 -320
  170. package/lib/module/controllers/SpeechToTextController.js.map +0 -1
  171. package/lib/typescript/constants/sttDefaults.d.ts.map +0 -1
  172. package/lib/typescript/controllers/SpeechToTextController.d.ts +0 -57
  173. package/lib/typescript/controllers/SpeechToTextController.d.ts.map +0 -1
  174. package/src/constants/sttDefaults.ts +0 -82
  175. package/src/controllers/SpeechToTextController.ts +0 -471
  176. package/third-party/ios/ExecutorchLib/ExecutorchLib.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
  177. package/third-party/ios/ExecutorchLib/ExecutorchLib.xcodeproj/project.xcworkspace/xcuserdata/norbertklockiewicz.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  178. package/third-party/ios/ExecutorchLib/ExecutorchLib.xcodeproj/xcuserdata/norbertklockiewicz.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
@@ -0,0 +1,94 @@
1
+ var CocoLabel;
2
+ (function (CocoLabel) {
3
+ CocoLabel[CocoLabel["PERSON"] = 1] = "PERSON";
4
+ CocoLabel[CocoLabel["BICYCLE"] = 2] = "BICYCLE";
5
+ CocoLabel[CocoLabel["CAR"] = 3] = "CAR";
6
+ CocoLabel[CocoLabel["MOTORCYCLE"] = 4] = "MOTORCYCLE";
7
+ CocoLabel[CocoLabel["AIRPLANE"] = 5] = "AIRPLANE";
8
+ CocoLabel[CocoLabel["BUS"] = 6] = "BUS";
9
+ CocoLabel[CocoLabel["TRAIN"] = 7] = "TRAIN";
10
+ CocoLabel[CocoLabel["TRUCK"] = 8] = "TRUCK";
11
+ CocoLabel[CocoLabel["BOAT"] = 9] = "BOAT";
12
+ CocoLabel[CocoLabel["TRAFFIC_LIGHT"] = 10] = "TRAFFIC_LIGHT";
13
+ CocoLabel[CocoLabel["FIRE_HYDRANT"] = 11] = "FIRE_HYDRANT";
14
+ CocoLabel[CocoLabel["STREET_SIGN"] = 12] = "STREET_SIGN";
15
+ CocoLabel[CocoLabel["STOP_SIGN"] = 13] = "STOP_SIGN";
16
+ CocoLabel[CocoLabel["PARKING"] = 14] = "PARKING";
17
+ CocoLabel[CocoLabel["BENCH"] = 15] = "BENCH";
18
+ CocoLabel[CocoLabel["BIRD"] = 16] = "BIRD";
19
+ CocoLabel[CocoLabel["CAT"] = 17] = "CAT";
20
+ CocoLabel[CocoLabel["DOG"] = 18] = "DOG";
21
+ CocoLabel[CocoLabel["HORSE"] = 19] = "HORSE";
22
+ CocoLabel[CocoLabel["SHEEP"] = 20] = "SHEEP";
23
+ CocoLabel[CocoLabel["COW"] = 21] = "COW";
24
+ CocoLabel[CocoLabel["ELEPHANT"] = 22] = "ELEPHANT";
25
+ CocoLabel[CocoLabel["BEAR"] = 23] = "BEAR";
26
+ CocoLabel[CocoLabel["ZEBRA"] = 24] = "ZEBRA";
27
+ CocoLabel[CocoLabel["GIRAFFE"] = 25] = "GIRAFFE";
28
+ CocoLabel[CocoLabel["HAT"] = 26] = "HAT";
29
+ CocoLabel[CocoLabel["BACKPACK"] = 27] = "BACKPACK";
30
+ CocoLabel[CocoLabel["UMBRELLA"] = 28] = "UMBRELLA";
31
+ CocoLabel[CocoLabel["SHOE"] = 29] = "SHOE";
32
+ CocoLabel[CocoLabel["EYE"] = 30] = "EYE";
33
+ CocoLabel[CocoLabel["HANDBAG"] = 31] = "HANDBAG";
34
+ CocoLabel[CocoLabel["TIE"] = 32] = "TIE";
35
+ CocoLabel[CocoLabel["SUITCASE"] = 33] = "SUITCASE";
36
+ CocoLabel[CocoLabel["FRISBEE"] = 34] = "FRISBEE";
37
+ CocoLabel[CocoLabel["SKIS"] = 35] = "SKIS";
38
+ CocoLabel[CocoLabel["SNOWBOARD"] = 36] = "SNOWBOARD";
39
+ CocoLabel[CocoLabel["SPORTS"] = 37] = "SPORTS";
40
+ CocoLabel[CocoLabel["KITE"] = 38] = "KITE";
41
+ CocoLabel[CocoLabel["BASEBALL"] = 39] = "BASEBALL";
42
+ CocoLabel[CocoLabel["SKATEBOARD"] = 41] = "SKATEBOARD";
43
+ CocoLabel[CocoLabel["SURFBOARD"] = 42] = "SURFBOARD";
44
+ CocoLabel[CocoLabel["TENNIS_RACKET"] = 43] = "TENNIS_RACKET";
45
+ CocoLabel[CocoLabel["BOTTLE"] = 44] = "BOTTLE";
46
+ CocoLabel[CocoLabel["PLATE"] = 45] = "PLATE";
47
+ CocoLabel[CocoLabel["WINE_GLASS"] = 46] = "WINE_GLASS";
48
+ CocoLabel[CocoLabel["CUP"] = 47] = "CUP";
49
+ CocoLabel[CocoLabel["FORK"] = 48] = "FORK";
50
+ CocoLabel[CocoLabel["KNIFE"] = 49] = "KNIFE";
51
+ CocoLabel[CocoLabel["SPOON"] = 50] = "SPOON";
52
+ CocoLabel[CocoLabel["BOWL"] = 51] = "BOWL";
53
+ CocoLabel[CocoLabel["BANANA"] = 52] = "BANANA";
54
+ CocoLabel[CocoLabel["APPLE"] = 53] = "APPLE";
55
+ CocoLabel[CocoLabel["SANDWICH"] = 54] = "SANDWICH";
56
+ CocoLabel[CocoLabel["ORANGE"] = 55] = "ORANGE";
57
+ CocoLabel[CocoLabel["BROCCOLI"] = 56] = "BROCCOLI";
58
+ CocoLabel[CocoLabel["CARROT"] = 57] = "CARROT";
59
+ CocoLabel[CocoLabel["HOT_DOG"] = 58] = "HOT_DOG";
60
+ CocoLabel[CocoLabel["PIZZA"] = 59] = "PIZZA";
61
+ CocoLabel[CocoLabel["DONUT"] = 60] = "DONUT";
62
+ CocoLabel[CocoLabel["CAKE"] = 61] = "CAKE";
63
+ CocoLabel[CocoLabel["CHAIR"] = 62] = "CHAIR";
64
+ CocoLabel[CocoLabel["COUCH"] = 63] = "COUCH";
65
+ CocoLabel[CocoLabel["POTTED_PLANT"] = 64] = "POTTED_PLANT";
66
+ CocoLabel[CocoLabel["BED"] = 65] = "BED";
67
+ CocoLabel[CocoLabel["MIRROR"] = 66] = "MIRROR";
68
+ CocoLabel[CocoLabel["DINING_TABLE"] = 67] = "DINING_TABLE";
69
+ CocoLabel[CocoLabel["WINDOW"] = 68] = "WINDOW";
70
+ CocoLabel[CocoLabel["DESK"] = 69] = "DESK";
71
+ CocoLabel[CocoLabel["TOILET"] = 70] = "TOILET";
72
+ CocoLabel[CocoLabel["DOOR"] = 71] = "DOOR";
73
+ CocoLabel[CocoLabel["TV"] = 72] = "TV";
74
+ CocoLabel[CocoLabel["LAPTOP"] = 73] = "LAPTOP";
75
+ CocoLabel[CocoLabel["MOUSE"] = 74] = "MOUSE";
76
+ CocoLabel[CocoLabel["REMOTE"] = 75] = "REMOTE";
77
+ CocoLabel[CocoLabel["KEYBOARD"] = 76] = "KEYBOARD";
78
+ CocoLabel[CocoLabel["CELL_PHONE"] = 77] = "CELL_PHONE";
79
+ CocoLabel[CocoLabel["MICROWAVE"] = 78] = "MICROWAVE";
80
+ CocoLabel[CocoLabel["OVEN"] = 79] = "OVEN";
81
+ CocoLabel[CocoLabel["TOASTER"] = 80] = "TOASTER";
82
+ CocoLabel[CocoLabel["SINK"] = 81] = "SINK";
83
+ CocoLabel[CocoLabel["REFRIGERATOR"] = 82] = "REFRIGERATOR";
84
+ CocoLabel[CocoLabel["BLENDER"] = 83] = "BLENDER";
85
+ CocoLabel[CocoLabel["BOOK"] = 84] = "BOOK";
86
+ CocoLabel[CocoLabel["CLOCK"] = 85] = "CLOCK";
87
+ CocoLabel[CocoLabel["VASE"] = 86] = "VASE";
88
+ CocoLabel[CocoLabel["SCISSORS"] = 87] = "SCISSORS";
89
+ CocoLabel[CocoLabel["TEDDY_BEAR"] = 88] = "TEDDY_BEAR";
90
+ CocoLabel[CocoLabel["HAIR_DRIER"] = 89] = "HAIR_DRIER";
91
+ CocoLabel[CocoLabel["TOOTHBRUSH"] = 90] = "TOOTHBRUSH";
92
+ CocoLabel[CocoLabel["HAIR_BRUSH"] = 91] = "HAIR_BRUSH";
93
+ })(CocoLabel || (CocoLabel = {}));
94
+ export {};
@@ -0,0 +1,11 @@
1
+ import { symbols } from '../constants/ocr/symbols';
2
+ export interface OCRDetection {
3
+ bbox: OCRBbox[];
4
+ text: string;
5
+ score: number;
6
+ }
7
+ export interface OCRBbox {
8
+ x: number;
9
+ y: number;
10
+ }
11
+ export type OCRLanguage = keyof typeof symbols;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,94 @@
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 declare enum AvailableModels {
91
+ WHISPER = "whisper",
92
+ MOONSHINE = "moonshine",
93
+ WHISPER_MULTILINGUAL = "whisperMultilingual"
94
+ }
@@ -0,0 +1,85 @@
1
+ // Those languages are supported just by whisper multilingual
2
+ export var SpeechToTextLanguage;
3
+ (function (SpeechToTextLanguage) {
4
+ SpeechToTextLanguage["Afrikaans"] = "af";
5
+ SpeechToTextLanguage["Albanian"] = "sq";
6
+ SpeechToTextLanguage["Arabic"] = "ar";
7
+ SpeechToTextLanguage["Armenian"] = "hy";
8
+ SpeechToTextLanguage["Azerbaijani"] = "az";
9
+ SpeechToTextLanguage["Basque"] = "eu";
10
+ SpeechToTextLanguage["Belarusian"] = "be";
11
+ SpeechToTextLanguage["Bengali"] = "bn";
12
+ SpeechToTextLanguage["Bosnian"] = "bs";
13
+ SpeechToTextLanguage["Bulgarian"] = "bg";
14
+ SpeechToTextLanguage["Burmese"] = "my";
15
+ SpeechToTextLanguage["Catalan"] = "ca";
16
+ SpeechToTextLanguage["Chinese"] = "zh";
17
+ SpeechToTextLanguage["Croatian"] = "hr";
18
+ SpeechToTextLanguage["Czech"] = "cs";
19
+ SpeechToTextLanguage["Danish"] = "da";
20
+ SpeechToTextLanguage["Dutch"] = "nl";
21
+ SpeechToTextLanguage["Estonian"] = "et";
22
+ SpeechToTextLanguage["English"] = "en";
23
+ SpeechToTextLanguage["Finnish"] = "fi";
24
+ SpeechToTextLanguage["French"] = "fr";
25
+ SpeechToTextLanguage["Galician"] = "gl";
26
+ SpeechToTextLanguage["Georgian"] = "ka";
27
+ SpeechToTextLanguage["German"] = "de";
28
+ SpeechToTextLanguage["Greek"] = "el";
29
+ SpeechToTextLanguage["Gujarati"] = "gu";
30
+ SpeechToTextLanguage["HaitianCreole"] = "ht";
31
+ SpeechToTextLanguage["Hebrew"] = "he";
32
+ SpeechToTextLanguage["Hindi"] = "hi";
33
+ SpeechToTextLanguage["Hungarian"] = "hu";
34
+ SpeechToTextLanguage["Icelandic"] = "is";
35
+ SpeechToTextLanguage["Indonesian"] = "id";
36
+ SpeechToTextLanguage["Italian"] = "it";
37
+ SpeechToTextLanguage["Japanese"] = "ja";
38
+ SpeechToTextLanguage["Kannada"] = "kn";
39
+ SpeechToTextLanguage["Kazakh"] = "kk";
40
+ SpeechToTextLanguage["Khmer"] = "km";
41
+ SpeechToTextLanguage["Korean"] = "ko";
42
+ SpeechToTextLanguage["Lao"] = "lo";
43
+ SpeechToTextLanguage["Latvian"] = "lv";
44
+ SpeechToTextLanguage["Lithuanian"] = "lt";
45
+ SpeechToTextLanguage["Macedonian"] = "mk";
46
+ SpeechToTextLanguage["Malagasy"] = "mg";
47
+ SpeechToTextLanguage["Malay"] = "ms";
48
+ SpeechToTextLanguage["Malayalam"] = "ml";
49
+ SpeechToTextLanguage["Maltese"] = "mt";
50
+ SpeechToTextLanguage["Marathi"] = "mr";
51
+ SpeechToTextLanguage["Nepali"] = "ne";
52
+ SpeechToTextLanguage["Norwegian"] = "no";
53
+ SpeechToTextLanguage["Persian"] = "fa";
54
+ SpeechToTextLanguage["Polish"] = "pl";
55
+ SpeechToTextLanguage["Portuguese"] = "pt";
56
+ SpeechToTextLanguage["Punjabi"] = "pa";
57
+ SpeechToTextLanguage["Romanian"] = "ro";
58
+ SpeechToTextLanguage["Russian"] = "ru";
59
+ SpeechToTextLanguage["Serbian"] = "sr";
60
+ SpeechToTextLanguage["Sinhala"] = "si";
61
+ SpeechToTextLanguage["Slovak"] = "sk";
62
+ SpeechToTextLanguage["Slovenian"] = "sl";
63
+ SpeechToTextLanguage["Spanish"] = "es";
64
+ SpeechToTextLanguage["Sundanese"] = "su";
65
+ SpeechToTextLanguage["Swahili"] = "sw";
66
+ SpeechToTextLanguage["Swedish"] = "sv";
67
+ SpeechToTextLanguage["Tagalog"] = "tl";
68
+ SpeechToTextLanguage["Tajik"] = "tg";
69
+ SpeechToTextLanguage["Tamil"] = "ta";
70
+ SpeechToTextLanguage["Telugu"] = "te";
71
+ SpeechToTextLanguage["Thai"] = "th";
72
+ SpeechToTextLanguage["Turkish"] = "tr";
73
+ SpeechToTextLanguage["Ukrainian"] = "uk";
74
+ SpeechToTextLanguage["Urdu"] = "ur";
75
+ SpeechToTextLanguage["Uzbek"] = "uz";
76
+ SpeechToTextLanguage["Vietnamese"] = "vi";
77
+ SpeechToTextLanguage["Welsh"] = "cy";
78
+ SpeechToTextLanguage["Yiddish"] = "yi";
79
+ })(SpeechToTextLanguage || (SpeechToTextLanguage = {}));
80
+ export var AvailableModels;
81
+ (function (AvailableModels) {
82
+ AvailableModels["WHISPER"] = "whisper";
83
+ AvailableModels["MOONSHINE"] = "moonshine";
84
+ AvailableModels["WHISPER_MULTILINGUAL"] = "whisperMultilingual";
85
+ })(AvailableModels || (AvailableModels = {}));
@@ -1,4 +1,3 @@
1
- import { AvailableModels } from '../types/stt';
2
1
  export declare const LLAMA3_2_3B: {
3
2
  modelSource: string;
4
3
  tokenizerSource: string;
@@ -177,22 +176,40 @@ export declare const STYLE_TRANSFER_RAIN_PRINCESS: {
177
176
  export declare const STYLE_TRANSFER_UDNIE: {
178
177
  modelSource: string;
179
178
  };
180
- export declare const MOONSHINE_TINY: {
181
- modelName: AvailableModels;
179
+ export declare const WHISPER_TINY_EN: {
180
+ isMultilingual: boolean;
181
+ encoderSource: string;
182
182
  decoderSource: string;
183
+ tokenizerSource: string;
184
+ };
185
+ export declare const WHISPER_BASE_EN: {
186
+ isMultilingual: boolean;
183
187
  encoderSource: string;
188
+ decoderSource: string;
184
189
  tokenizerSource: string;
185
190
  };
186
- export declare const WHISPER_TINY: {
187
- modelName: AvailableModels;
191
+ export declare const WHISPER_SMALL_EN: {
192
+ isMultilingual: boolean;
193
+ encoderSource: string;
188
194
  decoderSource: string;
195
+ tokenizerSource: string;
196
+ };
197
+ export declare const WHISPER_TINY: {
198
+ isMultilingual: boolean;
189
199
  encoderSource: string;
200
+ decoderSource: string;
190
201
  tokenizerSource: string;
191
202
  };
192
- export declare const WHISPER_TINY_MULTILINGUAL: {
193
- modelName: AvailableModels;
203
+ export declare const WHISPER_BASE: {
204
+ isMultilingual: boolean;
205
+ encoderSource: string;
194
206
  decoderSource: string;
207
+ tokenizerSource: string;
208
+ };
209
+ export declare const WHISPER_SMALL: {
210
+ isMultilingual: boolean;
195
211
  encoderSource: string;
212
+ decoderSource: string;
196
213
  tokenizerSource: string;
197
214
  };
198
215
  export declare const DEEPLAB_V3_RESNET50: {
@@ -1 +1 @@
1
- {"version":3,"file":"modelUrls.d.ts","sourceRoot":"","sources":["../../../src/constants/modelUrls.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAmB/C,eAAO,MAAM,WAAW;;;;CAIvB,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;CAI7B,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;;CAIjC,CAAC;AAEF,eAAO,MAAM,WAAW;;;;CAIvB,CAAC;AA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