react-native-davoice-tts 1.0.317 → 1.0.319

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.
Files changed (21) hide show
  1. package/TTSRNBridge.podspec +1 -1
  2. package/ios/SpeechBridge/SpeechBridge.m +1 -81
  3. package/ios/TTSRNBridge/DavoiceTTS.xcframework/Info.plist +5 -5
  4. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/DavoiceTTS +0 -0
  5. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Headers/DavoiceTTS-Swift.h +0 -3
  6. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.abi.json +8891 -9107
  7. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.private.swiftinterface +91 -94
  8. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.swiftinterface +91 -94
  9. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/DavoiceTTS +0 -0
  10. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Headers/DavoiceTTS-Swift.h +0 -6
  11. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.abi.json +87 -303
  12. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +0 -3
  13. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftinterface +0 -3
  14. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.abi.json +87 -303
  15. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +0 -3
  16. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +0 -3
  17. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/_CodeSignature/CodeDirectory +0 -0
  18. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/_CodeSignature/CodeRequirements-1 +0 -0
  19. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/_CodeSignature/CodeResources +27 -27
  20. package/package.json +1 -1
  21. package/speech/index.ts +13 -44
@@ -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.197" # Update to your package version
5
+ s.version = "1.0.199" # 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 .
@@ -25,14 +25,6 @@ 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
-
36
28
  // Make a mono Float32 AVAudioPCMBuffer from raw PCM payload (i16 or f32).
37
29
  // We accept either interleaved or non-interleaved input and mixdown to mono
38
30
  // (DaVoiceTTS.playBuffer will resample / normalize as needed).
@@ -535,85 +527,13 @@ RCT_EXPORT_METHOD(pauseSpeechRecognitionLite:(RCTResponseSenderBlock)callback)
535
527
  if (callback) callback(@[@(YES)]);
536
528
  }
537
529
 
538
- RCT_EXPORT_METHOD(pauseSpeechRecognitionLiteAsync:(nonnull NSNumber *)timeoutMs
539
- resolver:(RCTPromiseResolveBlock)resolve
540
- rejecter:(RCTPromiseRejectBlock)reject)
541
- {
542
- if (!self.stt) { resolve(@{@"ok": @(YES), @"reason": @""}); return; }
543
-
544
- NSNumber *t = timeoutMs ?: @(1500);
545
- if (t.doubleValue <= 0) t = @(1500);
546
-
547
- if ([(id)self.stt respondsToSelector:@selector(pauseSpeechRecognitionLiteAndWait:completion:)]) {
548
- [(id)self.stt pauseSpeechRecognitionLiteAndWait:t completion:^(BOOL ok, NSString * _Nullable reason) {
549
- resolve(@{@"ok": @(ok), @"reason": reason ?: @""});
550
- }];
551
- return;
552
- }
553
-
554
- [self.stt pauseSpeechRecognitionLite];
555
- resolve(@{@"ok": @(YES), @"reason": @"bridge_fallback_no_wait_method"});
556
- }
557
-
558
530
  RCT_EXPORT_METHOD(unPauseSpeechRecognitionLite:(nonnull NSNumber *)times
559
531
  callback:(RCTResponseSenderBlock)callback)
560
532
  {
561
- SBLog(@"unPauseSpeechRecognitionLite ENTER times=%@", times);
562
533
  // No-op if STT isn't initialized yet (avoid JS error spam).
563
- if (!self.stt) {
564
- SBLog(@"unPauseSpeechRecognitionLite EXIT no STT instance");
565
- if (callback) callback(@[@(YES)]);
566
- return;
567
- }
534
+ if (!self.stt) { if (callback) callback(@[@(YES)]); return; }
568
535
  [self.stt unPauseSpeechRecognitionLite:times];
569
- SBLog(@"unPauseSpeechRecognitionLite AFTER Swift call times=%@", times);
570
- if (callback) callback(@[@(YES)]);
571
- SBLog(@"unPauseSpeechRecognitionLite CALLBACK fired times=%@", times);
572
- }
573
-
574
- RCT_EXPORT_METHOD(unPauseSpeechRecognitionLiteWithPreFetch:(nonnull NSNumber *)times
575
- preFetchMs:(nonnull NSNumber *)preFetch
576
- callback:(RCTResponseSenderBlock)callback)
577
- {
578
- SBLog(@"unPauseSpeechRecognitionLiteWithPreFetch ENTER times=%@ preFetchMs=%@", times, preFetch);
579
- // No-op if STT isn't initialized yet (avoid JS error spam).
580
- if (!self.stt) {
581
- SBLog(@"unPauseSpeechRecognitionLiteWithPreFetch EXIT no STT instance");
582
- if (callback) callback(@[@(YES)]);
583
- return;
584
- }
585
- [self.stt unPauseSpeechRecognitionLite:times preFetch:preFetch];
586
- SBLog(@"unPauseSpeechRecognitionLiteWithPreFetch AFTER Swift call times=%@ preFetchMs=%@", times, preFetch);
587
536
  if (callback) callback(@[@(YES)]);
588
- SBLog(@"unPauseSpeechRecognitionLiteWithPreFetch CALLBACK fired times=%@ preFetchMs=%@", times, preFetch);
589
- }
590
-
591
- RCT_EXPORT_METHOD(unPauseSpeechRecognitionLiteAsync:(nonnull NSNumber *)times
592
- preFetchMs:(nonnull NSNumber *)preFetch
593
- timeoutMs:(nonnull NSNumber *)timeoutMs
594
- resolver:(RCTPromiseResolveBlock)resolve
595
- rejecter:(RCTPromiseRejectBlock)reject)
596
- {
597
- SBLog(@"unPauseSpeechRecognitionLiteAsync ENTER times=%@ preFetchMs=%@ timeoutMs=%@", times, preFetch, timeoutMs);
598
- if (!self.stt) { resolve(@{@"ok": @(YES), @"reason": @""}); return; }
599
-
600
- NSNumber *t = timeoutMs ?: @(2500);
601
- if (t.doubleValue <= 0) t = @(2500);
602
- NSNumber *pf = preFetch ?: @(0);
603
- if (pf.doubleValue < 0) pf = @(0);
604
-
605
- if ([(id)self.stt respondsToSelector:@selector(unPauseSpeechRecognitionLiteAndWait:preFetch:timeoutMs:completion:)]) {
606
- [(id)self.stt unPauseSpeechRecognitionLiteAndWait:times
607
- preFetch:pf
608
- timeoutMs:t
609
- completion:^(BOOL ok, NSString * _Nullable reason) {
610
- resolve(@{@"ok": @(ok), @"reason": reason ?: @""});
611
- }];
612
- return;
613
- }
614
-
615
- [self.stt unPauseSpeechRecognitionLite:times preFetch:pf];
616
- resolve(@{@"ok": @(YES), @"reason": @"bridge_fallback_no_wait_method"});
617
537
  }
618
538
 
619
539
  // Promise-based pause that resolves ONLY when iOS is actually settled in playback (mic released)
@@ -8,32 +8,32 @@
8
8
  <key>BinaryPath</key>
9
9
  <string>DavoiceTTS.framework/DavoiceTTS</string>
10
10
  <key>LibraryIdentifier</key>
11
- <string>ios-arm64_x86_64-simulator</string>
11
+ <string>ios-arm64</string>
12
12
  <key>LibraryPath</key>
13
13
  <string>DavoiceTTS.framework</string>
14
14
  <key>SupportedArchitectures</key>
15
15
  <array>
16
16
  <string>arm64</string>
17
- <string>x86_64</string>
18
17
  </array>
19
18
  <key>SupportedPlatform</key>
20
19
  <string>ios</string>
21
- <key>SupportedPlatformVariant</key>
22
- <string>simulator</string>
23
20
  </dict>
24
21
  <dict>
25
22
  <key>BinaryPath</key>
26
23
  <string>DavoiceTTS.framework/DavoiceTTS</string>
27
24
  <key>LibraryIdentifier</key>
28
- <string>ios-arm64</string>
25
+ <string>ios-arm64_x86_64-simulator</string>
29
26
  <key>LibraryPath</key>
30
27
  <string>DavoiceTTS.framework</string>
31
28
  <key>SupportedArchitectures</key>
32
29
  <array>
33
30
  <string>arm64</string>
31
+ <string>x86_64</string>
34
32
  </array>
35
33
  <key>SupportedPlatform</key>
36
34
  <string>ios</string>
35
+ <key>SupportedPlatformVariant</key>
36
+ <string>simulator</string>
37
37
  </dict>
38
38
  </array>
39
39
  <key>CFBundlePackageType</key>
@@ -361,10 +361,7 @@ 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;
365
364
  - (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;
368
365
  - (void)pauseMicrophoneAndWait:(NSNumber * _Nonnull)timeoutMs completion:(void (^ _Nonnull)(BOOL, NSString * _Nullable))completion;
369
366
  - (void)unPauseMicrophoneAndWait:(NSNumber * _Nonnull)timeoutMs completion:(void (^ _Nonnull)(BOOL, NSString * _Nullable))completion;
370
367
  - (void)pauseMicrophone;