react-native-davoice-tts 1.0.251 → 1.0.252

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 (22) hide show
  1. package/TTSRNBridge.podspec +1 -1
  2. package/ios/STTRNBridge/STTBridge.m +1 -0
  3. package/ios/SpeechBridge/SpeechBridge.m +32 -0
  4. package/ios/TTSRNBridge/DavoiceTTS.xcframework/Info.plist +5 -5
  5. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/DavoiceTTS +0 -0
  6. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Headers/DavoiceTTS-Swift.h +3 -0
  7. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.abi.json +142 -7
  8. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.private.swiftinterface +2 -0
  9. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.swiftinterface +2 -0
  10. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/DavoiceTTS +0 -0
  11. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Headers/DavoiceTTS-Swift.h +6 -0
  12. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.abi.json +142 -7
  13. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +2 -0
  14. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftinterface +2 -0
  15. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.abi.json +142 -7
  16. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +2 -0
  17. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +2 -0
  18. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/_CodeSignature/CodeDirectory +0 -0
  19. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/_CodeSignature/CodeRequirements-1 +0 -0
  20. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/_CodeSignature/CodeResources +27 -27
  21. package/package.json +1 -1
  22. package/speech/index.ts +76 -3
@@ -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.124" # Update to your package version
5
+ s.version = "1.0.125" # 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 .
@@ -1,3 +1,4 @@
1
+ // STTBridge.m
1
2
  #import "STTBridge.h"
2
3
  #import <React/RCTLog.h>
3
4
  #import <React/RCTConvert.h>
@@ -299,6 +299,38 @@ RCT_EXPORT_METHOD(initAll:(NSDictionary *)opts
299
299
  });
300
300
  }
301
301
 
302
+ // Promise-based pause that resolves ONLY when iOS is actually settled in playback (mic released)
303
+ RCT_EXPORT_METHOD(pauseMicrophoneAsync:(nonnull NSNumber *)timeoutMs
304
+ resolver:(RCTPromiseResolveBlock)resolve
305
+ rejecter:(RCTPromiseRejectBlock)reject)
306
+ {
307
+ if (!self.stt) { resolve(@{@"ok": @(NO), @"reason": @"no_stt"}); return; }
308
+
309
+ // Default if caller passes null/0
310
+ NSNumber *t = timeoutMs ?: @(1500);
311
+ if (t.doubleValue <= 0) t = @(1500);
312
+
313
+ // STT.swift will do the main-queue polling internally
314
+ [self.stt pauseMicrophoneAndWait:t completion:^(BOOL ok, NSString * _Nullable reason) {
315
+ resolve(@{@"ok": @(ok), @"reason": reason ?: @""});
316
+ }];
317
+ }
318
+
319
+ // Promise-based unpause that resolves ONLY when engine+task are live again
320
+ RCT_EXPORT_METHOD(unPauseMicrophoneAsync:(nonnull NSNumber *)timeoutMs
321
+ resolver:(RCTPromiseResolveBlock)resolve
322
+ rejecter:(RCTPromiseRejectBlock)reject)
323
+ {
324
+ if (!self.stt) { resolve(@{@"ok": @(NO), @"reason": @"no_stt"}); return; }
325
+
326
+ NSNumber *t = timeoutMs ?: @(2500);
327
+ if (t.doubleValue <= 0) t = @(2500);
328
+
329
+ [self.stt unPauseMicrophoneAndWait:t completion:^(BOOL ok, NSString * _Nullable reason) {
330
+ resolve(@{@"ok": @(ok), @"reason": reason ?: @""});
331
+ }];
332
+ }
333
+
302
334
  // ADD — pause mic
303
335
  RCT_EXPORT_METHOD(pauseMicrophone:(RCTResponseSenderBlock)callback)
304
336
  {
@@ -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>
@@ -335,6 +335,7 @@ SWIFT_CLASS("_TtC10DavoiceTTS10DaVoiceTTS")
335
335
  @end
336
336
 
337
337
  @protocol STTDelegate;
338
+ @class NSNumber;
338
339
  @class SFSpeechRecognizer;
339
340
  SWIFT_CLASS("_TtC10DavoiceTTS3STT")
340
341
  @interface STT : NSObject <SFSpeechRecognizerDelegate>
@@ -343,6 +344,8 @@ SWIFT_CLASS("_TtC10DavoiceTTS3STT")
343
344
  @property (nonatomic) BOOL aecEnabled;
344
345
  SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSArray<NSString *> * _Nonnull supportedEvents;)
345
346
  + (NSArray<NSString *> * _Nonnull)supportedEvents SWIFT_WARN_UNUSED_RESULT;
347
+ - (void)pauseMicrophoneAndWait:(NSNumber * _Nonnull)timeoutMs completion:(void (^ _Nonnull)(BOOL, NSString * _Nullable))completion;
348
+ - (void)unPauseMicrophoneAndWait:(NSNumber * _Nonnull)timeoutMs completion:(void (^ _Nonnull)(BOOL, NSString * _Nullable))completion;
346
349
  - (void)pauseMicrophone;
347
350
  - (void)unPauseMicrophone;
348
351
  /// Enable/disable iOS voice-processing (AEC + ducking).
@@ -529,6 +529,141 @@
529
529
  }
530
530
  ]
531
531
  },
532
+ {
533
+ "kind": "Function",
534
+ "name": "pauseMicrophoneAndWait",
535
+ "printedName": "pauseMicrophoneAndWait(_:completion:)",
536
+ "children": [
537
+ {
538
+ "kind": "TypeNominal",
539
+ "name": "Void",
540
+ "printedName": "()"
541
+ },
542
+ {
543
+ "kind": "TypeNominal",
544
+ "name": "NSNumber",
545
+ "printedName": "Foundation.NSNumber",
546
+ "usr": "c:objc(cs)NSNumber"
547
+ },
548
+ {
549
+ "kind": "TypeFunc",
550
+ "name": "Function",
551
+ "printedName": "(Swift.Bool, Swift.String?) -> ()",
552
+ "children": [
553
+ {
554
+ "kind": "TypeNominal",
555
+ "name": "Void",
556
+ "printedName": "()"
557
+ },
558
+ {
559
+ "kind": "TypeNominal",
560
+ "name": "Tuple",
561
+ "printedName": "(Swift.Bool, Swift.String?)",
562
+ "children": [
563
+ {
564
+ "kind": "TypeNominal",
565
+ "name": "Bool",
566
+ "printedName": "Swift.Bool",
567
+ "usr": "s:Sb"
568
+ },
569
+ {
570
+ "kind": "TypeNominal",
571
+ "name": "Optional",
572
+ "printedName": "Swift.String?",
573
+ "children": [
574
+ {
575
+ "kind": "TypeNominal",
576
+ "name": "String",
577
+ "printedName": "Swift.String",
578
+ "usr": "s:SS"
579
+ }
580
+ ],
581
+ "usr": "s:Sq"
582
+ }
583
+ ]
584
+ }
585
+ ]
586
+ }
587
+ ],
588
+ "declKind": "Func",
589
+ "usr": "c:@M@DavoiceTTS@objc(cs)STT(im)pauseMicrophoneAndWait:completion:",
590
+ "mangledName": "$s10DavoiceTTS3STTC22pauseMicrophoneAndWait_10completionySo8NSNumberC_ySb_SSSgtctF",
591
+ "moduleName": "DavoiceTTS",
592
+ "declAttributes": [
593
+ "Final",
594
+ "AccessControl",
595
+ "ObjC",
596
+ "RawDocComment"
597
+ ],
598
+ "funcSelfKind": "NonMutating"
599
+ },
600
+ {
601
+ "kind": "Function",
602
+ "name": "unPauseMicrophoneAndWait",
603
+ "printedName": "unPauseMicrophoneAndWait(_:completion:)",
604
+ "children": [
605
+ {
606
+ "kind": "TypeNominal",
607
+ "name": "Void",
608
+ "printedName": "()"
609
+ },
610
+ {
611
+ "kind": "TypeNominal",
612
+ "name": "NSNumber",
613
+ "printedName": "Foundation.NSNumber",
614
+ "usr": "c:objc(cs)NSNumber"
615
+ },
616
+ {
617
+ "kind": "TypeFunc",
618
+ "name": "Function",
619
+ "printedName": "(Swift.Bool, Swift.String?) -> ()",
620
+ "children": [
621
+ {
622
+ "kind": "TypeNominal",
623
+ "name": "Void",
624
+ "printedName": "()"
625
+ },
626
+ {
627
+ "kind": "TypeNominal",
628
+ "name": "Tuple",
629
+ "printedName": "(Swift.Bool, Swift.String?)",
630
+ "children": [
631
+ {
632
+ "kind": "TypeNominal",
633
+ "name": "Bool",
634
+ "printedName": "Swift.Bool",
635
+ "usr": "s:Sb"
636
+ },
637
+ {
638
+ "kind": "TypeNominal",
639
+ "name": "Optional",
640
+ "printedName": "Swift.String?",
641
+ "children": [
642
+ {
643
+ "kind": "TypeNominal",
644
+ "name": "String",
645
+ "printedName": "Swift.String",
646
+ "usr": "s:SS"
647
+ }
648
+ ],
649
+ "usr": "s:Sq"
650
+ }
651
+ ]
652
+ }
653
+ ]
654
+ }
655
+ ],
656
+ "declKind": "Func",
657
+ "usr": "c:@M@DavoiceTTS@objc(cs)STT(im)unPauseMicrophoneAndWait:completion:",
658
+ "mangledName": "$s10DavoiceTTS3STTC24unPauseMicrophoneAndWait_10completionySo8NSNumberC_ySb_SSSgtctF",
659
+ "moduleName": "DavoiceTTS",
660
+ "declAttributes": [
661
+ "Final",
662
+ "AccessControl",
663
+ "ObjC"
664
+ ],
665
+ "funcSelfKind": "NonMutating"
666
+ },
532
667
  {
533
668
  "kind": "Function",
534
669
  "name": "pauseMicrophone",
@@ -4223,49 +4358,49 @@
4223
4358
  {
4224
4359
  "filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
4225
4360
  "kind": "IntegerLiteral",
4226
- "offset": 11327,
4361
+ "offset": 14749,
4227
4362
  "length": 1,
4228
4363
  "value": "0"
4229
4364
  },
4230
4365
  {
4231
4366
  "filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
4232
4367
  "kind": "BooleanLiteral",
4233
- "offset": 11487,
4368
+ "offset": 14909,
4234
4369
  "length": 5,
4235
4370
  "value": "false"
4236
4371
  },
4237
4372
  {
4238
4373
  "filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
4239
4374
  "kind": "BooleanLiteral",
4240
- "offset": 13019,
4375
+ "offset": 16441,
4241
4376
  "length": 4,
4242
4377
  "value": "true"
4243
4378
  },
4244
4379
  {
4245
4380
  "filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
4246
4381
  "kind": "IntegerLiteral",
4247
- "offset": 13816,
4382
+ "offset": 17238,
4248
4383
  "length": 1,
4249
4384
  "value": "0"
4250
4385
  },
4251
4386
  {
4252
4387
  "filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
4253
4388
  "kind": "BooleanLiteral",
4254
- "offset": 23123,
4389
+ "offset": 26545,
4255
4390
  "length": 4,
4256
4391
  "value": "true"
4257
4392
  },
4258
4393
  {
4259
4394
  "filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
4260
4395
  "kind": "BooleanLiteral",
4261
- "offset": 41958,
4396
+ "offset": 45380,
4262
4397
  "length": 5,
4263
4398
  "value": "false"
4264
4399
  },
4265
4400
  {
4266
4401
  "filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
4267
4402
  "kind": "FloatLiteral",
4268
- "offset": 56448,
4403
+ "offset": 59870,
4269
4404
  "length": 3,
4270
4405
  "value": "0.7"
4271
4406
  },
@@ -22,6 +22,8 @@ import phonemes
22
22
  @objc final public var continuous: Swift.Bool
23
23
  @objc final public var aecEnabled: Swift.Bool
24
24
  @objc public static let supportedEvents: [Swift.String]
25
+ @objc final public func pauseMicrophoneAndWait(_ timeoutMs: Foundation.NSNumber, completion: @escaping (Swift.Bool, Swift.String?) -> Swift.Void)
26
+ @objc final public func unPauseMicrophoneAndWait(_ timeoutMs: Foundation.NSNumber, completion: @escaping (Swift.Bool, Swift.String?) -> Swift.Void)
25
27
  @objc final public func pauseMicrophone()
26
28
  @objc final public func unPauseMicrophone()
27
29
  @objc final public func setAECEnabled(_ enabled: Swift.Bool)
@@ -22,6 +22,8 @@ import phonemes
22
22
  @objc final public var continuous: Swift.Bool
23
23
  @objc final public var aecEnabled: Swift.Bool
24
24
  @objc public static let supportedEvents: [Swift.String]
25
+ @objc final public func pauseMicrophoneAndWait(_ timeoutMs: Foundation.NSNumber, completion: @escaping (Swift.Bool, Swift.String?) -> Swift.Void)
26
+ @objc final public func unPauseMicrophoneAndWait(_ timeoutMs: Foundation.NSNumber, completion: @escaping (Swift.Bool, Swift.String?) -> Swift.Void)
25
27
  @objc final public func pauseMicrophone()
26
28
  @objc final public func unPauseMicrophone()
27
29
  @objc final public func setAECEnabled(_ enabled: Swift.Bool)
@@ -335,6 +335,7 @@ SWIFT_CLASS("_TtC10DavoiceTTS10DaVoiceTTS")
335
335
  @end
336
336
 
337
337
  @protocol STTDelegate;
338
+ @class NSNumber;
338
339
  @class SFSpeechRecognizer;
339
340
  SWIFT_CLASS("_TtC10DavoiceTTS3STT")
340
341
  @interface STT : NSObject <SFSpeechRecognizerDelegate>
@@ -343,6 +344,8 @@ SWIFT_CLASS("_TtC10DavoiceTTS3STT")
343
344
  @property (nonatomic) BOOL aecEnabled;
344
345
  SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSArray<NSString *> * _Nonnull supportedEvents;)
345
346
  + (NSArray<NSString *> * _Nonnull)supportedEvents SWIFT_WARN_UNUSED_RESULT;
347
+ - (void)pauseMicrophoneAndWait:(NSNumber * _Nonnull)timeoutMs completion:(void (^ _Nonnull)(BOOL, NSString * _Nullable))completion;
348
+ - (void)unPauseMicrophoneAndWait:(NSNumber * _Nonnull)timeoutMs completion:(void (^ _Nonnull)(BOOL, NSString * _Nullable))completion;
346
349
  - (void)pauseMicrophone;
347
350
  - (void)unPauseMicrophone;
348
351
  /// Enable/disable iOS voice-processing (AEC + ducking).
@@ -718,6 +721,7 @@ SWIFT_CLASS("_TtC10DavoiceTTS10DaVoiceTTS")
718
721
  @end
719
722
 
720
723
  @protocol STTDelegate;
724
+ @class NSNumber;
721
725
  @class SFSpeechRecognizer;
722
726
  SWIFT_CLASS("_TtC10DavoiceTTS3STT")
723
727
  @interface STT : NSObject <SFSpeechRecognizerDelegate>
@@ -726,6 +730,8 @@ SWIFT_CLASS("_TtC10DavoiceTTS3STT")
726
730
  @property (nonatomic) BOOL aecEnabled;
727
731
  SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSArray<NSString *> * _Nonnull supportedEvents;)
728
732
  + (NSArray<NSString *> * _Nonnull)supportedEvents SWIFT_WARN_UNUSED_RESULT;
733
+ - (void)pauseMicrophoneAndWait:(NSNumber * _Nonnull)timeoutMs completion:(void (^ _Nonnull)(BOOL, NSString * _Nullable))completion;
734
+ - (void)unPauseMicrophoneAndWait:(NSNumber * _Nonnull)timeoutMs completion:(void (^ _Nonnull)(BOOL, NSString * _Nullable))completion;
729
735
  - (void)pauseMicrophone;
730
736
  - (void)unPauseMicrophone;
731
737
  /// Enable/disable iOS voice-processing (AEC + ducking).
@@ -1423,6 +1423,141 @@
1423
1423
  }
1424
1424
  ]
1425
1425
  },
1426
+ {
1427
+ "kind": "Function",
1428
+ "name": "pauseMicrophoneAndWait",
1429
+ "printedName": "pauseMicrophoneAndWait(_:completion:)",
1430
+ "children": [
1431
+ {
1432
+ "kind": "TypeNominal",
1433
+ "name": "Void",
1434
+ "printedName": "()"
1435
+ },
1436
+ {
1437
+ "kind": "TypeNominal",
1438
+ "name": "NSNumber",
1439
+ "printedName": "Foundation.NSNumber",
1440
+ "usr": "c:objc(cs)NSNumber"
1441
+ },
1442
+ {
1443
+ "kind": "TypeFunc",
1444
+ "name": "Function",
1445
+ "printedName": "(Swift.Bool, Swift.String?) -> ()",
1446
+ "children": [
1447
+ {
1448
+ "kind": "TypeNominal",
1449
+ "name": "Void",
1450
+ "printedName": "()"
1451
+ },
1452
+ {
1453
+ "kind": "TypeNominal",
1454
+ "name": "Tuple",
1455
+ "printedName": "(Swift.Bool, Swift.String?)",
1456
+ "children": [
1457
+ {
1458
+ "kind": "TypeNominal",
1459
+ "name": "Bool",
1460
+ "printedName": "Swift.Bool",
1461
+ "usr": "s:Sb"
1462
+ },
1463
+ {
1464
+ "kind": "TypeNominal",
1465
+ "name": "Optional",
1466
+ "printedName": "Swift.String?",
1467
+ "children": [
1468
+ {
1469
+ "kind": "TypeNominal",
1470
+ "name": "String",
1471
+ "printedName": "Swift.String",
1472
+ "usr": "s:SS"
1473
+ }
1474
+ ],
1475
+ "usr": "s:Sq"
1476
+ }
1477
+ ]
1478
+ }
1479
+ ]
1480
+ }
1481
+ ],
1482
+ "declKind": "Func",
1483
+ "usr": "c:@M@DavoiceTTS@objc(cs)STT(im)pauseMicrophoneAndWait:completion:",
1484
+ "mangledName": "$s10DavoiceTTS3STTC22pauseMicrophoneAndWait_10completionySo8NSNumberC_ySb_SSSgtctF",
1485
+ "moduleName": "DavoiceTTS",
1486
+ "declAttributes": [
1487
+ "Final",
1488
+ "AccessControl",
1489
+ "ObjC",
1490
+ "RawDocComment"
1491
+ ],
1492
+ "funcSelfKind": "NonMutating"
1493
+ },
1494
+ {
1495
+ "kind": "Function",
1496
+ "name": "unPauseMicrophoneAndWait",
1497
+ "printedName": "unPauseMicrophoneAndWait(_:completion:)",
1498
+ "children": [
1499
+ {
1500
+ "kind": "TypeNominal",
1501
+ "name": "Void",
1502
+ "printedName": "()"
1503
+ },
1504
+ {
1505
+ "kind": "TypeNominal",
1506
+ "name": "NSNumber",
1507
+ "printedName": "Foundation.NSNumber",
1508
+ "usr": "c:objc(cs)NSNumber"
1509
+ },
1510
+ {
1511
+ "kind": "TypeFunc",
1512
+ "name": "Function",
1513
+ "printedName": "(Swift.Bool, Swift.String?) -> ()",
1514
+ "children": [
1515
+ {
1516
+ "kind": "TypeNominal",
1517
+ "name": "Void",
1518
+ "printedName": "()"
1519
+ },
1520
+ {
1521
+ "kind": "TypeNominal",
1522
+ "name": "Tuple",
1523
+ "printedName": "(Swift.Bool, Swift.String?)",
1524
+ "children": [
1525
+ {
1526
+ "kind": "TypeNominal",
1527
+ "name": "Bool",
1528
+ "printedName": "Swift.Bool",
1529
+ "usr": "s:Sb"
1530
+ },
1531
+ {
1532
+ "kind": "TypeNominal",
1533
+ "name": "Optional",
1534
+ "printedName": "Swift.String?",
1535
+ "children": [
1536
+ {
1537
+ "kind": "TypeNominal",
1538
+ "name": "String",
1539
+ "printedName": "Swift.String",
1540
+ "usr": "s:SS"
1541
+ }
1542
+ ],
1543
+ "usr": "s:Sq"
1544
+ }
1545
+ ]
1546
+ }
1547
+ ]
1548
+ }
1549
+ ],
1550
+ "declKind": "Func",
1551
+ "usr": "c:@M@DavoiceTTS@objc(cs)STT(im)unPauseMicrophoneAndWait:completion:",
1552
+ "mangledName": "$s10DavoiceTTS3STTC24unPauseMicrophoneAndWait_10completionySo8NSNumberC_ySb_SSSgtctF",
1553
+ "moduleName": "DavoiceTTS",
1554
+ "declAttributes": [
1555
+ "Final",
1556
+ "AccessControl",
1557
+ "ObjC"
1558
+ ],
1559
+ "funcSelfKind": "NonMutating"
1560
+ },
1426
1561
  {
1427
1562
  "kind": "Function",
1428
1563
  "name": "pauseMicrophone",
@@ -4223,49 +4358,49 @@
4223
4358
  {
4224
4359
  "filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
4225
4360
  "kind": "IntegerLiteral",
4226
- "offset": 11327,
4361
+ "offset": 14749,
4227
4362
  "length": 1,
4228
4363
  "value": "0"
4229
4364
  },
4230
4365
  {
4231
4366
  "filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
4232
4367
  "kind": "BooleanLiteral",
4233
- "offset": 11487,
4368
+ "offset": 14909,
4234
4369
  "length": 5,
4235
4370
  "value": "false"
4236
4371
  },
4237
4372
  {
4238
4373
  "filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
4239
4374
  "kind": "BooleanLiteral",
4240
- "offset": 13019,
4375
+ "offset": 16441,
4241
4376
  "length": 4,
4242
4377
  "value": "true"
4243
4378
  },
4244
4379
  {
4245
4380
  "filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
4246
4381
  "kind": "IntegerLiteral",
4247
- "offset": 13816,
4382
+ "offset": 17238,
4248
4383
  "length": 1,
4249
4384
  "value": "0"
4250
4385
  },
4251
4386
  {
4252
4387
  "filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
4253
4388
  "kind": "BooleanLiteral",
4254
- "offset": 23123,
4389
+ "offset": 26545,
4255
4390
  "length": 4,
4256
4391
  "value": "true"
4257
4392
  },
4258
4393
  {
4259
4394
  "filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
4260
4395
  "kind": "BooleanLiteral",
4261
- "offset": 41958,
4396
+ "offset": 45380,
4262
4397
  "length": 5,
4263
4398
  "value": "false"
4264
4399
  },
4265
4400
  {
4266
4401
  "filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
4267
4402
  "kind": "FloatLiteral",
4268
- "offset": 56448,
4403
+ "offset": 59870,
4269
4404
  "length": 3,
4270
4405
  "value": "0.7"
4271
4406
  },
@@ -34,6 +34,8 @@ public enum AudioPlaybackHook {
34
34
  @objc final public var continuous: Swift.Bool
35
35
  @objc final public var aecEnabled: Swift.Bool
36
36
  @objc public static let supportedEvents: [Swift.String]
37
+ @objc final public func pauseMicrophoneAndWait(_ timeoutMs: Foundation.NSNumber, completion: @escaping (Swift.Bool, Swift.String?) -> Swift.Void)
38
+ @objc final public func unPauseMicrophoneAndWait(_ timeoutMs: Foundation.NSNumber, completion: @escaping (Swift.Bool, Swift.String?) -> Swift.Void)
37
39
  @objc final public func pauseMicrophone()
38
40
  @objc final public func unPauseMicrophone()
39
41
  @objc final public func setAECEnabled(_ enabled: Swift.Bool)
@@ -34,6 +34,8 @@ public enum AudioPlaybackHook {
34
34
  @objc final public var continuous: Swift.Bool
35
35
  @objc final public var aecEnabled: Swift.Bool
36
36
  @objc public static let supportedEvents: [Swift.String]
37
+ @objc final public func pauseMicrophoneAndWait(_ timeoutMs: Foundation.NSNumber, completion: @escaping (Swift.Bool, Swift.String?) -> Swift.Void)
38
+ @objc final public func unPauseMicrophoneAndWait(_ timeoutMs: Foundation.NSNumber, completion: @escaping (Swift.Bool, Swift.String?) -> Swift.Void)
37
39
  @objc final public func pauseMicrophone()
38
40
  @objc final public func unPauseMicrophone()
39
41
  @objc final public func setAECEnabled(_ enabled: Swift.Bool)
@@ -1423,6 +1423,141 @@
1423
1423
  }
1424
1424
  ]
1425
1425
  },
1426
+ {
1427
+ "kind": "Function",
1428
+ "name": "pauseMicrophoneAndWait",
1429
+ "printedName": "pauseMicrophoneAndWait(_:completion:)",
1430
+ "children": [
1431
+ {
1432
+ "kind": "TypeNominal",
1433
+ "name": "Void",
1434
+ "printedName": "()"
1435
+ },
1436
+ {
1437
+ "kind": "TypeNominal",
1438
+ "name": "NSNumber",
1439
+ "printedName": "Foundation.NSNumber",
1440
+ "usr": "c:objc(cs)NSNumber"
1441
+ },
1442
+ {
1443
+ "kind": "TypeFunc",
1444
+ "name": "Function",
1445
+ "printedName": "(Swift.Bool, Swift.String?) -> ()",
1446
+ "children": [
1447
+ {
1448
+ "kind": "TypeNominal",
1449
+ "name": "Void",
1450
+ "printedName": "()"
1451
+ },
1452
+ {
1453
+ "kind": "TypeNominal",
1454
+ "name": "Tuple",
1455
+ "printedName": "(Swift.Bool, Swift.String?)",
1456
+ "children": [
1457
+ {
1458
+ "kind": "TypeNominal",
1459
+ "name": "Bool",
1460
+ "printedName": "Swift.Bool",
1461
+ "usr": "s:Sb"
1462
+ },
1463
+ {
1464
+ "kind": "TypeNominal",
1465
+ "name": "Optional",
1466
+ "printedName": "Swift.String?",
1467
+ "children": [
1468
+ {
1469
+ "kind": "TypeNominal",
1470
+ "name": "String",
1471
+ "printedName": "Swift.String",
1472
+ "usr": "s:SS"
1473
+ }
1474
+ ],
1475
+ "usr": "s:Sq"
1476
+ }
1477
+ ]
1478
+ }
1479
+ ]
1480
+ }
1481
+ ],
1482
+ "declKind": "Func",
1483
+ "usr": "c:@M@DavoiceTTS@objc(cs)STT(im)pauseMicrophoneAndWait:completion:",
1484
+ "mangledName": "$s10DavoiceTTS3STTC22pauseMicrophoneAndWait_10completionySo8NSNumberC_ySb_SSSgtctF",
1485
+ "moduleName": "DavoiceTTS",
1486
+ "declAttributes": [
1487
+ "Final",
1488
+ "AccessControl",
1489
+ "ObjC",
1490
+ "RawDocComment"
1491
+ ],
1492
+ "funcSelfKind": "NonMutating"
1493
+ },
1494
+ {
1495
+ "kind": "Function",
1496
+ "name": "unPauseMicrophoneAndWait",
1497
+ "printedName": "unPauseMicrophoneAndWait(_:completion:)",
1498
+ "children": [
1499
+ {
1500
+ "kind": "TypeNominal",
1501
+ "name": "Void",
1502
+ "printedName": "()"
1503
+ },
1504
+ {
1505
+ "kind": "TypeNominal",
1506
+ "name": "NSNumber",
1507
+ "printedName": "Foundation.NSNumber",
1508
+ "usr": "c:objc(cs)NSNumber"
1509
+ },
1510
+ {
1511
+ "kind": "TypeFunc",
1512
+ "name": "Function",
1513
+ "printedName": "(Swift.Bool, Swift.String?) -> ()",
1514
+ "children": [
1515
+ {
1516
+ "kind": "TypeNominal",
1517
+ "name": "Void",
1518
+ "printedName": "()"
1519
+ },
1520
+ {
1521
+ "kind": "TypeNominal",
1522
+ "name": "Tuple",
1523
+ "printedName": "(Swift.Bool, Swift.String?)",
1524
+ "children": [
1525
+ {
1526
+ "kind": "TypeNominal",
1527
+ "name": "Bool",
1528
+ "printedName": "Swift.Bool",
1529
+ "usr": "s:Sb"
1530
+ },
1531
+ {
1532
+ "kind": "TypeNominal",
1533
+ "name": "Optional",
1534
+ "printedName": "Swift.String?",
1535
+ "children": [
1536
+ {
1537
+ "kind": "TypeNominal",
1538
+ "name": "String",
1539
+ "printedName": "Swift.String",
1540
+ "usr": "s:SS"
1541
+ }
1542
+ ],
1543
+ "usr": "s:Sq"
1544
+ }
1545
+ ]
1546
+ }
1547
+ ]
1548
+ }
1549
+ ],
1550
+ "declKind": "Func",
1551
+ "usr": "c:@M@DavoiceTTS@objc(cs)STT(im)unPauseMicrophoneAndWait:completion:",
1552
+ "mangledName": "$s10DavoiceTTS3STTC24unPauseMicrophoneAndWait_10completionySo8NSNumberC_ySb_SSSgtctF",
1553
+ "moduleName": "DavoiceTTS",
1554
+ "declAttributes": [
1555
+ "Final",
1556
+ "AccessControl",
1557
+ "ObjC"
1558
+ ],
1559
+ "funcSelfKind": "NonMutating"
1560
+ },
1426
1561
  {
1427
1562
  "kind": "Function",
1428
1563
  "name": "pauseMicrophone",
@@ -4223,49 +4358,49 @@
4223
4358
  {
4224
4359
  "filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
4225
4360
  "kind": "IntegerLiteral",
4226
- "offset": 11327,
4361
+ "offset": 14749,
4227
4362
  "length": 1,
4228
4363
  "value": "0"
4229
4364
  },
4230
4365
  {
4231
4366
  "filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
4232
4367
  "kind": "BooleanLiteral",
4233
- "offset": 11487,
4368
+ "offset": 14909,
4234
4369
  "length": 5,
4235
4370
  "value": "false"
4236
4371
  },
4237
4372
  {
4238
4373
  "filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
4239
4374
  "kind": "BooleanLiteral",
4240
- "offset": 13019,
4375
+ "offset": 16441,
4241
4376
  "length": 4,
4242
4377
  "value": "true"
4243
4378
  },
4244
4379
  {
4245
4380
  "filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
4246
4381
  "kind": "IntegerLiteral",
4247
- "offset": 13816,
4382
+ "offset": 17238,
4248
4383
  "length": 1,
4249
4384
  "value": "0"
4250
4385
  },
4251
4386
  {
4252
4387
  "filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
4253
4388
  "kind": "BooleanLiteral",
4254
- "offset": 23123,
4389
+ "offset": 26545,
4255
4390
  "length": 4,
4256
4391
  "value": "true"
4257
4392
  },
4258
4393
  {
4259
4394
  "filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
4260
4395
  "kind": "BooleanLiteral",
4261
- "offset": 41958,
4396
+ "offset": 45380,
4262
4397
  "length": 5,
4263
4398
  "value": "false"
4264
4399
  },
4265
4400
  {
4266
4401
  "filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
4267
4402
  "kind": "FloatLiteral",
4268
- "offset": 56448,
4403
+ "offset": 59870,
4269
4404
  "length": 3,
4270
4405
  "value": "0.7"
4271
4406
  },
@@ -34,6 +34,8 @@ public enum AudioPlaybackHook {
34
34
  @objc final public var continuous: Swift.Bool
35
35
  @objc final public var aecEnabled: Swift.Bool
36
36
  @objc public static let supportedEvents: [Swift.String]
37
+ @objc final public func pauseMicrophoneAndWait(_ timeoutMs: Foundation.NSNumber, completion: @escaping (Swift.Bool, Swift.String?) -> Swift.Void)
38
+ @objc final public func unPauseMicrophoneAndWait(_ timeoutMs: Foundation.NSNumber, completion: @escaping (Swift.Bool, Swift.String?) -> Swift.Void)
37
39
  @objc final public func pauseMicrophone()
38
40
  @objc final public func unPauseMicrophone()
39
41
  @objc final public func setAECEnabled(_ enabled: Swift.Bool)
@@ -34,6 +34,8 @@ public enum AudioPlaybackHook {
34
34
  @objc final public var continuous: Swift.Bool
35
35
  @objc final public var aecEnabled: Swift.Bool
36
36
  @objc public static let supportedEvents: [Swift.String]
37
+ @objc final public func pauseMicrophoneAndWait(_ timeoutMs: Foundation.NSNumber, completion: @escaping (Swift.Bool, Swift.String?) -> Swift.Void)
38
+ @objc final public func unPauseMicrophoneAndWait(_ timeoutMs: Foundation.NSNumber, completion: @escaping (Swift.Bool, Swift.String?) -> Swift.Void)
37
39
  @objc final public func pauseMicrophone()
38
40
  @objc final public func unPauseMicrophone()
39
41
  @objc final public func setAECEnabled(_ enabled: Swift.Bool)
@@ -6,7 +6,7 @@
6
6
  <dict>
7
7
  <key>Headers/DavoiceTTS-Swift.h</key>
8
8
  <data>
9
- Cq2/+FoSpTFizAPA95BJqO2HEO4=
9
+ vgul7Uo5jdjZJrmsj5QJXgOQR0Y=
10
10
  </data>
11
11
  <key>Info.plist</key>
12
12
  <data>
@@ -14,11 +14,11 @@
14
14
  </data>
15
15
  <key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.abi.json</key>
16
16
  <data>
17
- pT1tr9Tkg2MYUIoUb2JDIr5aKn4=
17
+ pl0/I0fTwjgInd3o8lQY3oiF8qY=
18
18
  </data>
19
19
  <key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
20
20
  <data>
21
- BBQtRRlb9uS29Pvs8ZiC/ejYm/c=
21
+ 4O+ZELfFqgN6Wieq1IiRQfAtoN4=
22
22
  </data>
23
23
  <key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
24
24
  <data>
@@ -26,19 +26,19 @@
26
26
  </data>
27
27
  <key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
28
28
  <data>
29
- BBQtRRlb9uS29Pvs8ZiC/ejYm/c=
29
+ 4O+ZELfFqgN6Wieq1IiRQfAtoN4=
30
30
  </data>
31
31
  <key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key>
32
32
  <data>
33
- lP4ma9kPAguDHepQDHgLEDCu4wU=
33
+ p8Tye5WOUNf8BwTNJtr50lW5DXo=
34
34
  </data>
35
35
  <key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
36
36
  <data>
37
- pT1tr9Tkg2MYUIoUb2JDIr5aKn4=
37
+ pl0/I0fTwjgInd3o8lQY3oiF8qY=
38
38
  </data>
39
39
  <key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
40
40
  <data>
41
- RFxOD7WRG4ZJF/qo8cBH6X2bncc=
41
+ 1Vb2U866a0w0XTRJKjUPBKyutls=
42
42
  </data>
43
43
  <key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
44
44
  <data>
@@ -46,11 +46,11 @@
46
46
  </data>
47
47
  <key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key>
48
48
  <data>
49
- RFxOD7WRG4ZJF/qo8cBH6X2bncc=
49
+ 1Vb2U866a0w0XTRJKjUPBKyutls=
50
50
  </data>
51
51
  <key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key>
52
52
  <data>
53
- 6V/SoN//2YBoefDVpdK9Lw+xCH8=
53
+ kPqRg7okrMhKWL9REJ3ZcWd6yY0=
54
54
  </data>
55
55
  <key>Modules/module.modulemap</key>
56
56
  <data>
@@ -63,33 +63,33 @@
63
63
  <dict>
64
64
  <key>hash</key>
65
65
  <data>
66
- Cq2/+FoSpTFizAPA95BJqO2HEO4=
66
+ vgul7Uo5jdjZJrmsj5QJXgOQR0Y=
67
67
  </data>
68
68
  <key>hash2</key>
69
69
  <data>
70
- t5fiJrEqR8SW7z9xaWa46MlnmJeKdV4fS5fYXnvpF3g=
70
+ IiNhallKyMzCJhm/+IYaIIVxx7OUg3USEKNJkaFT6wc=
71
71
  </data>
72
72
  </dict>
73
73
  <key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.abi.json</key>
74
74
  <dict>
75
75
  <key>hash</key>
76
76
  <data>
77
- pT1tr9Tkg2MYUIoUb2JDIr5aKn4=
77
+ pl0/I0fTwjgInd3o8lQY3oiF8qY=
78
78
  </data>
79
79
  <key>hash2</key>
80
80
  <data>
81
- dlgpJrPph32q05ktd0vYpe276Rp27JF7yNzndgLbRuA=
81
+ P1GBd+pLv625GA0UXIYec4OzZ+VqlHHXS3Bmb1OIX/U=
82
82
  </data>
83
83
  </dict>
84
84
  <key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
85
85
  <dict>
86
86
  <key>hash</key>
87
87
  <data>
88
- BBQtRRlb9uS29Pvs8ZiC/ejYm/c=
88
+ 4O+ZELfFqgN6Wieq1IiRQfAtoN4=
89
89
  </data>
90
90
  <key>hash2</key>
91
91
  <data>
92
- R2UhfKEwjBqNPI+69WEj+lzI7tQXs9kZRiOi4soBgRA=
92
+ m6+AXAvSKhaIawhOn0Oa+LfqZr0mwnH+e49WljlXBDQ=
93
93
  </data>
94
94
  </dict>
95
95
  <key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
@@ -107,44 +107,44 @@
107
107
  <dict>
108
108
  <key>hash</key>
109
109
  <data>
110
- BBQtRRlb9uS29Pvs8ZiC/ejYm/c=
110
+ 4O+ZELfFqgN6Wieq1IiRQfAtoN4=
111
111
  </data>
112
112
  <key>hash2</key>
113
113
  <data>
114
- R2UhfKEwjBqNPI+69WEj+lzI7tQXs9kZRiOi4soBgRA=
114
+ m6+AXAvSKhaIawhOn0Oa+LfqZr0mwnH+e49WljlXBDQ=
115
115
  </data>
116
116
  </dict>
117
117
  <key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key>
118
118
  <dict>
119
119
  <key>hash</key>
120
120
  <data>
121
- lP4ma9kPAguDHepQDHgLEDCu4wU=
121
+ p8Tye5WOUNf8BwTNJtr50lW5DXo=
122
122
  </data>
123
123
  <key>hash2</key>
124
124
  <data>
125
- rTFrA66UikTwca3BuP1JExc0xu/P/YEB2CMAVvuDrHU=
125
+ EYvRg97ehw2g2BfyOnAThJMSm8BVlhg7nQaPZh97/kY=
126
126
  </data>
127
127
  </dict>
128
128
  <key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
129
129
  <dict>
130
130
  <key>hash</key>
131
131
  <data>
132
- pT1tr9Tkg2MYUIoUb2JDIr5aKn4=
132
+ pl0/I0fTwjgInd3o8lQY3oiF8qY=
133
133
  </data>
134
134
  <key>hash2</key>
135
135
  <data>
136
- dlgpJrPph32q05ktd0vYpe276Rp27JF7yNzndgLbRuA=
136
+ P1GBd+pLv625GA0UXIYec4OzZ+VqlHHXS3Bmb1OIX/U=
137
137
  </data>
138
138
  </dict>
139
139
  <key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
140
140
  <dict>
141
141
  <key>hash</key>
142
142
  <data>
143
- RFxOD7WRG4ZJF/qo8cBH6X2bncc=
143
+ 1Vb2U866a0w0XTRJKjUPBKyutls=
144
144
  </data>
145
145
  <key>hash2</key>
146
146
  <data>
147
- FYFm7eUeOIDnUGg8CUahSJPJbYr5L5e14px6mvr5ud4=
147
+ xnT9sHQ+AlnAVwienpdc3CibbdtRRl60kSp3a3bXvKw=
148
148
  </data>
149
149
  </dict>
150
150
  <key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
@@ -162,22 +162,22 @@
162
162
  <dict>
163
163
  <key>hash</key>
164
164
  <data>
165
- RFxOD7WRG4ZJF/qo8cBH6X2bncc=
165
+ 1Vb2U866a0w0XTRJKjUPBKyutls=
166
166
  </data>
167
167
  <key>hash2</key>
168
168
  <data>
169
- FYFm7eUeOIDnUGg8CUahSJPJbYr5L5e14px6mvr5ud4=
169
+ xnT9sHQ+AlnAVwienpdc3CibbdtRRl60kSp3a3bXvKw=
170
170
  </data>
171
171
  </dict>
172
172
  <key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key>
173
173
  <dict>
174
174
  <key>hash</key>
175
175
  <data>
176
- 6V/SoN//2YBoefDVpdK9Lw+xCH8=
176
+ kPqRg7okrMhKWL9REJ3ZcWd6yY0=
177
177
  </data>
178
178
  <key>hash2</key>
179
179
  <data>
180
- 8/4yAyv3IZ5U7cBFD7SGrTgMGJskYUh5Ot4AVX4Vlw4=
180
+ pYy++lFgpVUbdIF7GeybSfFxxMk8z7QLMflxejA9h64=
181
181
  </data>
182
182
  </dict>
183
183
  <key>Modules/module.modulemap</key>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-davoice-tts",
3
- "version": "1.0.251",
3
+ "version": "1.0.252",
4
4
  "description": "tts library for React Native",
5
5
  "main": "tts/index.js",
6
6
  "types": "tts/index.d.ts",
package/speech/index.ts CHANGED
@@ -2,6 +2,31 @@
2
2
  import { NativeModules, NativeEventEmitter, DeviceEventEmitter, Platform } from 'react-native';
3
3
  import resolveAssetSource from 'react-native/Libraries/Image/resolveAssetSource';
4
4
 
5
+
6
+ // -------------------- VERBOSE LOGGING --------------------
7
+ const VERBOSE = true;
8
+ const PFX = '[SpeechJS]';
9
+ function ts() {
10
+ const d = new Date();
11
+ return `${d.toISOString()}`;
12
+ }
13
+ function dbg(...args: any[]) {
14
+ if (!VERBOSE) return;
15
+ // eslint-disable-next-line no-console
16
+ console.log(ts(), PFX, ...args);
17
+ }
18
+ function dbgErr(...args: any[]) {
19
+ // eslint-disable-next-line no-console
20
+ console.log(ts(), PFX, '❌', ...args);
21
+ }
22
+ function safeJson(x: any) {
23
+ try {
24
+ return JSON.stringify(x);
25
+ } catch {
26
+ return String(x);
27
+ }
28
+ }
29
+
5
30
  // If you use typed-array -> base64, Buffer is convenient (works in RN)
6
31
  let toBase64: (u8: Uint8Array) => string;
7
32
  try {
@@ -22,6 +47,12 @@ const NativeSTT =
22
47
  NativeModules.RCTVoice;
23
48
  const NativeTTS = NativeModules.DaVoiceTTSBridge;
24
49
 
50
+ // Print what we actually have at module load
51
+ dbg('Platform=', Platform.OS);
52
+ dbg('NativeSpeech (SpeechBridge) exists?', !!NativeSpeech, 'keys=', NativeSpeech ? Object.keys(NativeSpeech) : null);
53
+ dbg('NativeSTT exists?', !!NativeSTT, 'keys=', NativeSTT ? Object.keys(NativeSTT) : null);
54
+ dbg('NativeTTS (DaVoiceTTSBridge) exists?', !!NativeTTS, 'keys=', NativeTTS ? Object.keys(NativeTTS) : null);
55
+
25
56
  // ---- Types ----
26
57
  export type SpeechStartEvent = {};
27
58
  export type SpeechEndEvent = {};
@@ -88,6 +119,11 @@ class Speech {
88
119
  private lastModel: string | null = null;
89
120
  private iosTtsOnly = false; // when true, use NativeTTS directly on iOS
90
121
 
122
+
123
+ private logCall(name: string, payload?: any) {
124
+ dbg(`[CALL ${name}]`, payload !== undefined ? safeJson(payload) : '');
125
+ }
126
+
91
127
  // ✅ NEW: resolve require() assets to a usable URI/path string
92
128
  private resolveModelToPath(model: ModelRef): string {
93
129
  // ✅ Backward compatible: plain strings are passed through unchanged
@@ -95,6 +131,8 @@ class Speech {
95
131
 
96
132
  try {
97
133
  const asset = resolveAssetSource(model);
134
+ dbg('[resolveModelToPath] resolveAssetSource ->', asset);
135
+
98
136
  const uri = asset?.uri;
99
137
  if (uri) return String(uri);
100
138
  } catch {
@@ -120,15 +158,23 @@ class Speech {
120
158
  if (Platform.OS !== 'web') {
121
159
  if (Platform.OS === 'ios' && NativeSpeech) {
122
160
  this.unifiedEmitter = new NativeEventEmitter(NativeSpeech);
161
+ dbg('[constructor] iOS unifiedEmitter created');
123
162
  } else {
124
163
  // Android (and iOS fallback): separate modules
125
- if (NativeSTT) this.sttEmitter = new NativeEventEmitter(NativeSTT);
164
+ if (NativeSTT) {
165
+ this.sttEmitter = new NativeEventEmitter(NativeSTT);
166
+ dbg('[constructor] sttEmitter created');
167
+ }
126
168
  // ANDROID: Native module emits through DeviceEventEmitter
127
169
  if (Platform.OS === 'android') {
128
170
  this.ttsEmitter = DeviceEventEmitter;
171
+ dbg('[constructor] android ttsEmitter=DeviceEventEmitter');
129
172
  } else {
130
173
  // non-unified iOS fallback (if ever used)
131
- if (NativeTTS) this.ttsEmitter = new NativeEventEmitter(NativeTTS);
174
+ if (NativeTTS) {
175
+ this.ttsEmitter = new NativeEventEmitter(NativeTTS);
176
+ dbg('[constructor] iOS fallback ttsEmitter created');
177
+ }
132
178
  }
133
179
  }
134
180
  }
@@ -322,6 +368,20 @@ class Speech {
322
368
 
323
369
  /** Pause mic/STT (Android native; iOS unified if present) */
324
370
  async pauseMicrophone(): Promise<void> {
371
+ console.log('[pauseMicrophone] called');
372
+ this.logCall('pauseMicrophone');
373
+ // iOS: prefer async first, fallback to callback if missing
374
+ if (Platform.OS === 'ios' && (NativeSpeech as any)?.pauseMicrophoneAsync) {
375
+ dbg('IOS [pauseMicrophone] using NativeSpeech.pauseMicrophoneAsync()');
376
+ try {
377
+ await (NativeSpeech as any).pauseMicrophoneAsync();
378
+ dbg('IOS [pauseMicrophone] NativeSpeech.pauseMicrophoneAsync() DONE');
379
+ return;
380
+ } catch (e) {
381
+ dbgErr('IOS [pauseMicrophone] NativeSpeech.pauseMicrophoneAsync() ERROR:', String(e));
382
+ throw e;
383
+ }
384
+ }
325
385
  if (Platform.OS === 'ios' && NativeSpeech?.pauseMicrophone) {
326
386
  console.log('IOS [pauseMicrophone] called');
327
387
  return new Promise((resolve, reject) => {
@@ -329,7 +389,6 @@ class Speech {
329
389
  catch (e) { reject(e as any); }
330
390
  });
331
391
  }
332
- console.log('[pauseMicrophone] called');
333
392
  if (!(NativeSTT as any)?.pauseMicrophone) return Promise.resolve();
334
393
  return new Promise((resolve, reject) => {
335
394
  try { (NativeSTT as any).pauseMicrophone(() => resolve()); }
@@ -339,6 +398,20 @@ class Speech {
339
398
 
340
399
  /** Resume mic/STT (Android native; iOS unified if present) */
341
400
  async unPauseMicrophone(): Promise<void> {
401
+ this.logCall('unPauseMicrophone');
402
+ // iOS: prefer async first, fallback to callback if missing
403
+ if (Platform.OS === 'ios' && (NativeSpeech as any)?.unPauseMicrophoneAsync) {
404
+ dbg('IOS [unPauseMicrophone] using NativeSpeech.unPauseMicrophoneAsync()');
405
+ try {
406
+ await (NativeSpeech as any).unPauseMicrophoneAsync();
407
+ dbg('IOS [unPauseMicrophone] NativeSpeech.unPauseMicrophoneAsync() DONE');
408
+ return;
409
+ } catch (e) {
410
+ dbgErr('IOS [unPauseMicrophone] NativeSpeech.unPauseMicrophoneAsync() ERROR:', String(e));
411
+ throw e;
412
+ }
413
+ }
414
+
342
415
  if (Platform.OS === 'ios' && NativeSpeech?.unPauseMicrophone) {
343
416
  console.log('IOS [unPauseMicrophone] called');
344
417
  return new Promise((resolve, reject) => {