react-native-davoice-tts 1.0.319 → 1.0.321
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/ios/SpeechBridge/SpeechBridge.m +71 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/DavoiceTTS +0 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Headers/DavoiceTTS-Swift.h +3 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.abi.json +428 -219
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.private.swiftinterface +3 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.swiftinterface +3 -0
- 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/Headers/DavoiceTTS-Swift.h +6 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.abi.json +630 -421
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +8 -5
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftinterface +8 -5
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.abi.json +630 -421
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +8 -5
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +8 -5
- 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 +27 -27
- package/package.json +1 -1
- package/speech/index.ts +60 -13
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.203" # 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 .
|
|
@@ -527,6 +527,26 @@ RCT_EXPORT_METHOD(pauseSpeechRecognitionLite:(RCTResponseSenderBlock)callback)
|
|
|
527
527
|
if (callback) callback(@[@(YES)]);
|
|
528
528
|
}
|
|
529
529
|
|
|
530
|
+
RCT_EXPORT_METHOD(pauseSpeechRecognitionLiteAsync:(nonnull NSNumber *)timeoutMs
|
|
531
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
|
532
|
+
rejecter:(RCTPromiseRejectBlock)reject)
|
|
533
|
+
{
|
|
534
|
+
if (!self.stt) { resolve(@{@"ok": @(YES), @"reason": @""}); return; }
|
|
535
|
+
|
|
536
|
+
NSNumber *t = timeoutMs ?: @(1500);
|
|
537
|
+
if (t.doubleValue <= 0) t = @(1500);
|
|
538
|
+
|
|
539
|
+
if ([(id)self.stt respondsToSelector:@selector(pauseSpeechRecognitionLiteAndWait:completion:)]) {
|
|
540
|
+
[(id)self.stt pauseSpeechRecognitionLiteAndWait:t completion:^(BOOL ok, NSString * _Nullable reason) {
|
|
541
|
+
resolve(@{@"ok": @(ok), @"reason": reason ?: @""});
|
|
542
|
+
}];
|
|
543
|
+
return;
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
[self.stt pauseSpeechRecognitionLite];
|
|
547
|
+
resolve(@{@"ok": @(YES), @"reason": @"bridge_fallback_no_wait_method"});
|
|
548
|
+
}
|
|
549
|
+
|
|
530
550
|
RCT_EXPORT_METHOD(unPauseSpeechRecognitionLite:(nonnull NSNumber *)times
|
|
531
551
|
callback:(RCTResponseSenderBlock)callback)
|
|
532
552
|
{
|
|
@@ -536,6 +556,43 @@ RCT_EXPORT_METHOD(unPauseSpeechRecognitionLite:(nonnull NSNumber *)times
|
|
|
536
556
|
if (callback) callback(@[@(YES)]);
|
|
537
557
|
}
|
|
538
558
|
|
|
559
|
+
RCT_EXPORT_METHOD(unPauseSpeechRecognitionLiteWithPreFetch:(nonnull NSNumber *)times
|
|
560
|
+
preFetchMs:(nonnull NSNumber *)preFetch
|
|
561
|
+
callback:(RCTResponseSenderBlock)callback)
|
|
562
|
+
{
|
|
563
|
+
// No-op if STT isn't initialized yet (avoid JS error spam).
|
|
564
|
+
if (!self.stt) { if (callback) callback(@[@(YES)]); return; }
|
|
565
|
+
[self.stt unPauseSpeechRecognitionLite:times preFetch:preFetch];
|
|
566
|
+
if (callback) callback(@[@(YES)]);
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
RCT_EXPORT_METHOD(unPauseSpeechRecognitionLiteAsync:(nonnull NSNumber *)times
|
|
570
|
+
preFetchMs:(nonnull NSNumber *)preFetch
|
|
571
|
+
timeoutMs:(nonnull NSNumber *)timeoutMs
|
|
572
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
|
573
|
+
rejecter:(RCTPromiseRejectBlock)reject)
|
|
574
|
+
{
|
|
575
|
+
if (!self.stt) { resolve(@{@"ok": @(YES), @"reason": @""}); return; }
|
|
576
|
+
|
|
577
|
+
NSNumber *t = timeoutMs ?: @(2500);
|
|
578
|
+
if (t.doubleValue <= 0) t = @(2500);
|
|
579
|
+
NSNumber *pf = preFetch ?: @(0);
|
|
580
|
+
if (pf.doubleValue < 0) pf = @(0);
|
|
581
|
+
|
|
582
|
+
if ([(id)self.stt respondsToSelector:@selector(unPauseSpeechRecognitionLiteAndWait:preFetch:timeoutMs:completion:)]) {
|
|
583
|
+
[(id)self.stt unPauseSpeechRecognitionLiteAndWait:times
|
|
584
|
+
preFetch:pf
|
|
585
|
+
timeoutMs:t
|
|
586
|
+
completion:^(BOOL ok, NSString * _Nullable reason) {
|
|
587
|
+
resolve(@{@"ok": @(ok), @"reason": reason ?: @""});
|
|
588
|
+
}];
|
|
589
|
+
return;
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
[self.stt unPauseSpeechRecognitionLite:times preFetch:pf];
|
|
593
|
+
resolve(@{@"ok": @(YES), @"reason": @"bridge_fallback_no_wait_method"});
|
|
594
|
+
}
|
|
595
|
+
|
|
539
596
|
// Promise-based pause that resolves ONLY when iOS is actually settled in playback (mic released)
|
|
540
597
|
RCT_EXPORT_METHOD(pauseMicrophoneAsync:(nonnull NSNumber *)timeoutMs
|
|
541
598
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
@@ -701,6 +758,20 @@ RCT_EXPORT_METHOD(isRecognizing:(RCTResponseSenderBlock)callback)
|
|
|
701
758
|
if (callback) callback(@[@(running ? 1 : 0)]);
|
|
702
759
|
}
|
|
703
760
|
|
|
761
|
+
RCT_EXPORT_METHOD(setAECEnabled:(BOOL)enabled
|
|
762
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
|
763
|
+
rejecter:(RCTPromiseRejectBlock)reject)
|
|
764
|
+
{
|
|
765
|
+
[self ensureSTT];
|
|
766
|
+
if (!self.stt) {
|
|
767
|
+
reject(@"no_stt", @"Call initAll first", nil);
|
|
768
|
+
return;
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
[self.stt setAECEnabled:enabled];
|
|
772
|
+
resolve(@(YES));
|
|
773
|
+
}
|
|
774
|
+
|
|
704
775
|
RCT_EXPORT_METHOD(speak:(NSString *)text
|
|
705
776
|
speakerId:(nonnull NSNumber *)speakerId
|
|
706
777
|
speed:(nonnull NSNumber *)speed
|
|
Binary file
|
|
@@ -361,7 +361,10 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSArray<NSStri
|
|
|
361
361
|
+ (NSArray<NSString *> * _Nonnull)supportedEvents SWIFT_WARN_UNUSED_RESULT;
|
|
362
362
|
- (BOOL)setLicenseWithLicenseKey:(NSString * _Nonnull)licenseKey SWIFT_WARN_UNUSED_RESULT;
|
|
363
363
|
- (void)pauseSpeechRecognitionLite;
|
|
364
|
+
- (void)pauseSpeechRecognitionLiteAndWait:(NSNumber * _Nonnull)timeoutMs completion:(void (^ _Nonnull)(BOOL, NSString * _Nullable))completion;
|
|
364
365
|
- (void)unPauseSpeechRecognitionLite:(NSNumber * _Nonnull)times;
|
|
366
|
+
- (void)unPauseSpeechRecognitionLite:(NSNumber * _Nonnull)times preFetch:(NSNumber * _Nonnull)preFetch;
|
|
367
|
+
- (void)unPauseSpeechRecognitionLiteAndWait:(NSNumber * _Nonnull)times preFetch:(NSNumber * _Nonnull)preFetch timeoutMs:(NSNumber * _Nonnull)timeoutMs completion:(void (^ _Nonnull)(BOOL, NSString * _Nullable))completion;
|
|
365
368
|
- (void)pauseMicrophoneAndWait:(NSNumber * _Nonnull)timeoutMs completion:(void (^ _Nonnull)(BOOL, NSString * _Nullable))completion;
|
|
366
369
|
- (void)unPauseMicrophoneAndWait:(NSNumber * _Nonnull)timeoutMs completion:(void (^ _Nonnull)(BOOL, NSString * _Nullable))completion;
|
|
367
370
|
- (void)pauseMicrophone;
|