react-native-davoice 1.0.6 → 1.0.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.
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.190" # 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 .
|
|
@@ -497,8 +497,8 @@ RCT_EXPORT_METHOD(unPauseSpeechRecognitionLite:(nonnull NSNumber *)times
|
|
|
497
497
|
if (callback) callback(@[@(YES)]);
|
|
498
498
|
}
|
|
499
499
|
|
|
500
|
-
RCT_EXPORT_METHOD(
|
|
501
|
-
|
|
500
|
+
RCT_EXPORT_METHOD(unPauseSpeechRecognitionLiteWithPreFetch:(nonnull NSNumber *)times
|
|
501
|
+
preFetchMs:(nonnull NSNumber *)preFetch
|
|
502
502
|
callback:(RCTResponseSenderBlock)callback)
|
|
503
503
|
{
|
|
504
504
|
// No-op if STT isn't initialized yet (avoid JS error spam).
|
package/package.json
CHANGED
package/speech/index.ts
CHANGED
|
@@ -567,10 +567,15 @@ class Speech {
|
|
|
567
567
|
if (Platform.OS === 'ios') {
|
|
568
568
|
return new Promise((resolve, reject) => {
|
|
569
569
|
try {
|
|
570
|
-
|
|
570
|
+
const done = (ok: boolean) => {
|
|
571
571
|
if (!ok) dbgErr('unPauseSpeechRecognitionLite(times) returned false');
|
|
572
572
|
resolve();
|
|
573
|
-
}
|
|
573
|
+
};
|
|
574
|
+
if (preFetchMs > 0 && typeof mod?.unPauseSpeechRecognitionLiteWithPreFetch === 'function') {
|
|
575
|
+
mod.unPauseSpeechRecognitionLiteWithPreFetch(times, preFetchMs, done);
|
|
576
|
+
return;
|
|
577
|
+
}
|
|
578
|
+
fn.call(mod, times, done);
|
|
574
579
|
} catch (e) {
|
|
575
580
|
reject(e as any);
|
|
576
581
|
}
|