react-native-sherpa-onnx 0.3.6 → 0.3.7

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 (222) hide show
  1. package/LICENSE +1 -0
  2. package/README.md +89 -21
  3. package/SherpaOnnx.podspec +3 -0
  4. package/THIRD_PARTY_LICENSES/README.md +62 -0
  5. package/THIRD_PARTY_LICENSES/ffmpeg.txt +502 -0
  6. package/THIRD_PARTY_LICENSES/libarchive.txt +65 -0
  7. package/THIRD_PARTY_LICENSES/nvidia_omla.txt +181 -0
  8. package/THIRD_PARTY_LICENSES/onnxruntime.txt +21 -0
  9. package/THIRD_PARTY_LICENSES/opus.txt +44 -0
  10. package/THIRD_PARTY_LICENSES/sherpa-onnx.txt +201 -0
  11. package/THIRD_PARTY_LICENSES/shine.txt +482 -0
  12. package/THIRD_PARTY_LICENSES/zstd.txt +30 -0
  13. package/android/build.gradle +7 -3
  14. package/android/prebuilt-download.gradle +344 -152
  15. package/android/prebuilt-versions.gradle +1 -1
  16. package/android/src/main/assets/model_licenses/asr-models-license-status.csv +409 -0
  17. package/android/src/main/assets/model_licenses/qnn-asr-models-license-status.csv +695 -0
  18. package/android/src/main/assets/model_licenses/tts-models-license-status.csv +596 -0
  19. package/android/src/main/cpp/CMakeLists.txt +28 -10
  20. package/android/src/main/cpp/jni/archive/sherpa-onnx-archive-helper.cpp +2 -2
  21. package/android/src/main/cpp/jni/audio/sherpa-onnx-audio-convert-jni.cpp +268 -2
  22. package/android/src/main/cpp/jni/model_detect/sherpa-onnx-model-detect-tts.cpp +6 -2
  23. package/android/src/main/cpp/jni/model_detect/sherpa-onnx-validate-tts.cpp +4 -2
  24. package/android/src/main/java/com/sherpaonnx/SherpaOnnxArchiveHelper.kt +40 -10
  25. package/android/src/main/java/com/sherpaonnx/SherpaOnnxModule.kt +99 -0
  26. package/android/src/main/java/com/sherpaonnx/SherpaOnnxOnlineSttHelper.kt +4 -1
  27. package/android/src/main/java/com/sherpaonnx/SherpaOnnxTtsHelper.kt +112 -97
  28. package/ios/Resources/model_licenses/asr-models-license-status.csv +409 -0
  29. package/ios/Resources/model_licenses/qnn-asr-models-license-status.csv +695 -0
  30. package/ios/Resources/model_licenses/tts-models-license-status.csv +596 -0
  31. package/ios/SherpaOnnx+OnlineSTT.mm +2 -0
  32. package/ios/SherpaOnnx+PcmLiveStream.mm +2 -29
  33. package/ios/SherpaOnnx+TTS.mm +178 -20
  34. package/ios/SherpaOnnx.mm +54 -0
  35. package/ios/SherpaOnnxAudioConvert.h +10 -0
  36. package/ios/SherpaOnnxAudioConvert.mm +257 -1
  37. package/ios/archive/sherpa-onnx-archive-helper.h +3 -0
  38. package/ios/archive/sherpa-onnx-archive-helper.mm +39 -6
  39. package/ios/model_detect/sherpa-onnx-model-detect-tts.mm +13 -2
  40. package/ios/model_detect/sherpa-onnx-validate-tts.mm +4 -2
  41. package/ios/online_stt/sherpa-onnx-online-stt-wrapper.h +1 -0
  42. package/ios/online_stt/sherpa-onnx-online-stt-wrapper.mm +4 -0
  43. package/ios/tts/sherpa-onnx-tts-wrapper.h +37 -0
  44. package/ios/tts/sherpa-onnx-tts-wrapper.mm +149 -3
  45. package/lib/module/NativeSherpaOnnx.js.map +1 -1
  46. package/lib/module/audio/index.js +8 -0
  47. package/lib/module/audio/index.js.map +1 -1
  48. package/lib/module/download/ModelDownloadManager.js +10 -929
  49. package/lib/module/download/ModelDownloadManager.js.map +1 -1
  50. package/lib/module/download/activeModelOperations.js +26 -0
  51. package/lib/module/download/activeModelOperations.js.map +1 -0
  52. package/lib/module/download/background-downloader.d.js +2 -0
  53. package/lib/module/download/background-downloader.d.js.map +1 -0
  54. package/lib/module/download/bulkPurge.js +72 -0
  55. package/lib/module/download/bulkPurge.js.map +1 -0
  56. package/lib/module/download/checksumPrompt.js +19 -0
  57. package/lib/module/download/checksumPrompt.js.map +1 -0
  58. package/lib/module/download/constants.js +7 -0
  59. package/lib/module/download/constants.js.map +1 -0
  60. package/lib/module/download/downloadEvents.js +35 -0
  61. package/lib/module/download/downloadEvents.js.map +1 -0
  62. package/lib/module/download/downloadTask.js +385 -0
  63. package/lib/module/download/downloadTask.js.map +1 -0
  64. package/lib/module/download/ensureModel.js +89 -0
  65. package/lib/module/download/ensureModel.js.map +1 -0
  66. package/lib/module/download/index.js +4 -4
  67. package/lib/module/download/index.js.map +1 -1
  68. package/lib/module/download/localModels.js +151 -0
  69. package/lib/module/download/localModels.js.map +1 -0
  70. package/lib/module/download/modelExtraction.js +174 -0
  71. package/lib/module/download/modelExtraction.js.map +1 -0
  72. package/lib/module/download/paths.js +98 -0
  73. package/lib/module/download/paths.js.map +1 -0
  74. package/lib/module/download/postDownloadProcessing.js +206 -0
  75. package/lib/module/download/postDownloadProcessing.js.map +1 -0
  76. package/lib/module/download/protectedModelKeys.js +31 -0
  77. package/lib/module/download/protectedModelKeys.js.map +1 -0
  78. package/lib/module/download/registry.js +267 -0
  79. package/lib/module/download/registry.js.map +1 -0
  80. package/lib/module/download/retry.js +59 -0
  81. package/lib/module/download/retry.js.map +1 -0
  82. package/lib/module/download/types.js +17 -0
  83. package/lib/module/download/types.js.map +1 -0
  84. package/lib/module/download/validation.js +101 -5
  85. package/lib/module/download/validation.js.map +1 -1
  86. package/lib/module/{download → extraction}/extractTarBz2.js +3 -1
  87. package/lib/module/extraction/extractTarBz2.js.map +1 -0
  88. package/lib/module/{download → extraction}/extractTarZst.js +3 -1
  89. package/lib/module/extraction/extractTarZst.js.map +1 -0
  90. package/lib/module/extraction/index.js +3 -4
  91. package/lib/module/extraction/index.js.map +1 -1
  92. package/lib/module/index.js +1 -1
  93. package/lib/module/index.js.map +1 -1
  94. package/lib/module/licenses.js +63 -0
  95. package/lib/module/licenses.js.map +1 -0
  96. package/lib/module/stt/index.js +16 -2
  97. package/lib/module/stt/index.js.map +1 -1
  98. package/lib/module/stt/streaming.js +2 -0
  99. package/lib/module/stt/streaming.js.map +1 -1
  100. package/lib/module/stt/streamingTypes.js.map +1 -1
  101. package/lib/module/stt/types.js.map +1 -1
  102. package/lib/module/tts/index.js +20 -2
  103. package/lib/module/tts/index.js.map +1 -1
  104. package/lib/module/tts/streaming.js +4 -0
  105. package/lib/module/tts/streaming.js.map +1 -1
  106. package/lib/module/tts/types.js.map +1 -1
  107. package/lib/module/utils.js +16 -1
  108. package/lib/module/utils.js.map +1 -1
  109. package/lib/typescript/src/NativeSherpaOnnx.d.ts +33 -5
  110. package/lib/typescript/src/NativeSherpaOnnx.d.ts.map +1 -1
  111. package/lib/typescript/src/audio/index.d.ts +10 -0
  112. package/lib/typescript/src/audio/index.d.ts.map +1 -1
  113. package/lib/typescript/src/download/ModelDownloadManager.d.ts +10 -108
  114. package/lib/typescript/src/download/ModelDownloadManager.d.ts.map +1 -1
  115. package/lib/typescript/src/download/activeModelOperations.d.ts +6 -0
  116. package/lib/typescript/src/download/activeModelOperations.d.ts.map +1 -0
  117. package/lib/typescript/src/download/bulkPurge.d.ts +14 -0
  118. package/lib/typescript/src/download/bulkPurge.d.ts.map +1 -0
  119. package/lib/typescript/src/download/checksumPrompt.d.ts +3 -0
  120. package/lib/typescript/src/download/checksumPrompt.d.ts.map +1 -0
  121. package/lib/typescript/src/download/constants.d.ts +5 -0
  122. package/lib/typescript/src/download/constants.d.ts.map +1 -0
  123. package/lib/typescript/src/download/downloadEvents.d.ts +6 -0
  124. package/lib/typescript/src/download/downloadEvents.d.ts.map +1 -0
  125. package/lib/typescript/src/download/downloadTask.d.ts +20 -0
  126. package/lib/typescript/src/download/downloadTask.d.ts.map +1 -0
  127. package/lib/typescript/src/download/ensureModel.d.ts +26 -0
  128. package/lib/typescript/src/download/ensureModel.d.ts.map +1 -0
  129. package/lib/typescript/src/download/index.d.ts +7 -7
  130. package/lib/typescript/src/download/index.d.ts.map +1 -1
  131. package/lib/typescript/src/download/localModels.d.ts +15 -0
  132. package/lib/typescript/src/download/localModels.d.ts.map +1 -0
  133. package/lib/typescript/src/download/modelExtraction.d.ts +36 -0
  134. package/lib/typescript/src/download/modelExtraction.d.ts.map +1 -0
  135. package/lib/typescript/src/download/paths.d.ts +28 -0
  136. package/lib/typescript/src/download/paths.d.ts.map +1 -0
  137. package/lib/typescript/src/download/postDownloadProcessing.d.ts +19 -0
  138. package/lib/typescript/src/download/postDownloadProcessing.d.ts.map +1 -0
  139. package/lib/typescript/src/download/protectedModelKeys.d.ts +6 -0
  140. package/lib/typescript/src/download/protectedModelKeys.d.ts.map +1 -0
  141. package/lib/typescript/src/download/registry.d.ts +14 -0
  142. package/lib/typescript/src/download/registry.d.ts.map +1 -0
  143. package/lib/typescript/src/download/retry.d.ts +15 -0
  144. package/lib/typescript/src/download/retry.d.ts.map +1 -0
  145. package/lib/typescript/src/download/types.d.ts +96 -0
  146. package/lib/typescript/src/download/types.d.ts.map +1 -0
  147. package/lib/typescript/src/download/validation.d.ts +19 -0
  148. package/lib/typescript/src/download/validation.d.ts.map +1 -1
  149. package/lib/typescript/src/extraction/extractTarBz2.d.ts.map +1 -0
  150. package/lib/typescript/src/extraction/extractTarZst.d.ts.map +1 -0
  151. package/lib/typescript/src/index.d.ts +1 -0
  152. package/lib/typescript/src/index.d.ts.map +1 -1
  153. package/lib/typescript/src/licenses.d.ts +10 -0
  154. package/lib/typescript/src/licenses.d.ts.map +1 -0
  155. package/lib/typescript/src/stt/index.d.ts +4 -1
  156. package/lib/typescript/src/stt/index.d.ts.map +1 -1
  157. package/lib/typescript/src/stt/streaming.d.ts.map +1 -1
  158. package/lib/typescript/src/stt/streamingTypes.d.ts +5 -0
  159. package/lib/typescript/src/stt/streamingTypes.d.ts.map +1 -1
  160. package/lib/typescript/src/stt/types.d.ts +3 -1
  161. package/lib/typescript/src/stt/types.d.ts.map +1 -1
  162. package/lib/typescript/src/tts/index.d.ts +3 -1
  163. package/lib/typescript/src/tts/index.d.ts.map +1 -1
  164. package/lib/typescript/src/tts/streaming.d.ts.map +1 -1
  165. package/lib/typescript/src/tts/types.d.ts +6 -5
  166. package/lib/typescript/src/tts/types.d.ts.map +1 -1
  167. package/lib/typescript/src/utils.d.ts +5 -0
  168. package/lib/typescript/src/utils.d.ts.map +1 -1
  169. package/package.json +6 -1
  170. package/scripts/{check-model-csvs.sh → ci/check-model-csvs.sh} +9 -2
  171. package/scripts/ci/collect_all_sherpa_model_streams.sh +101 -0
  172. package/scripts/ci/collect_one_sherpa_release_stream.sh +189 -0
  173. package/scripts/ci/sherpa_asr_model_release_streams.json +21 -0
  174. package/scripts/ci/sherpa_tts_model_release_streams.json +13 -0
  175. package/scripts/ci/update_model_license_csv.sh +765 -0
  176. package/scripts/setup-ios-framework.sh +14 -11
  177. package/scripts/update_commercial_use.js +73 -0
  178. package/src/NativeSherpaOnnx.ts +36 -5
  179. package/src/audio/index.ts +20 -0
  180. package/src/download/ModelDownloadManager.ts +55 -1343
  181. package/src/download/activeModelOperations.ts +38 -0
  182. package/src/download/background-downloader.d.ts +43 -0
  183. package/src/download/bulkPurge.ts +102 -0
  184. package/src/download/checksumPrompt.ts +25 -0
  185. package/src/download/constants.ts +5 -0
  186. package/src/download/downloadEvents.ts +55 -0
  187. package/src/download/downloadTask.ts +497 -0
  188. package/src/download/ensureModel.ts +124 -0
  189. package/src/download/index.ts +19 -4
  190. package/src/download/localModels.ts +234 -0
  191. package/src/download/modelExtraction.ts +244 -0
  192. package/src/download/paths.ts +134 -0
  193. package/src/download/postDownloadProcessing.ts +292 -0
  194. package/src/download/protectedModelKeys.ts +30 -0
  195. package/src/download/registry.ts +404 -0
  196. package/src/download/retry.ts +76 -0
  197. package/src/download/types.ts +120 -0
  198. package/src/download/validation.ts +114 -8
  199. package/src/{download → extraction}/extractTarBz2.ts +3 -1
  200. package/src/{download → extraction}/extractTarZst.ts +3 -1
  201. package/src/extraction/index.ts +3 -7
  202. package/src/index.tsx +1 -0
  203. package/src/licenses.ts +100 -0
  204. package/src/stt/index.ts +20 -2
  205. package/src/stt/streaming.ts +3 -0
  206. package/src/stt/streamingTypes.ts +5 -0
  207. package/src/stt/types.ts +3 -1
  208. package/src/tts/index.ts +30 -2
  209. package/src/tts/streaming.ts +10 -0
  210. package/src/tts/types.ts +6 -5
  211. package/src/utils.ts +22 -1
  212. package/third_party/sherpa-onnx-prebuilt/ANDROID_RELEASE_TAG +1 -1
  213. package/third_party/sherpa-onnx-prebuilt/IOS_RELEASE_TAG +1 -1
  214. package/android/src/main/cpp/jni/tts/sherpa-onnx-tts-zipvoice-jni.cpp +0 -301
  215. package/android/src/main/java/com/sherpaonnx/ZipvoiceTtsWrapper.kt +0 -187
  216. package/lib/module/download/extractTarBz2.js.map +0 -1
  217. package/lib/module/download/extractTarZst.js.map +0 -1
  218. package/lib/typescript/src/download/extractTarBz2.d.ts.map +0 -1
  219. package/lib/typescript/src/download/extractTarZst.d.ts.map +0 -1
  220. package/scripts/check-qnn-support.sh +0 -78
  221. /package/lib/typescript/src/{download → extraction}/extractTarBz2.d.ts +0 -0
  222. /package/lib/typescript/src/{download → extraction}/extractTarZst.d.ts +0 -0
package/LICENSE CHANGED
@@ -1,6 +1,7 @@
1
1
  MIT License
2
2
 
3
3
  Copyright (c) 2026 XDcobra
4
+
4
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
5
6
  of this software and associated documentation files (the "Software"), to deal
6
7
  in the Software without restriction, including without limitation the rights
package/README.md CHANGED
@@ -48,7 +48,7 @@ No additional setup required. The library automatically handles native dependenc
48
48
 
49
49
  ### iOS
50
50
 
51
- The sherpa-onnx **XCFramework is not shipped in the repo or npm** (size ~80MB). It is **downloaded automatically** when you run `pod install`; no manual steps are required. The version used is pinned in `third_party/sherpa-onnx-prebuilt/IOS_RELEASE_TAG` and the archive is fetched from [GitHub Releases](https://github.com/XDcobra/react-native-sherpa-onnx/releases?q=framework).
51
+ The sherpa-onnx **XCFramework is not shipped in the repo or npm** (size ~80MB). It is **downloaded automatically** when you run `pod install`; no manual steps are required. The version used is pinned in `third_party/sherpa-onnx-prebuilt/IOS_RELEASE_TAG` (format: `sherpa-onnx-ios-vX.Y.Z` or `sherpa-onnx-ios-vX.Y.Z-N` with optional build number) and the archive is fetched from [GitHub Releases](https://github.com/XDcobra/react-native-sherpa-onnx/releases?q=sherpa-onnx-ios).
52
52
 
53
53
  #### Setup
54
54
 
@@ -62,15 +62,31 @@ The podspec runs `scripts/setup-ios-framework.sh`, which downloads the XCFramewo
62
62
 
63
63
  #### Building the iOS framework
64
64
 
65
- To build the sherpa-onnx iOS XCFramework yourself (e.g. custom version or patches), see [third_party/sherpa-onnx-prebuilt/README.md](third_party/sherpa-onnx-prebuilt/README.md) and the [build-sherpa-onnx-ios-framework](.github/workflows/build-sherpa-onnx-ios-framework.yml) workflow.
65
+ To build the sherpa-onnx iOS XCFramework yourself (e.g. custom version or patches), see [third_party/sherpa-onnx-prebuilt/README.md](third_party/sherpa-onnx-prebuilt/README.md) and the [Framework - Sherpa-Onnx (iOS) Release](.github/workflows/framework-sherpa-onnx-ios-framework.yml) workflow.
66
+
67
+ #### Model download (optional)
68
+
69
+ If you use the [download manager](docs/download-manager.md) to fetch models at runtime, add the following to your **AppDelegate** so background downloads can finish when the app is in the background or after it was terminated. Without it, downloads only work reliably while the app is in the foreground.
70
+
71
+ - **Swift (RN 0.77+):** In your bridging header add `#import <RNBackgroundDownloader.h>`. In `AppDelegate.swift`, implement:
72
+ ```swift
73
+ func application(_ application: UIApplication, handleEventsForBackgroundURLSession identifier: String, completionHandler: @escaping () -> Void) {
74
+ RNBackgroundDownloader.setCompletionHandlerWithIdentifier(identifier, completionHandler: completionHandler)
75
+ }
76
+ ```
77
+ - **Objective-C:** In `AppDelegate.m` add `#import <RNBackgroundDownloader.h>` and the `application:handleEventsForBackgroundURLSession:completionHandler:` implementation that calls `[RNBackgroundDownloader setCompletionHandlerWithIdentifier:identifier completionHandler:completionHandler]`.
78
+
79
+ Full step-by-step: [Download manager – Setup (iOS & Android)](docs/download-manager.md#setup-ios--android). Expo users can use the library’s config plugin to apply this automatically.
66
80
 
67
81
  ## Table of contents
68
82
 
83
+ - [Bundled sherpa-onnx version](#bundled-sherpa-onnx-version)
69
84
  - [Installation](#installation)
70
85
  - [Android](#android)
71
86
  - [iOS](#ios)
72
87
  - [Feature Support](#feature-support)
73
88
  - [Platform Support Status](#platform-support-status)
89
+ - [Known issues](#known-issues)
74
90
  - [Supported Model Types](#supported-model-types)
75
91
  - [Speech-to-Text (STT) Models](#speech-to-text-stt-models)
76
92
  - [Text-to-Speech (TTS) Models](#text-to-speech-tts-models)
@@ -86,25 +102,32 @@ To build the sherpa-onnx iOS XCFramework yourself (e.g. custom version or patche
86
102
  - [Contributing](#contributing)
87
103
  - [License](#license)
88
104
 
105
+ ## Bundled sherpa-onnx version
106
+
107
+ | Platform | Version |
108
+ |----------|---------|
109
+ | Android | 1.12.31 |
110
+ | iOS | 1.12.31 |
111
+
89
112
  ## Feature Support
90
113
 
91
- | Feature | Status | Notes |
92
- |---------|--------|-------|
93
- | Offline Speech-to-Text | ✅ **Supported** | No internet required; multiple model types (Zipformer, Paraformer, Whisper, etc.). See [Supported Model Types](#supported-model-types) and [STT documentation](./docs/stt.md). |
94
- | Online (streaming) Speech-to-Text | ✅ **Supported** | Real-time recognition from microphone or stream; partial results, endpoint detection. Use streaming-capable models (e.g. transducer, paraformer). See [Streaming STT](./docs/stt-streaming.md). |
95
- | Live capture API | ✅ **Supported** | Native microphone capture with resampling for live transcription (use with streaming STT). See [PCM Live Stream](./docs/pcm-live-stream.md). |
96
- | Text-to-Speech | ✅ **Supported** | Multiple model types (VITS, Matcha, Kokoro, etc.). See [Supported Model Types](#supported-model-types) and [TTS documentation](./docs/tts.md). |
97
- | Streaming Text-to-Speech | ✅ **Supported** | Incremental speech generation for low time-to-first-byte and playback while generating. See [Streaming TTS](./docs/tts-streaming.md). |
98
- | Execution providers (CPU, NNAPI, XNNPACK, Core ML, QNN) | ✅ **Supported** | See [Execution provider support](./docs/execution-providers.md). |
99
- | Play Asset Delivery (PAD) | ✅ **Supported** | Android only. See [Model Setup](./docs/model-setup.md) & [Extraction API](./docs/extraction.md). |
100
- | Automatic Model type detection | ✅ **Supported** | `detectSttModel()` and `detectTtsModel()` for a path. See [Model Setup: Model type detection](./docs/model-setup.md#model-detection). |
101
- | Model quantization | ✅ **Supported** | Automatic detection and preference for quantized (int8) models. |
102
- | Flexible model loading | ✅ **Supported** | Asset models, file system models, or auto-detection. |
103
- | TypeScript | ✅ **Supported** | Full type definitions included. |
104
- | Speaker Diarization | ❌ Not yet supported | Scheduled for release 0.4.0 |
105
- | Speech Enhancement | ❌ Not yet supported | Scheduled for release 0.5.0 |
106
- | Source Separation | ❌ Not yet supported | Scheduled for release 0.6.0 |
107
- | VAD (Voice Activity Detection) | ❌ Not yet supported | Scheduled for release 0.7.0 |
114
+ | Feature | Status | Docs | Notes |
115
+ |---------|--------|------|-------|
116
+ | Offline Speech-to-Text | ✅ **Supported** | [STT](./docs/stt.md) | No internet required; multiple model types (Zipformer, Paraformer, Whisper, etc.). See [Supported Model Types](#supported-model-types). |
117
+ | Online (streaming) Speech-to-Text | ✅ **Supported** | [Streaming STT](./docs/stt-streaming.md) | Real-time recognition from microphone or stream; partial results, endpoint detection. Use streaming-capable models (e.g. transducer, paraformer). |
118
+ | Live capture API | ✅ **Supported** | [PCM live stream](./docs/pcm-live-stream.md) | Native microphone capture with resampling for live transcription (use with streaming STT). |
119
+ | Text-to-Speech | ✅ **Supported** | [TTS](./docs/tts.md) | Multiple model types (VITS, Matcha, Kokoro, etc.). See [Supported Model Types](#supported-model-types). |
120
+ | Streaming Text-to-Speech | ✅ **Supported** | [Streaming TTS](./docs/tts-streaming.md) | Incremental speech generation for low time-to-first-byte and playback while generating. |
121
+ | Execution providers (CPU, NNAPI, XNNPACK, Core ML, QNN) | ✅ **Supported** | [Execution providers](./docs/execution-providers.md) | CPU default; optional accelerators per platform. |
122
+ | Play Asset Delivery (PAD) | ✅ **Supported** | [Model setup](./docs/model-setup.md) | Android only. Archives: [Extraction API](./docs/extraction.md). |
123
+ | Automatic Model type detection | ✅ **Supported** | [Model detection](./docs/model-setup.md#model-detection) | `detectSttModel()` and `detectTtsModel()` for a path. |
124
+ | Model quantization | ✅ **Supported** | [Model setup](./docs/model-setup.md) | Automatic detection and preference for quantized (int8) models. |
125
+ | Flexible model loading | ✅ **Supported** | [Model setup](./docs/model-setup.md) | Asset models, file system models, or auto-detection. |
126
+ | TypeScript | ✅ **Supported** | — | Full type definitions included. |
127
+ | Speaker Diarization | ❌ Not yet supported | [Diarization](./docs/diarization.md) | Scheduled for release 0.4.0 |
128
+ | Speech Enhancement | ❌ Not yet supported | [Enhancement](./docs/enhancement.md) | Scheduled for release 0.5.0 |
129
+ | Source Separation | ❌ Not yet supported | [Separation](./docs/separation.md) | Scheduled for release 0.6.0 |
130
+ | VAD (Voice Activity Detection) | ❌ Not yet supported | [VAD](./docs/vad.md) | Scheduled for release 0.7.0 |
108
131
 
109
132
  ## Platform Support Status
110
133
 
@@ -113,6 +136,10 @@ To build the sherpa-onnx iOS XCFramework yourself (e.g. custom version or patche
113
136
  | **Android** | ✅ **Production Ready** | CI/CD automated, multiple models supported |
114
137
  | **iOS** | ✅ **Production Ready** | CI/CD automated, multiple models supported |
115
138
 
139
+ ## Known issues
140
+
141
+ - **[Pocket TTS (voice cloning)](docs/KNOWN_ISSUES.md)** — voice cloning: **Android** supported; **iOS** experimental. Heuristic EOS and **iOS vs Android drift** (length/quality); not a React Native–only issue. Full notes: [investigation doc](docs/github-issue-pocket-tts-eos-frame-zero.md).
142
+
116
143
  ## Supported Model Types
117
144
 
118
145
  ### Speech-to-Text (STT) Models
@@ -147,13 +174,14 @@ For **real-time (streaming) recognition** from a microphone or audio stream, use
147
174
  | **Matcha** | `'matcha'` | High-quality acoustic model + vocoder. Detected by acoustic_model + vocoder; no folder token required. | [Download](https://k2-fsa.github.io/sherpa/onnx/tts/pretrained_models/matcha.html) |
148
175
  | **Kokoro** | `'kokoro'` | Multi-speaker, multi-language. Folder name should contain **kokoro** (not kitten) for auto-detection. | [Download](https://github.com/k2-fsa/sherpa-onnx/releases/tag/tts-models) |
149
176
  | **KittenTTS** | `'kitten'` | Lightweight, multi-speaker. Folder name should contain **kitten** (not kokoro) for auto-detection. | [Download](https://github.com/k2-fsa/sherpa-onnx/releases/tag/tts-models) |
150
- | **Zipvoice** | `'zipvoice'` | Voice cloning (encoder + decoder + vocoder). Detected by file layout; folder token optional. | [Download](https://k2-fsa.github.io/sherpa/onnx/tts/pretrained_models/zipvoice.html) |
151
- | **Pocket** | `'pocket'` | Flow-matching TTS. Detected by lm_flow, lm_main, text_conditioner, vocab/token_scores; no folder token required. | [Download](https://github.com/k2-fsa/sherpa-onnx/releases/tag/tts-models) |
177
+ | **Zipvoice** | `'zipvoice'` | Standard TTS with **`sid`**. **Voice cloning** (reference audio + `referenceText`): batch via **`generateSpeech`** only—streaming TTS does not support reference audio for Zipvoice. Default **`numSteps`** when omitted is **5** on **Android and iOS** (matches sherpa-onnx `GenerationConfig` / Kotlin helper). Cloning is **supported on Android & iOS**. Encoder + decoder + vocoder. | [Download](https://k2-fsa.github.io/sherpa/onnx/tts/pretrained_models/zipvoice.html) |
178
+ | **Pocket** | `'pocket'` | Flow-matching TTS. **Voice cloning** on **Android:** batch and streaming TTS. **iOS:** cloning is experimental. Detected by lm_flow, lm_main, text_conditioner, vocab/token_scores. | [Download](https://github.com/k2-fsa/sherpa-onnx/releases/tag/tts-models) |
152
179
 
153
180
  For **streaming TTS** (incremental generation, low latency), use `createStreamingTTS()` with supported model types. See [Streaming Text-to-Speech](./docs/tts-streaming.md).
154
181
 
155
182
  ## Documentation
156
183
 
184
+ - [Known issues](./docs/KNOWN_ISSUES.md) – SDK-facing notes (e.g. Pocket TTS cloning / cross-platform behavior)
157
185
  - [Speech-to-Text (STT)](./docs/stt.md) – Offline transcription (file or samples)
158
186
  - [Streaming (Online) Speech-to-Text](./docs/stt-streaming.md) – Real-time recognition, partial results, endpoint detection
159
187
  - [PCM Live Stream](./docs/pcm-live-stream.md) – Native microphone capture with resampling for live transcription (use with streaming STT)
@@ -248,6 +276,46 @@ This app showcases how to integrate `react-native-sherpa-onnx` into a real-world
248
276
 
249
277
  MIT
250
278
 
279
+ ## Third-Party Libraries
280
+
281
+ This SDK includes the following open source components:
282
+
283
+ - [sherpa-onnx (Apache License 2.0)](/THIRD_PARTY_LICENSES/sherpa-onnx.txt): https://github.com/k2-fsa/sherpa-onnx
284
+
285
+ - [ONNX Runtime (MIT License)](/THIRD_PARTY_LICENSES/onnxruntime.txt): https://github.com/microsoft/onnxruntime
286
+
287
+ - [FFmpeg (LGPL v2.1)](/THIRD_PARTY_LICENSES/ffmpeg.txt): https://ffmpeg.org
288
+
289
+ - [Shine MP3 Encoder (LGPL)](/THIRD_PARTY_LICENSES/shine.txt): https://github.com/toots/shine
290
+
291
+ - [Opus Codec (BSD License)](/THIRD_PARTY_LICENSES/opus.txt): https://opus-codec.org
292
+
293
+ - [Zstandard (zstd) (BSD License)](/THIRD_PARTY_LICENSES/zstd.txt): https://github.com/facebook/zstd
294
+
295
+ - [libarchive (BSD License)](/THIRD_PARTY_LICENSES/libarchive.txt): https://github.com/libarchive/libarchive
296
+
297
+ Full license texts are available in the [THIRD_PARTY_LICENSES](/THIRD_PARTY_LICENSES/) directory.
298
+
299
+ ### LGPL Notice
300
+
301
+ This SDK includes LGPL-licensed components such as FFmpeg and Shine.
302
+ Applications using this SDK must ensure compliance with LGPL requirements when distributing binaries.
303
+
304
+ FFmpeg source code can be obtained at: https://ffmpeg.org
305
+
306
+ ### Qualcomm QNN Support
307
+
308
+ This SDK supports optional integration with Qualcomm AI Runtime (QNN).
309
+
310
+ QNN is proprietary software provided by Qualcomm and is not included in this SDK.
311
+ To use QNN acceleration, users must obtain and include the required QNN libraries separately and comply with Qualcomm's license terms:
312
+
313
+ https://softwarecenter.qualcomm.com/
314
+
315
+ ### Responsibility
316
+
317
+ By using this SDK, you are responsible for complying with all third-party licenses included in this project.
318
+
251
319
  ---
252
320
 
253
321
  Made with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)
@@ -139,5 +139,8 @@ Pod::Spec.new do |s|
139
139
 
140
140
  s.libraries = "c++", "z", "iconv", "bz2"
141
141
 
142
+ # Per-release-model license metadata (synced from CI; same CSV as android/src/main/assets/model_licenses/).
143
+ s.resources = ["ios/Resources/model_licenses/*.csv"]
144
+
142
145
  install_modules_dependencies(s)
143
146
  end
@@ -0,0 +1,62 @@
1
+ # Third-party license texts
2
+
3
+ This directory contains **full license texts** for libraries shipped with this module (e.g. sherpa-onnx, ONNX Runtime, FFmpeg). See the repository [README](../README.md#third-party-libraries) for links.
4
+
5
+ ## Prebuilt model release assets (per-model metadata)
6
+
7
+ **Model-specific license status** (which release `.tar.bz2` / asset has which `license_type`, `commercial_use`, provenance URL, etc.) is **not** stored here.
8
+
9
+ It is maintained as CSV and **bundled with the native library** so apps can ship it without extra Metro assets:
10
+
11
+ | Platform | Path (in this repo) |
12
+ |----------|---------------------|
13
+ | **Android** | [`android/src/main/assets/model_licenses/`](../android/src/main/assets/model_licenses/) |
14
+ | **iOS** | [`ios/Resources/model_licenses/`](../ios/Resources/model_licenses/) |
15
+
16
+ Files:
17
+
18
+ - `asr-models-license-status.csv` — ASR / STT release models
19
+ - `tts-models-license-status.csv` — TTS release models
20
+
21
+ Columns: `asset_name`, `license_type`, `commercial_use`, `confidence`, `detection_source`, `license_file`.
22
+
23
+ Set `detection_source` to `manual` for rows you maintain by hand; `scripts/ci/update_model_license_csv.sh` **never** re-scans or overwrites those assets (clear `manual` if you want automation to run again).
24
+
25
+ CI updates these CSVs via `scripts/ci/update_model_license_csv.sh`, which writes the primary file passed with `--csv` and **syncs the same content** to both Android and iOS paths above.
26
+
27
+ **Not legal advice** — consumers should verify licenses for their use case.
28
+
29
+ ## License Types & Commercial Use
30
+
31
+ The following table explains the `license_type` and `commercial_use` values used in the CSV metadata.
32
+
33
+ | License Type | Commercial Use | Notes | Reference |
34
+ | :--- | :--- | :--- | :--- |
35
+ | **agpl-3.0** | `conditional` | Strong copyleft; requires source code disclosure if the model is used over a network. | [GNU AGPL v3](https://opensource.org/license/agpl-v3/) |
36
+ | **apache-2.0** | `yes` | Permissive license; allows commercial use, modification, and redistribution. | [Apache 2.0](https://opensource.org/license/apache-2-0/) |
37
+ | **bsd-3-clause** | `yes` | Permissive license; similar to MIT but includes a non-endorsement clause. | [BSD 3-Clause](https://opensource.org/license/bsd-3-clause/) |
38
+ | **cc-by** | `yes` | Attribution required; allows commercial use. | [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) |
39
+ | **cc-by-3.0** | `yes` | Attribution required; allows commercial use. | [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/) |
40
+ | **cc-by-4.0** | `yes` | Attribution required; allows commercial use. | [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) |
41
+ | **cc-by-nc-4.0** | `no` | **Non-Commercial** use only. | [CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/) |
42
+ | **cc-by-nc-nd-4.0** | `no` | **Non-Commercial** and no derivatives/modifications allowed. | [CC BY-NC-ND 4.0](https://creativecommons.org/licenses/by-nc-nd/4.0/) |
43
+ | **cc-by-nc-sa-4.0** | `no` | **Non-Commercial** and Share-Alike (derivatives must be under the same license). | [CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/) |
44
+ | **cc-by-sa** | `conditional` | Share-Alike; commercial use allowed, but any derivative must be under the same license. | [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/) |
45
+ | **cc-by-sa-3.0-es** | `conditional` | Share-Alike (Spain jurisdiction). | [CC BY-SA 3.0 ES](https://creativecommons.org/licenses/by-sa/3.0/es/) |
46
+ | **cc-by-sa-4.0** | `conditional` | Share-Alike; commercial use allowed, but any derivative must be under the same license. | [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/) |
47
+ | **cc0** | `yes` | Public domain; no restrictions on use. | [CC0 1.0](https://creativecommons.org/publicdomain/zero/1.0/) |
48
+ | **gpl-2.0** | `conditional` | Copyleft; requires sharing the source code of any derivative works. | [GNU GPL v2](https://opensource.org/license/gpl-2-0/) |
49
+ | **mit** | `yes` | Highly permissive; allows commercial use with simple attribution. | [MIT](https://opensource.org/license/mit/) |
50
+ | **ngc-terms-of-use** | `restricted` | NVIDIA NGC Terms; often restricts redistribution or specific commercial weight use. | [Terms](https://ngc.nvidia.com/legal/terms) |
51
+ | **no-license** | `no` | No explicit permission granted; all rights reserved by the author. | N/A |
52
+ | **nvidia-open-model-license** | `yes` | Allows commercial use under specific conditions (e.g. no benchmarking). | [License](https://www.nvidia.com/en-us/agreements/enterprise-software/nvidia-open-model-license/) |
53
+ | **proprietary-restricted** | `no` | Closed or custom license with significant restrictions. | N/A |
54
+ | **public-domain** | `yes` | Free for any use; no copyright protection. | N/A |
55
+ | **research-only** | `no` | Limited strictly to non-commercial research and evaluation. | N/A |
56
+ | **unlicense** | `yes` | Public domain equivalent; no restrictions. | [Unlicense](https://unlicense.org/) |
57
+
58
+ ### Commercial Use Status Definitions:
59
+ - **`yes`**: Allowed for commercial purposes with minimal restrictions (permissive).
60
+ - **`no`**: Explicitly forbidden for commercial purposes.
61
+ - **`conditional`**: Allowed, but requires adherence to specific distribution/license conditions (e.g. copyleft).
62
+ - **`restricted`**: Limited use or redistribution permitted; requires careful legal review.