react-native-davoice-tts 1.0.269 → 1.0.270

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.142" # Update to your package version
5
+ s.version = "1.0.143" # 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 .
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-davoice-tts",
3
- "version": "1.0.269",
3
+ "version": "1.0.270",
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
@@ -290,6 +290,9 @@ class Speech {
290
290
  */
291
291
  async initAll(opts: { locale: string; model: ModelRef; timeoutMs?: number }) {
292
292
  this.dbgModel('initAll.opts.model (raw)', opts.model);
293
+ this._cancelTtsWait('initAll');
294
+ this.ttsChain = Promise.resolve();
295
+ this.wavChain = Promise.resolve();
293
296
 
294
297
  const modelPath = this.resolveModelToPath(opts.model);
295
298
  console.log('[MODELDBG] initAll.modelPath (resolved)=', modelPath);
@@ -350,6 +353,10 @@ class Speech {
350
353
  }
351
354
 
352
355
  async destroyAll() {
356
+ this._cancelTtsWait('destroyAll');
357
+ this.ttsChain = Promise.resolve();
358
+ this.wavChain = Promise.resolve();
359
+
353
360
  // iOS unified
354
361
  if (Platform.OS === 'ios' && NativeSpeech?.destroyAll) {
355
362
  const r = await NativeSpeech.destroyAll();