react-native-davoice-tts 1.0.224 → 1.0.226

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.
@@ -2,7 +2,7 @@ require 'json'
2
2
 
3
3
  Pod::Spec.new do |s|
4
4
  s.name = "TTSRNBridge"
5
- s.version = "1.0.97" # Update to your package version
5
+ s.version = "1.0.99" # Update to your package version
6
6
  s.summary = "TTS for React Native."
7
7
  s.description = <<-DESC
8
8
  A React Native module for tts .
@@ -1 +1 @@
1
- 42c267a5b4662b699c6c308fcfc2fba6 tts-1.0.0.aar
1
+ 72b3217dfc1eb81c901841c86368d267 tts-1.0.0.aar
@@ -1 +1 @@
1
- 8f051f8e1bd46e4272db8ee5f2081f6115fa6dd6 tts-1.0.0.aar
1
+ 93deba4e15bd45241f1b74f652bb854b13161b87 tts-1.0.0.aar
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-davoice-tts",
3
- "version": "1.0.224",
3
+ "version": "1.0.226",
4
4
  "description": "tts library for React Native",
5
5
  "main": "tts/index.js",
6
6
  "types": "tts/index.d.ts",
package/speech/index.ts CHANGED
@@ -135,7 +135,7 @@ private rewireListenersForMode() {
135
135
  * ANDROID ONLY: Initialize remote capture (MIC + VAD) that saves utterances to WAV
136
136
  * and emits 'onNewSpeechWAV' with { path }. No-op on iOS (throws).
137
137
  */
138
- async initAllRemoteSTT(): Promise<void> {
138
+ async initAllRemoteSTT(model: string): Promise<void> {
139
139
  if (Platform.OS !== 'android') {
140
140
  throw new Error('initAllRemoteSTT is Android-only.');
141
141
  }
@@ -150,6 +150,14 @@ private rewireListenersForMode() {
150
150
  reject(e as any);
151
151
  }
152
152
  });
153
+ // Fallback (Android or iOS w/o SpeechBridge):
154
+ // 1) Start STT (engine hot will happen internally); 2) init TTS.
155
+ if (!NativeSTT || !NativeTTS) {
156
+ throw new Error('Missing native bridges (STT/TTS).');
157
+ }
158
+ // Init TTS
159
+ await NativeTTS.initTTS({ model: model });
160
+
153
161
  }
154
162
 
155
163