react-native-davoice-tts 1.0.309 → 1.0.310

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.182" # Update to your package version
5
+ s.version = "1.0.183" # 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.309",
3
+ "version": "1.0.310",
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
@@ -982,7 +982,7 @@ class Speech {
982
982
 
983
983
  // iOS unified: subscribe once on the unified emitter
984
984
  if (Platform.OS === 'ios' && this.unifiedEmitter) {
985
- const map: Record<NativeEventName, (...args: any[]) => void> = {
985
+ const map: Partial<Record<NativeEventName, (...args: any[]) => void>> = {
986
986
  onSpeechStart: (e) => this.handlers.onSpeechStart(e),
987
987
  onSpeechRecognized: (e) => this.handlers.onSpeechRecognized(e),
988
988
  onSpeechEnd: (e) => this.handlers.onSpeechEnd(e),
@@ -990,12 +990,13 @@ class Speech {
990
990
  onSpeechResults: (e) => this.handlers.onSpeechResults(e),
991
991
  onSpeechPartialResults: (e) => this.handlers.onSpeechPartialResults(e),
992
992
  onSpeechVolumeChanged: (e) => this.handlers.onSpeechVolumeChanged(e),
993
- onNewSpeechWAV: (e) => this.handlers.onNewSpeechWAV(e),
994
993
  onFinishedSpeaking: () => this._onNativeFinishedSpeaking(),
995
994
  };
996
995
  (Object.keys(map) as NativeEventName[]).forEach((name) => {
997
996
  try {
998
- const sub = this.unifiedEmitter!.addListener(name, map[name]);
997
+ const handler = map[name];
998
+ if (!handler) return;
999
+ const sub = this.unifiedEmitter!.addListener(name, handler);
999
1000
  this.subs.push(sub);
1000
1001
  } catch {}
1001
1002
  });