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.
- package/TTSRNBridge.podspec +1 -1
- package/package.json +1 -1
- package/speech/index.ts +4 -3
package/TTSRNBridge.podspec
CHANGED
|
@@ -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.
|
|
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
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
|
|
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
|
});
|