react-native-davoice 1.0.7 → 1.0.9
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/android/libs/com/davoice/tts/1.0.0/tts-1.0.0.aar +0 -0
- package/android/libs/com/davoice/tts/1.0.0/tts-1.0.0.aar.md5 +1 -1
- package/android/libs/com/davoice/tts/1.0.0/tts-1.0.0.aar.sha1 +1 -1
- package/android/src/main/java/com/davoice/stt/rn/STTModule.kt +13 -0
- package/ios/SpeechBridge/SpeechBridge.m +24 -2
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/DavoiceTTS +0 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.abi.json +6250 -6250
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.private.swiftinterface +42 -42
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.swiftinterface +42 -42
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/DavoiceTTS +0 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.abi.json +6905 -6905
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +43 -43
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftinterface +43 -43
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.abi.json +6905 -6905
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +43 -43
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +43 -43
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/_CodeSignature/CodeDirectory +0 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/_CodeSignature/CodeRequirements-1 +0 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/_CodeSignature/CodeResources +24 -24
- package/package.json +1 -1
- package/speech/index.ts +12 -2
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.192" # 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 .
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
4dcec1844fb7ccbbe7cc17176ace80ef tts-1.0.0.aar
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
f077da0fe66163982b6bd9114e106f015fbdb95e tts-1.0.0.aar
|
|
@@ -138,6 +138,19 @@ class STTModule(private val rc: ReactApplicationContext)
|
|
|
138
138
|
cb.invoke(true)
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
+
@ReactMethod
|
|
142
|
+
fun unPauseSpeechRecognitionLiteWithPreFetch(times: Double, preFetchMs: Double, cb: Callback) {
|
|
143
|
+
if (stt == null) {
|
|
144
|
+
cb.invoke(true)
|
|
145
|
+
return
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
val t = times.toInt()
|
|
149
|
+
val ms = preFetchMs.toInt().coerceIn(0, 2000)
|
|
150
|
+
stt?.unPauseSpeechRecognitionLite(t, ms)
|
|
151
|
+
cb.invoke(true)
|
|
152
|
+
}
|
|
153
|
+
|
|
141
154
|
@ReactMethod
|
|
142
155
|
fun pauseMicrophone(cb: Callback) {
|
|
143
156
|
ensure().pauseMicrophone()
|
|
@@ -25,6 +25,14 @@ static BOOL SBHasSpeechRecognitionPermission(void) {
|
|
|
25
25
|
return status == SFSpeechRecognizerAuthorizationStatusAuthorized;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
static void SBLog(NSString *format, ...) {
|
|
29
|
+
va_list args;
|
|
30
|
+
va_start(args, format);
|
|
31
|
+
NSString *msg = [[NSString alloc] initWithFormat:format arguments:args];
|
|
32
|
+
va_end(args);
|
|
33
|
+
NSLog(@"[SpeechBridge] %@", msg);
|
|
34
|
+
}
|
|
35
|
+
|
|
28
36
|
// Make a mono Float32 AVAudioPCMBuffer from raw PCM payload (i16 or f32).
|
|
29
37
|
// We accept either interleaved or non-interleaved input and mixdown to mono
|
|
30
38
|
// (DaVoiceTTS.playBuffer will resample / normalize as needed).
|
|
@@ -491,20 +499,34 @@ RCT_EXPORT_METHOD(pauseSpeechRecognitionLite:(RCTResponseSenderBlock)callback)
|
|
|
491
499
|
RCT_EXPORT_METHOD(unPauseSpeechRecognitionLite:(nonnull NSNumber *)times
|
|
492
500
|
callback:(RCTResponseSenderBlock)callback)
|
|
493
501
|
{
|
|
502
|
+
SBLog(@"unPauseSpeechRecognitionLite ENTER times=%@", times);
|
|
494
503
|
// No-op if STT isn't initialized yet (avoid JS error spam).
|
|
495
|
-
if (!self.stt) {
|
|
504
|
+
if (!self.stt) {
|
|
505
|
+
SBLog(@"unPauseSpeechRecognitionLite EXIT no STT instance");
|
|
506
|
+
if (callback) callback(@[@(YES)]);
|
|
507
|
+
return;
|
|
508
|
+
}
|
|
496
509
|
[self.stt unPauseSpeechRecognitionLite:times];
|
|
510
|
+
SBLog(@"unPauseSpeechRecognitionLite AFTER Swift call times=%@", times);
|
|
497
511
|
if (callback) callback(@[@(YES)]);
|
|
512
|
+
SBLog(@"unPauseSpeechRecognitionLite CALLBACK fired times=%@", times);
|
|
498
513
|
}
|
|
499
514
|
|
|
500
515
|
RCT_EXPORT_METHOD(unPauseSpeechRecognitionLiteWithPreFetch:(nonnull NSNumber *)times
|
|
501
516
|
preFetchMs:(nonnull NSNumber *)preFetch
|
|
502
517
|
callback:(RCTResponseSenderBlock)callback)
|
|
503
518
|
{
|
|
519
|
+
SBLog(@"unPauseSpeechRecognitionLiteWithPreFetch ENTER times=%@ preFetchMs=%@", times, preFetch);
|
|
504
520
|
// No-op if STT isn't initialized yet (avoid JS error spam).
|
|
505
|
-
if (!self.stt) {
|
|
521
|
+
if (!self.stt) {
|
|
522
|
+
SBLog(@"unPauseSpeechRecognitionLiteWithPreFetch EXIT no STT instance");
|
|
523
|
+
if (callback) callback(@[@(YES)]);
|
|
524
|
+
return;
|
|
525
|
+
}
|
|
506
526
|
[self.stt unPauseSpeechRecognitionLite:times preFetch:preFetch];
|
|
527
|
+
SBLog(@"unPauseSpeechRecognitionLiteWithPreFetch AFTER Swift call times=%@ preFetchMs=%@", times, preFetch);
|
|
507
528
|
if (callback) callback(@[@(YES)]);
|
|
529
|
+
SBLog(@"unPauseSpeechRecognitionLiteWithPreFetch CALLBACK fired times=%@ preFetchMs=%@", times, preFetch);
|
|
508
530
|
}
|
|
509
531
|
|
|
510
532
|
// Promise-based pause that resolves ONLY when iOS is actually settled in playback (mic released)
|