react-native-davoice-tts 1.0.313 → 1.0.315
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 +52 -14
- package/ios/TTSRNBridge/DaVoiceTTSBridge.m +13 -15
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/Info.plist +5 -5
- 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 +1 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.abi.json +81 -11
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.private.swiftinterface +1 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.swiftinterface +1 -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 +2 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.abi.json +81 -11
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +1 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftinterface +1 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.abi.json +81 -11
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +1 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +1 -0
- 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 +21 -6
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.195" # 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
|
+
42672253290af681c13e0c48a8ea05dd tts-1.0.0.aar
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
db50ab0dec3bc798242d72f812bf5d7b4f87ed0d 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).
|
|
@@ -454,21 +462,27 @@ RCT_EXPORT_METHOD(initAll:(NSDictionary *)opts
|
|
|
454
462
|
}
|
|
455
463
|
NSLog(@"[TTS] INIT: modelURL == %@", modelURL);
|
|
456
464
|
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
self.initializing = NO;
|
|
461
|
-
[self.stt destroySpeech:nil];
|
|
462
|
-
self.stt = nil;
|
|
463
|
-
reject(@"tts_init_failed", err.localizedDescription ?: @"TTS init failed", err);
|
|
464
|
-
return;
|
|
465
|
-
}
|
|
465
|
+
dispatch_async(dispatch_get_global_queue(QOS_CLASS_USER_INITIATED, 0), ^{
|
|
466
|
+
NSError *err = nil;
|
|
467
|
+
DaVoiceTTS *tts = [[DaVoiceTTS alloc] initWithModel:modelURL error:&err];
|
|
466
468
|
|
|
467
|
-
|
|
469
|
+
dispatch_async(dispatch_get_main_queue(), ^{
|
|
470
|
+
if (err || !tts) {
|
|
471
|
+
self.initializing = NO;
|
|
472
|
+
[self.stt destroySpeech:nil];
|
|
473
|
+
self.stt = nil;
|
|
474
|
+
reject(@"tts_init_failed", err.localizedDescription ?: @"TTS init failed", err);
|
|
475
|
+
return;
|
|
476
|
+
}
|
|
468
477
|
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
478
|
+
self.tts = tts;
|
|
479
|
+
[self wireTTSFinishedCallback];
|
|
480
|
+
|
|
481
|
+
self.initialized = YES;
|
|
482
|
+
self.initializing = NO;
|
|
483
|
+
resolve(@"initialized");
|
|
484
|
+
});
|
|
485
|
+
});
|
|
472
486
|
});
|
|
473
487
|
}
|
|
474
488
|
|
|
@@ -485,10 +499,34 @@ RCT_EXPORT_METHOD(pauseSpeechRecognitionLite:(RCTResponseSenderBlock)callback)
|
|
|
485
499
|
RCT_EXPORT_METHOD(unPauseSpeechRecognitionLite:(nonnull NSNumber *)times
|
|
486
500
|
callback:(RCTResponseSenderBlock)callback)
|
|
487
501
|
{
|
|
502
|
+
SBLog(@"unPauseSpeechRecognitionLite ENTER times=%@", times);
|
|
488
503
|
// No-op if STT isn't initialized yet (avoid JS error spam).
|
|
489
|
-
if (!self.stt) {
|
|
504
|
+
if (!self.stt) {
|
|
505
|
+
SBLog(@"unPauseSpeechRecognitionLite EXIT no STT instance");
|
|
506
|
+
if (callback) callback(@[@(YES)]);
|
|
507
|
+
return;
|
|
508
|
+
}
|
|
490
509
|
[self.stt unPauseSpeechRecognitionLite:times];
|
|
510
|
+
SBLog(@"unPauseSpeechRecognitionLite AFTER Swift call times=%@", times);
|
|
511
|
+
if (callback) callback(@[@(YES)]);
|
|
512
|
+
SBLog(@"unPauseSpeechRecognitionLite CALLBACK fired times=%@", times);
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
RCT_EXPORT_METHOD(unPauseSpeechRecognitionLiteWithPreFetch:(nonnull NSNumber *)times
|
|
516
|
+
preFetchMs:(nonnull NSNumber *)preFetch
|
|
517
|
+
callback:(RCTResponseSenderBlock)callback)
|
|
518
|
+
{
|
|
519
|
+
SBLog(@"unPauseSpeechRecognitionLiteWithPreFetch ENTER times=%@ preFetchMs=%@", times, preFetch);
|
|
520
|
+
// No-op if STT isn't initialized yet (avoid JS error spam).
|
|
521
|
+
if (!self.stt) {
|
|
522
|
+
SBLog(@"unPauseSpeechRecognitionLiteWithPreFetch EXIT no STT instance");
|
|
523
|
+
if (callback) callback(@[@(YES)]);
|
|
524
|
+
return;
|
|
525
|
+
}
|
|
526
|
+
[self.stt unPauseSpeechRecognitionLite:times preFetch:preFetch];
|
|
527
|
+
SBLog(@"unPauseSpeechRecognitionLiteWithPreFetch AFTER Swift call times=%@ preFetchMs=%@", times, preFetch);
|
|
491
528
|
if (callback) callback(@[@(YES)]);
|
|
529
|
+
SBLog(@"unPauseSpeechRecognitionLiteWithPreFetch CALLBACK fired times=%@ preFetchMs=%@", times, preFetch);
|
|
492
530
|
}
|
|
493
531
|
|
|
494
532
|
// Promise-based pause that resolves ONLY when iOS is actually settled in playback (mic released)
|
|
@@ -101,24 +101,21 @@ RCT_EXPORT_METHOD(initTTS:(NSDictionary *)configDict
|
|
|
101
101
|
|
|
102
102
|
NSURL *modelURL = [NSURL fileURLWithPath:modelPath];
|
|
103
103
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
104
|
+
dispatch_async(dispatch_get_global_queue(QOS_CLASS_USER_INITIATED, 0), ^{
|
|
105
|
+
NSError *error = nil;
|
|
106
|
+
DaVoiceTTS *tts = [[DaVoiceTTS alloc] initWithModel:modelURL error:&error];
|
|
107
|
+
if (error || !tts) {
|
|
108
|
+
reject(@"init_failed", error.localizedDescription ?: @"Failed to initialize", error);
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
dispatch_async(dispatch_get_main_queue(), ^{
|
|
113
|
+
self.ttsInstance = tts;
|
|
113
114
|
|
|
114
115
|
__weak typeof(self) weakSelf = self;
|
|
115
|
-
// Bridge Swift callback -> RN event
|
|
116
116
|
self.ttsInstance.onLastUtteranceFinished = ^{
|
|
117
117
|
__strong typeof(weakSelf) strongSelf = weakSelf;
|
|
118
|
-
if (!strongSelf) return;
|
|
119
|
-
if (!strongSelf.hasListeners) return;
|
|
120
|
-
|
|
121
|
-
// Send on main just to be extra safe for JS listeners doing UI work.
|
|
118
|
+
if (!strongSelf || !strongSelf.hasListeners) return;
|
|
122
119
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
123
120
|
[strongSelf sendEventWithName:@"onFinishedSpeaking" body:@{}];
|
|
124
121
|
});
|
|
@@ -126,7 +123,8 @@ RCT_EXPORT_METHOD(initTTS:(NSDictionary *)configDict
|
|
|
126
123
|
|
|
127
124
|
resolve(@"TTS initialized");
|
|
128
125
|
});
|
|
129
|
-
}
|
|
126
|
+
});
|
|
127
|
+
}
|
|
130
128
|
|
|
131
129
|
RCT_EXPORT_METHOD(speak:(NSString *)text
|
|
132
130
|
speakerId:(nonnull NSNumber *)speakerId
|
|
@@ -8,32 +8,32 @@
|
|
|
8
8
|
<key>BinaryPath</key>
|
|
9
9
|
<string>DavoiceTTS.framework/DavoiceTTS</string>
|
|
10
10
|
<key>LibraryIdentifier</key>
|
|
11
|
-
<string>ios-
|
|
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-
|
|
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>
|
|
Binary file
|
|
@@ -362,6 +362,7 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSArray<NSStri
|
|
|
362
362
|
- (BOOL)setLicenseWithLicenseKey:(NSString * _Nonnull)licenseKey SWIFT_WARN_UNUSED_RESULT;
|
|
363
363
|
- (void)pauseSpeechRecognitionLite;
|
|
364
364
|
- (void)unPauseSpeechRecognitionLite:(NSNumber * _Nonnull)times;
|
|
365
|
+
- (void)unPauseSpeechRecognitionLite:(NSNumber * _Nonnull)times preFetch:(NSNumber * _Nonnull)preFetch;
|
|
365
366
|
- (void)pauseMicrophoneAndWait:(NSNumber * _Nonnull)timeoutMs completion:(void (^ _Nonnull)(BOOL, NSString * _Nullable))completion;
|
|
366
367
|
- (void)unPauseMicrophoneAndWait:(NSNumber * _Nonnull)timeoutMs completion:(void (^ _Nonnull)(BOOL, NSString * _Nullable))completion;
|
|
367
368
|
- (void)pauseMicrophone;
|
|
@@ -7233,6 +7233,41 @@
|
|
|
7233
7233
|
],
|
|
7234
7234
|
"funcSelfKind": "NonMutating"
|
|
7235
7235
|
},
|
|
7236
|
+
{
|
|
7237
|
+
"kind": "Function",
|
|
7238
|
+
"name": "unPauseSpeechRecognitionLite",
|
|
7239
|
+
"printedName": "unPauseSpeechRecognitionLite(_:preFetch:)",
|
|
7240
|
+
"children": [
|
|
7241
|
+
{
|
|
7242
|
+
"kind": "TypeNominal",
|
|
7243
|
+
"name": "Void",
|
|
7244
|
+
"printedName": "()"
|
|
7245
|
+
},
|
|
7246
|
+
{
|
|
7247
|
+
"kind": "TypeNominal",
|
|
7248
|
+
"name": "NSNumber",
|
|
7249
|
+
"printedName": "Foundation.NSNumber",
|
|
7250
|
+
"usr": "c:objc(cs)NSNumber"
|
|
7251
|
+
},
|
|
7252
|
+
{
|
|
7253
|
+
"kind": "TypeNominal",
|
|
7254
|
+
"name": "NSNumber",
|
|
7255
|
+
"printedName": "Foundation.NSNumber",
|
|
7256
|
+
"usr": "c:objc(cs)NSNumber"
|
|
7257
|
+
}
|
|
7258
|
+
],
|
|
7259
|
+
"declKind": "Func",
|
|
7260
|
+
"usr": "c:@M@DavoiceTTS@objc(cs)STT(im)unPauseSpeechRecognitionLite:preFetch:",
|
|
7261
|
+
"mangledName": "$s10DavoiceTTS3STTC28unPauseSpeechRecognitionLite_8preFetchySo8NSNumberC_AGtF",
|
|
7262
|
+
"moduleName": "DavoiceTTS",
|
|
7263
|
+
"objc_name": "unPauseSpeechRecognitionLite:preFetch:",
|
|
7264
|
+
"declAttributes": [
|
|
7265
|
+
"Final",
|
|
7266
|
+
"AccessControl",
|
|
7267
|
+
"ObjC"
|
|
7268
|
+
],
|
|
7269
|
+
"funcSelfKind": "NonMutating"
|
|
7270
|
+
},
|
|
7236
7271
|
{
|
|
7237
7272
|
"kind": "Function",
|
|
7238
7273
|
"name": "pauseMicrophoneAndWait",
|
|
@@ -11537,77 +11572,112 @@
|
|
|
11537
11572
|
{
|
|
11538
11573
|
"filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
|
|
11539
11574
|
"kind": "Array",
|
|
11540
|
-
"offset":
|
|
11575
|
+
"offset": 9181,
|
|
11576
|
+
"length": 2,
|
|
11577
|
+
"value": "[]"
|
|
11578
|
+
},
|
|
11579
|
+
{
|
|
11580
|
+
"filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
|
|
11581
|
+
"kind": "IntegerLiteral",
|
|
11582
|
+
"offset": 9230,
|
|
11583
|
+
"length": 1,
|
|
11584
|
+
"value": "0"
|
|
11585
|
+
},
|
|
11586
|
+
{
|
|
11587
|
+
"filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
|
|
11588
|
+
"kind": "IntegerLiteral",
|
|
11589
|
+
"offset": 9281,
|
|
11590
|
+
"length": 1,
|
|
11591
|
+
"value": "0"
|
|
11592
|
+
},
|
|
11593
|
+
{
|
|
11594
|
+
"filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
|
|
11595
|
+
"kind": "IntegerLiteral",
|
|
11596
|
+
"offset": 9336,
|
|
11597
|
+
"length": 1,
|
|
11598
|
+
"value": "0"
|
|
11599
|
+
},
|
|
11600
|
+
{
|
|
11601
|
+
"filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
|
|
11602
|
+
"kind": "IntegerLiteral",
|
|
11603
|
+
"offset": 9387,
|
|
11604
|
+
"length": 1,
|
|
11605
|
+
"value": "0"
|
|
11606
|
+
},
|
|
11607
|
+
{
|
|
11608
|
+
"filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
|
|
11609
|
+
"kind": "Array",
|
|
11610
|
+
"offset": 14861,
|
|
11541
11611
|
"length": 203,
|
|
11542
11612
|
"value": "[\"onSpeechResults\", \"onSpeechStart\", \"onSpeechPartialResults\", \"onSpeechError\", \"onSpeechEnd\", \"onSpeechRecognized\", \"onSpeechVolumeChanged\"]"
|
|
11543
11613
|
},
|
|
11544
11614
|
{
|
|
11545
11615
|
"filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
|
|
11546
11616
|
"kind": "IntegerLiteral",
|
|
11547
|
-
"offset":
|
|
11617
|
+
"offset": 32624,
|
|
11548
11618
|
"length": 1,
|
|
11549
11619
|
"value": "0"
|
|
11550
11620
|
},
|
|
11551
11621
|
{
|
|
11552
11622
|
"filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
|
|
11553
11623
|
"kind": "BooleanLiteral",
|
|
11554
|
-
"offset":
|
|
11624
|
+
"offset": 32784,
|
|
11555
11625
|
"length": 5,
|
|
11556
11626
|
"value": "false"
|
|
11557
11627
|
},
|
|
11558
11628
|
{
|
|
11559
11629
|
"filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
|
|
11560
11630
|
"kind": "BooleanLiteral",
|
|
11561
|
-
"offset":
|
|
11631
|
+
"offset": 34332,
|
|
11562
11632
|
"length": 4,
|
|
11563
11633
|
"value": "true"
|
|
11564
11634
|
},
|
|
11565
11635
|
{
|
|
11566
11636
|
"filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
|
|
11567
11637
|
"kind": "IntegerLiteral",
|
|
11568
|
-
"offset":
|
|
11638
|
+
"offset": 35129,
|
|
11569
11639
|
"length": 1,
|
|
11570
11640
|
"value": "0"
|
|
11571
11641
|
},
|
|
11572
11642
|
{
|
|
11573
11643
|
"filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
|
|
11574
11644
|
"kind": "BooleanLiteral",
|
|
11575
|
-
"offset":
|
|
11645
|
+
"offset": 45643,
|
|
11576
11646
|
"length": 4,
|
|
11577
11647
|
"value": "true"
|
|
11578
11648
|
},
|
|
11579
11649
|
{
|
|
11580
11650
|
"filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
|
|
11581
11651
|
"kind": "BooleanLiteral",
|
|
11582
|
-
"offset":
|
|
11652
|
+
"offset": 54556,
|
|
11583
11653
|
"length": 4,
|
|
11584
11654
|
"value": "true"
|
|
11585
11655
|
},
|
|
11586
11656
|
{
|
|
11587
11657
|
"filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
|
|
11588
11658
|
"kind": "IntegerLiteral",
|
|
11589
|
-
"offset":
|
|
11659
|
+
"offset": 55834,
|
|
11590
11660
|
"length": 1,
|
|
11591
11661
|
"value": "3"
|
|
11592
11662
|
},
|
|
11593
11663
|
{
|
|
11594
11664
|
"filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
|
|
11595
11665
|
"kind": "FloatLiteral",
|
|
11596
|
-
"offset":
|
|
11666
|
+
"offset": 55906,
|
|
11597
11667
|
"length": 4,
|
|
11598
11668
|
"value": "0.20"
|
|
11599
11669
|
},
|
|
11600
11670
|
{
|
|
11601
11671
|
"filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
|
|
11602
11672
|
"kind": "BooleanLiteral",
|
|
11603
|
-
"offset":
|
|
11673
|
+
"offset": 69421,
|
|
11604
11674
|
"length": 5,
|
|
11605
11675
|
"value": "false"
|
|
11606
11676
|
},
|
|
11607
11677
|
{
|
|
11608
11678
|
"filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
|
|
11609
11679
|
"kind": "FloatLiteral",
|
|
11610
|
-
"offset":
|
|
11680
|
+
"offset": 84346,
|
|
11611
11681
|
"length": 3,
|
|
11612
11682
|
"value": "0.7"
|
|
11613
11683
|
},
|
|
@@ -152,6 +152,7 @@ public enum SpeakerVerificationError : Swift.Error, Swift.CustomStringConvertibl
|
|
|
152
152
|
@objc final public func setLicense(licenseKey: Swift.String) -> Swift.Bool
|
|
153
153
|
@objc final public func pauseSpeechRecognitionLite()
|
|
154
154
|
@objc final public func unPauseSpeechRecognitionLite(_ times: Foundation.NSNumber)
|
|
155
|
+
@objc(unPauseSpeechRecognitionLite:preFetch:) final public func unPauseSpeechRecognitionLite(_ times: Foundation.NSNumber, preFetch: Foundation.NSNumber)
|
|
155
156
|
@objc final public func pauseMicrophoneAndWait(_ timeoutMs: Foundation.NSNumber, completion: @escaping (Swift.Bool, Swift.String?) -> Swift.Void)
|
|
156
157
|
@objc final public func unPauseMicrophoneAndWait(_ timeoutMs: Foundation.NSNumber, completion: @escaping (Swift.Bool, Swift.String?) -> Swift.Void)
|
|
157
158
|
@objc final public func pauseMicrophone()
|
|
@@ -152,6 +152,7 @@ public enum SpeakerVerificationError : Swift.Error, Swift.CustomStringConvertibl
|
|
|
152
152
|
@objc final public func setLicense(licenseKey: Swift.String) -> Swift.Bool
|
|
153
153
|
@objc final public func pauseSpeechRecognitionLite()
|
|
154
154
|
@objc final public func unPauseSpeechRecognitionLite(_ times: Foundation.NSNumber)
|
|
155
|
+
@objc(unPauseSpeechRecognitionLite:preFetch:) final public func unPauseSpeechRecognitionLite(_ times: Foundation.NSNumber, preFetch: Foundation.NSNumber)
|
|
155
156
|
@objc final public func pauseMicrophoneAndWait(_ timeoutMs: Foundation.NSNumber, completion: @escaping (Swift.Bool, Swift.String?) -> Swift.Void)
|
|
156
157
|
@objc final public func unPauseMicrophoneAndWait(_ timeoutMs: Foundation.NSNumber, completion: @escaping (Swift.Bool, Swift.String?) -> Swift.Void)
|
|
157
158
|
@objc final public func pauseMicrophone()
|
|
Binary file
|
|
@@ -362,6 +362,7 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSArray<NSStri
|
|
|
362
362
|
- (BOOL)setLicenseWithLicenseKey:(NSString * _Nonnull)licenseKey SWIFT_WARN_UNUSED_RESULT;
|
|
363
363
|
- (void)pauseSpeechRecognitionLite;
|
|
364
364
|
- (void)unPauseSpeechRecognitionLite:(NSNumber * _Nonnull)times;
|
|
365
|
+
- (void)unPauseSpeechRecognitionLite:(NSNumber * _Nonnull)times preFetch:(NSNumber * _Nonnull)preFetch;
|
|
365
366
|
- (void)pauseMicrophoneAndWait:(NSNumber * _Nonnull)timeoutMs completion:(void (^ _Nonnull)(BOOL, NSString * _Nullable))completion;
|
|
366
367
|
- (void)unPauseMicrophoneAndWait:(NSNumber * _Nonnull)timeoutMs completion:(void (^ _Nonnull)(BOOL, NSString * _Nullable))completion;
|
|
367
368
|
- (void)pauseMicrophone;
|
|
@@ -782,6 +783,7 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSArray<NSStri
|
|
|
782
783
|
- (BOOL)setLicenseWithLicenseKey:(NSString * _Nonnull)licenseKey SWIFT_WARN_UNUSED_RESULT;
|
|
783
784
|
- (void)pauseSpeechRecognitionLite;
|
|
784
785
|
- (void)unPauseSpeechRecognitionLite:(NSNumber * _Nonnull)times;
|
|
786
|
+
- (void)unPauseSpeechRecognitionLite:(NSNumber * _Nonnull)times preFetch:(NSNumber * _Nonnull)preFetch;
|
|
785
787
|
- (void)pauseMicrophoneAndWait:(NSNumber * _Nonnull)timeoutMs completion:(void (^ _Nonnull)(BOOL, NSString * _Nullable))completion;
|
|
786
788
|
- (void)unPauseMicrophoneAndWait:(NSNumber * _Nonnull)timeoutMs completion:(void (^ _Nonnull)(BOOL, NSString * _Nullable))completion;
|
|
787
789
|
- (void)pauseMicrophone;
|
|
@@ -1307,6 +1307,41 @@
|
|
|
1307
1307
|
],
|
|
1308
1308
|
"funcSelfKind": "NonMutating"
|
|
1309
1309
|
},
|
|
1310
|
+
{
|
|
1311
|
+
"kind": "Function",
|
|
1312
|
+
"name": "unPauseSpeechRecognitionLite",
|
|
1313
|
+
"printedName": "unPauseSpeechRecognitionLite(_:preFetch:)",
|
|
1314
|
+
"children": [
|
|
1315
|
+
{
|
|
1316
|
+
"kind": "TypeNominal",
|
|
1317
|
+
"name": "Void",
|
|
1318
|
+
"printedName": "()"
|
|
1319
|
+
},
|
|
1320
|
+
{
|
|
1321
|
+
"kind": "TypeNominal",
|
|
1322
|
+
"name": "NSNumber",
|
|
1323
|
+
"printedName": "Foundation.NSNumber",
|
|
1324
|
+
"usr": "c:objc(cs)NSNumber"
|
|
1325
|
+
},
|
|
1326
|
+
{
|
|
1327
|
+
"kind": "TypeNominal",
|
|
1328
|
+
"name": "NSNumber",
|
|
1329
|
+
"printedName": "Foundation.NSNumber",
|
|
1330
|
+
"usr": "c:objc(cs)NSNumber"
|
|
1331
|
+
}
|
|
1332
|
+
],
|
|
1333
|
+
"declKind": "Func",
|
|
1334
|
+
"usr": "c:@M@DavoiceTTS@objc(cs)STT(im)unPauseSpeechRecognitionLite:preFetch:",
|
|
1335
|
+
"mangledName": "$s10DavoiceTTS3STTC28unPauseSpeechRecognitionLite_8preFetchySo8NSNumberC_AGtF",
|
|
1336
|
+
"moduleName": "DavoiceTTS",
|
|
1337
|
+
"objc_name": "unPauseSpeechRecognitionLite:preFetch:",
|
|
1338
|
+
"declAttributes": [
|
|
1339
|
+
"Final",
|
|
1340
|
+
"AccessControl",
|
|
1341
|
+
"ObjC"
|
|
1342
|
+
],
|
|
1343
|
+
"funcSelfKind": "NonMutating"
|
|
1344
|
+
},
|
|
1310
1345
|
{
|
|
1311
1346
|
"kind": "Function",
|
|
1312
1347
|
"name": "pauseMicrophoneAndWait",
|
|
@@ -10466,77 +10501,112 @@
|
|
|
10466
10501
|
{
|
|
10467
10502
|
"filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
|
|
10468
10503
|
"kind": "Array",
|
|
10469
|
-
"offset":
|
|
10504
|
+
"offset": 9181,
|
|
10505
|
+
"length": 2,
|
|
10506
|
+
"value": "[]"
|
|
10507
|
+
},
|
|
10508
|
+
{
|
|
10509
|
+
"filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
|
|
10510
|
+
"kind": "IntegerLiteral",
|
|
10511
|
+
"offset": 9230,
|
|
10512
|
+
"length": 1,
|
|
10513
|
+
"value": "0"
|
|
10514
|
+
},
|
|
10515
|
+
{
|
|
10516
|
+
"filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
|
|
10517
|
+
"kind": "IntegerLiteral",
|
|
10518
|
+
"offset": 9281,
|
|
10519
|
+
"length": 1,
|
|
10520
|
+
"value": "0"
|
|
10521
|
+
},
|
|
10522
|
+
{
|
|
10523
|
+
"filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
|
|
10524
|
+
"kind": "IntegerLiteral",
|
|
10525
|
+
"offset": 9336,
|
|
10526
|
+
"length": 1,
|
|
10527
|
+
"value": "0"
|
|
10528
|
+
},
|
|
10529
|
+
{
|
|
10530
|
+
"filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
|
|
10531
|
+
"kind": "IntegerLiteral",
|
|
10532
|
+
"offset": 9387,
|
|
10533
|
+
"length": 1,
|
|
10534
|
+
"value": "0"
|
|
10535
|
+
},
|
|
10536
|
+
{
|
|
10537
|
+
"filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
|
|
10538
|
+
"kind": "Array",
|
|
10539
|
+
"offset": 14861,
|
|
10470
10540
|
"length": 203,
|
|
10471
10541
|
"value": "[\"onSpeechResults\", \"onSpeechStart\", \"onSpeechPartialResults\", \"onSpeechError\", \"onSpeechEnd\", \"onSpeechRecognized\", \"onSpeechVolumeChanged\"]"
|
|
10472
10542
|
},
|
|
10473
10543
|
{
|
|
10474
10544
|
"filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
|
|
10475
10545
|
"kind": "IntegerLiteral",
|
|
10476
|
-
"offset":
|
|
10546
|
+
"offset": 32624,
|
|
10477
10547
|
"length": 1,
|
|
10478
10548
|
"value": "0"
|
|
10479
10549
|
},
|
|
10480
10550
|
{
|
|
10481
10551
|
"filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
|
|
10482
10552
|
"kind": "BooleanLiteral",
|
|
10483
|
-
"offset":
|
|
10553
|
+
"offset": 32784,
|
|
10484
10554
|
"length": 5,
|
|
10485
10555
|
"value": "false"
|
|
10486
10556
|
},
|
|
10487
10557
|
{
|
|
10488
10558
|
"filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
|
|
10489
10559
|
"kind": "BooleanLiteral",
|
|
10490
|
-
"offset":
|
|
10560
|
+
"offset": 34332,
|
|
10491
10561
|
"length": 4,
|
|
10492
10562
|
"value": "true"
|
|
10493
10563
|
},
|
|
10494
10564
|
{
|
|
10495
10565
|
"filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
|
|
10496
10566
|
"kind": "IntegerLiteral",
|
|
10497
|
-
"offset":
|
|
10567
|
+
"offset": 35129,
|
|
10498
10568
|
"length": 1,
|
|
10499
10569
|
"value": "0"
|
|
10500
10570
|
},
|
|
10501
10571
|
{
|
|
10502
10572
|
"filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
|
|
10503
10573
|
"kind": "BooleanLiteral",
|
|
10504
|
-
"offset":
|
|
10574
|
+
"offset": 45643,
|
|
10505
10575
|
"length": 4,
|
|
10506
10576
|
"value": "true"
|
|
10507
10577
|
},
|
|
10508
10578
|
{
|
|
10509
10579
|
"filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
|
|
10510
10580
|
"kind": "BooleanLiteral",
|
|
10511
|
-
"offset":
|
|
10581
|
+
"offset": 54556,
|
|
10512
10582
|
"length": 4,
|
|
10513
10583
|
"value": "true"
|
|
10514
10584
|
},
|
|
10515
10585
|
{
|
|
10516
10586
|
"filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
|
|
10517
10587
|
"kind": "IntegerLiteral",
|
|
10518
|
-
"offset":
|
|
10588
|
+
"offset": 55834,
|
|
10519
10589
|
"length": 1,
|
|
10520
10590
|
"value": "3"
|
|
10521
10591
|
},
|
|
10522
10592
|
{
|
|
10523
10593
|
"filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
|
|
10524
10594
|
"kind": "FloatLiteral",
|
|
10525
|
-
"offset":
|
|
10595
|
+
"offset": 55906,
|
|
10526
10596
|
"length": 4,
|
|
10527
10597
|
"value": "0.20"
|
|
10528
10598
|
},
|
|
10529
10599
|
{
|
|
10530
10600
|
"filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
|
|
10531
10601
|
"kind": "BooleanLiteral",
|
|
10532
|
-
"offset":
|
|
10602
|
+
"offset": 69421,
|
|
10533
10603
|
"length": 5,
|
|
10534
10604
|
"value": "false"
|
|
10535
10605
|
},
|
|
10536
10606
|
{
|
|
10537
10607
|
"filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
|
|
10538
10608
|
"kind": "FloatLiteral",
|
|
10539
|
-
"offset":
|
|
10609
|
+
"offset": 84346,
|
|
10540
10610
|
"length": 3,
|
|
10541
10611
|
"value": "0.7"
|
|
10542
10612
|
},
|
|
@@ -33,6 +33,7 @@ import phonemes
|
|
|
33
33
|
@objc final public func setLicense(licenseKey: Swift.String) -> Swift.Bool
|
|
34
34
|
@objc final public func pauseSpeechRecognitionLite()
|
|
35
35
|
@objc final public func unPauseSpeechRecognitionLite(_ times: Foundation.NSNumber)
|
|
36
|
+
@objc(unPauseSpeechRecognitionLite:preFetch:) final public func unPauseSpeechRecognitionLite(_ times: Foundation.NSNumber, preFetch: Foundation.NSNumber)
|
|
36
37
|
@objc final public func pauseMicrophoneAndWait(_ timeoutMs: Foundation.NSNumber, completion: @escaping (Swift.Bool, Swift.String?) -> Swift.Void)
|
|
37
38
|
@objc final public func unPauseMicrophoneAndWait(_ timeoutMs: Foundation.NSNumber, completion: @escaping (Swift.Bool, Swift.String?) -> Swift.Void)
|
|
38
39
|
@objc final public func pauseMicrophone()
|
|
@@ -33,6 +33,7 @@ import phonemes
|
|
|
33
33
|
@objc final public func setLicense(licenseKey: Swift.String) -> Swift.Bool
|
|
34
34
|
@objc final public func pauseSpeechRecognitionLite()
|
|
35
35
|
@objc final public func unPauseSpeechRecognitionLite(_ times: Foundation.NSNumber)
|
|
36
|
+
@objc(unPauseSpeechRecognitionLite:preFetch:) final public func unPauseSpeechRecognitionLite(_ times: Foundation.NSNumber, preFetch: Foundation.NSNumber)
|
|
36
37
|
@objc final public func pauseMicrophoneAndWait(_ timeoutMs: Foundation.NSNumber, completion: @escaping (Swift.Bool, Swift.String?) -> Swift.Void)
|
|
37
38
|
@objc final public func unPauseMicrophoneAndWait(_ timeoutMs: Foundation.NSNumber, completion: @escaping (Swift.Bool, Swift.String?) -> Swift.Void)
|
|
38
39
|
@objc final public func pauseMicrophone()
|
|
@@ -1307,6 +1307,41 @@
|
|
|
1307
1307
|
],
|
|
1308
1308
|
"funcSelfKind": "NonMutating"
|
|
1309
1309
|
},
|
|
1310
|
+
{
|
|
1311
|
+
"kind": "Function",
|
|
1312
|
+
"name": "unPauseSpeechRecognitionLite",
|
|
1313
|
+
"printedName": "unPauseSpeechRecognitionLite(_:preFetch:)",
|
|
1314
|
+
"children": [
|
|
1315
|
+
{
|
|
1316
|
+
"kind": "TypeNominal",
|
|
1317
|
+
"name": "Void",
|
|
1318
|
+
"printedName": "()"
|
|
1319
|
+
},
|
|
1320
|
+
{
|
|
1321
|
+
"kind": "TypeNominal",
|
|
1322
|
+
"name": "NSNumber",
|
|
1323
|
+
"printedName": "Foundation.NSNumber",
|
|
1324
|
+
"usr": "c:objc(cs)NSNumber"
|
|
1325
|
+
},
|
|
1326
|
+
{
|
|
1327
|
+
"kind": "TypeNominal",
|
|
1328
|
+
"name": "NSNumber",
|
|
1329
|
+
"printedName": "Foundation.NSNumber",
|
|
1330
|
+
"usr": "c:objc(cs)NSNumber"
|
|
1331
|
+
}
|
|
1332
|
+
],
|
|
1333
|
+
"declKind": "Func",
|
|
1334
|
+
"usr": "c:@M@DavoiceTTS@objc(cs)STT(im)unPauseSpeechRecognitionLite:preFetch:",
|
|
1335
|
+
"mangledName": "$s10DavoiceTTS3STTC28unPauseSpeechRecognitionLite_8preFetchySo8NSNumberC_AGtF",
|
|
1336
|
+
"moduleName": "DavoiceTTS",
|
|
1337
|
+
"objc_name": "unPauseSpeechRecognitionLite:preFetch:",
|
|
1338
|
+
"declAttributes": [
|
|
1339
|
+
"Final",
|
|
1340
|
+
"AccessControl",
|
|
1341
|
+
"ObjC"
|
|
1342
|
+
],
|
|
1343
|
+
"funcSelfKind": "NonMutating"
|
|
1344
|
+
},
|
|
1310
1345
|
{
|
|
1311
1346
|
"kind": "Function",
|
|
1312
1347
|
"name": "pauseMicrophoneAndWait",
|
|
@@ -10466,77 +10501,112 @@
|
|
|
10466
10501
|
{
|
|
10467
10502
|
"filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
|
|
10468
10503
|
"kind": "Array",
|
|
10469
|
-
"offset":
|
|
10504
|
+
"offset": 9181,
|
|
10505
|
+
"length": 2,
|
|
10506
|
+
"value": "[]"
|
|
10507
|
+
},
|
|
10508
|
+
{
|
|
10509
|
+
"filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
|
|
10510
|
+
"kind": "IntegerLiteral",
|
|
10511
|
+
"offset": 9230,
|
|
10512
|
+
"length": 1,
|
|
10513
|
+
"value": "0"
|
|
10514
|
+
},
|
|
10515
|
+
{
|
|
10516
|
+
"filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
|
|
10517
|
+
"kind": "IntegerLiteral",
|
|
10518
|
+
"offset": 9281,
|
|
10519
|
+
"length": 1,
|
|
10520
|
+
"value": "0"
|
|
10521
|
+
},
|
|
10522
|
+
{
|
|
10523
|
+
"filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
|
|
10524
|
+
"kind": "IntegerLiteral",
|
|
10525
|
+
"offset": 9336,
|
|
10526
|
+
"length": 1,
|
|
10527
|
+
"value": "0"
|
|
10528
|
+
},
|
|
10529
|
+
{
|
|
10530
|
+
"filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
|
|
10531
|
+
"kind": "IntegerLiteral",
|
|
10532
|
+
"offset": 9387,
|
|
10533
|
+
"length": 1,
|
|
10534
|
+
"value": "0"
|
|
10535
|
+
},
|
|
10536
|
+
{
|
|
10537
|
+
"filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
|
|
10538
|
+
"kind": "Array",
|
|
10539
|
+
"offset": 14861,
|
|
10470
10540
|
"length": 203,
|
|
10471
10541
|
"value": "[\"onSpeechResults\", \"onSpeechStart\", \"onSpeechPartialResults\", \"onSpeechError\", \"onSpeechEnd\", \"onSpeechRecognized\", \"onSpeechVolumeChanged\"]"
|
|
10472
10542
|
},
|
|
10473
10543
|
{
|
|
10474
10544
|
"filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
|
|
10475
10545
|
"kind": "IntegerLiteral",
|
|
10476
|
-
"offset":
|
|
10546
|
+
"offset": 32624,
|
|
10477
10547
|
"length": 1,
|
|
10478
10548
|
"value": "0"
|
|
10479
10549
|
},
|
|
10480
10550
|
{
|
|
10481
10551
|
"filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
|
|
10482
10552
|
"kind": "BooleanLiteral",
|
|
10483
|
-
"offset":
|
|
10553
|
+
"offset": 32784,
|
|
10484
10554
|
"length": 5,
|
|
10485
10555
|
"value": "false"
|
|
10486
10556
|
},
|
|
10487
10557
|
{
|
|
10488
10558
|
"filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
|
|
10489
10559
|
"kind": "BooleanLiteral",
|
|
10490
|
-
"offset":
|
|
10560
|
+
"offset": 34332,
|
|
10491
10561
|
"length": 4,
|
|
10492
10562
|
"value": "true"
|
|
10493
10563
|
},
|
|
10494
10564
|
{
|
|
10495
10565
|
"filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
|
|
10496
10566
|
"kind": "IntegerLiteral",
|
|
10497
|
-
"offset":
|
|
10567
|
+
"offset": 35129,
|
|
10498
10568
|
"length": 1,
|
|
10499
10569
|
"value": "0"
|
|
10500
10570
|
},
|
|
10501
10571
|
{
|
|
10502
10572
|
"filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
|
|
10503
10573
|
"kind": "BooleanLiteral",
|
|
10504
|
-
"offset":
|
|
10574
|
+
"offset": 45643,
|
|
10505
10575
|
"length": 4,
|
|
10506
10576
|
"value": "true"
|
|
10507
10577
|
},
|
|
10508
10578
|
{
|
|
10509
10579
|
"filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
|
|
10510
10580
|
"kind": "BooleanLiteral",
|
|
10511
|
-
"offset":
|
|
10581
|
+
"offset": 54556,
|
|
10512
10582
|
"length": 4,
|
|
10513
10583
|
"value": "true"
|
|
10514
10584
|
},
|
|
10515
10585
|
{
|
|
10516
10586
|
"filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
|
|
10517
10587
|
"kind": "IntegerLiteral",
|
|
10518
|
-
"offset":
|
|
10588
|
+
"offset": 55834,
|
|
10519
10589
|
"length": 1,
|
|
10520
10590
|
"value": "3"
|
|
10521
10591
|
},
|
|
10522
10592
|
{
|
|
10523
10593
|
"filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
|
|
10524
10594
|
"kind": "FloatLiteral",
|
|
10525
|
-
"offset":
|
|
10595
|
+
"offset": 55906,
|
|
10526
10596
|
"length": 4,
|
|
10527
10597
|
"value": "0.20"
|
|
10528
10598
|
},
|
|
10529
10599
|
{
|
|
10530
10600
|
"filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
|
|
10531
10601
|
"kind": "BooleanLiteral",
|
|
10532
|
-
"offset":
|
|
10602
|
+
"offset": 69421,
|
|
10533
10603
|
"length": 5,
|
|
10534
10604
|
"value": "false"
|
|
10535
10605
|
},
|
|
10536
10606
|
{
|
|
10537
10607
|
"filePath": "\/Volumes\/T9\/projects\/DavoiceTTSPrivate\/Sources\/DaVoiceSTT.swift",
|
|
10538
10608
|
"kind": "FloatLiteral",
|
|
10539
|
-
"offset":
|
|
10609
|
+
"offset": 84346,
|
|
10540
10610
|
"length": 3,
|
|
10541
10611
|
"value": "0.7"
|
|
10542
10612
|
},
|
|
@@ -33,6 +33,7 @@ import phonemes
|
|
|
33
33
|
@objc final public func setLicense(licenseKey: Swift.String) -> Swift.Bool
|
|
34
34
|
@objc final public func pauseSpeechRecognitionLite()
|
|
35
35
|
@objc final public func unPauseSpeechRecognitionLite(_ times: Foundation.NSNumber)
|
|
36
|
+
@objc(unPauseSpeechRecognitionLite:preFetch:) final public func unPauseSpeechRecognitionLite(_ times: Foundation.NSNumber, preFetch: Foundation.NSNumber)
|
|
36
37
|
@objc final public func pauseMicrophoneAndWait(_ timeoutMs: Foundation.NSNumber, completion: @escaping (Swift.Bool, Swift.String?) -> Swift.Void)
|
|
37
38
|
@objc final public func unPauseMicrophoneAndWait(_ timeoutMs: Foundation.NSNumber, completion: @escaping (Swift.Bool, Swift.String?) -> Swift.Void)
|
|
38
39
|
@objc final public func pauseMicrophone()
|
|
@@ -33,6 +33,7 @@ import phonemes
|
|
|
33
33
|
@objc final public func setLicense(licenseKey: Swift.String) -> Swift.Bool
|
|
34
34
|
@objc final public func pauseSpeechRecognitionLite()
|
|
35
35
|
@objc final public func unPauseSpeechRecognitionLite(_ times: Foundation.NSNumber)
|
|
36
|
+
@objc(unPauseSpeechRecognitionLite:preFetch:) final public func unPauseSpeechRecognitionLite(_ times: Foundation.NSNumber, preFetch: Foundation.NSNumber)
|
|
36
37
|
@objc final public func pauseMicrophoneAndWait(_ timeoutMs: Foundation.NSNumber, completion: @escaping (Swift.Bool, Swift.String?) -> Swift.Void)
|
|
37
38
|
@objc final public func unPauseMicrophoneAndWait(_ timeoutMs: Foundation.NSNumber, completion: @escaping (Swift.Bool, Swift.String?) -> Swift.Void)
|
|
38
39
|
@objc final public func pauseMicrophone()
|
|
Binary file
|
|
Binary file
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<dict>
|
|
7
7
|
<key>Headers/DavoiceTTS-Swift.h</key>
|
|
8
8
|
<data>
|
|
9
|
-
|
|
9
|
+
HunjhBpbzw9vU2k24vcSKtZKPRA=
|
|
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
|
-
|
|
17
|
+
du1TUI8duQhmD7p11UWjNAWy5+M=
|
|
18
18
|
</data>
|
|
19
19
|
<key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
|
|
20
20
|
<data>
|
|
21
|
-
|
|
21
|
+
iaqJMoUa1a2WFHzNxWZjNd1r6r8=
|
|
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
|
-
|
|
29
|
+
iaqJMoUa1a2WFHzNxWZjNd1r6r8=
|
|
30
30
|
</data>
|
|
31
31
|
<key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key>
|
|
32
32
|
<data>
|
|
33
|
-
|
|
33
|
+
O4bIzeoqoO5Kuqeg6VtvH6/dhVE=
|
|
34
34
|
</data>
|
|
35
35
|
<key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
|
|
36
36
|
<data>
|
|
37
|
-
|
|
37
|
+
du1TUI8duQhmD7p11UWjNAWy5+M=
|
|
38
38
|
</data>
|
|
39
39
|
<key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
|
|
40
40
|
<data>
|
|
41
|
-
|
|
41
|
+
Qs3s/v6ek6BkwMIHMVGQbXFAk7I=
|
|
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
|
-
|
|
49
|
+
Qs3s/v6ek6BkwMIHMVGQbXFAk7I=
|
|
50
50
|
</data>
|
|
51
51
|
<key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key>
|
|
52
52
|
<data>
|
|
53
|
-
|
|
53
|
+
G3uVHXX4HS0hq/08NkFgREAs5KQ=
|
|
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
|
-
|
|
66
|
+
HunjhBpbzw9vU2k24vcSKtZKPRA=
|
|
67
67
|
</data>
|
|
68
68
|
<key>hash2</key>
|
|
69
69
|
<data>
|
|
70
|
-
|
|
70
|
+
uM2aiNdjuw88oDtePXNzN8HiQgX41TYJEqCw9hx+Jkg=
|
|
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
|
-
|
|
77
|
+
du1TUI8duQhmD7p11UWjNAWy5+M=
|
|
78
78
|
</data>
|
|
79
79
|
<key>hash2</key>
|
|
80
80
|
<data>
|
|
81
|
-
|
|
81
|
+
S1gn8tYv6qbvkSHXAz2YWpUCOpoxMA1mdukr/UauWJ4=
|
|
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
|
-
|
|
88
|
+
iaqJMoUa1a2WFHzNxWZjNd1r6r8=
|
|
89
89
|
</data>
|
|
90
90
|
<key>hash2</key>
|
|
91
91
|
<data>
|
|
92
|
-
|
|
92
|
+
acUhz+8Mf/Y7VI+L7rlV09YCpLTDAE2OouzYaUkuGho=
|
|
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
|
-
|
|
110
|
+
iaqJMoUa1a2WFHzNxWZjNd1r6r8=
|
|
111
111
|
</data>
|
|
112
112
|
<key>hash2</key>
|
|
113
113
|
<data>
|
|
114
|
-
|
|
114
|
+
acUhz+8Mf/Y7VI+L7rlV09YCpLTDAE2OouzYaUkuGho=
|
|
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
|
-
|
|
121
|
+
O4bIzeoqoO5Kuqeg6VtvH6/dhVE=
|
|
122
122
|
</data>
|
|
123
123
|
<key>hash2</key>
|
|
124
124
|
<data>
|
|
125
|
-
|
|
125
|
+
EhLol2fYtf4JLfooqxCxWLeXWeErEYWvCCYsKEX/e7I=
|
|
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
|
-
|
|
132
|
+
du1TUI8duQhmD7p11UWjNAWy5+M=
|
|
133
133
|
</data>
|
|
134
134
|
<key>hash2</key>
|
|
135
135
|
<data>
|
|
136
|
-
|
|
136
|
+
S1gn8tYv6qbvkSHXAz2YWpUCOpoxMA1mdukr/UauWJ4=
|
|
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
|
-
|
|
143
|
+
Qs3s/v6ek6BkwMIHMVGQbXFAk7I=
|
|
144
144
|
</data>
|
|
145
145
|
<key>hash2</key>
|
|
146
146
|
<data>
|
|
147
|
-
|
|
147
|
+
1xCzl9AM0vhSSaujCwDnkvWyVjtMSng0oEZA69YXdD8=
|
|
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
|
-
|
|
165
|
+
Qs3s/v6ek6BkwMIHMVGQbXFAk7I=
|
|
166
166
|
</data>
|
|
167
167
|
<key>hash2</key>
|
|
168
168
|
<data>
|
|
169
|
-
|
|
169
|
+
1xCzl9AM0vhSSaujCwDnkvWyVjtMSng0oEZA69YXdD8=
|
|
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
|
-
|
|
176
|
+
G3uVHXX4HS0hq/08NkFgREAs5KQ=
|
|
177
177
|
</data>
|
|
178
178
|
<key>hash2</key>
|
|
179
179
|
<data>
|
|
180
|
-
|
|
180
|
+
ASBBRnCdUYPwSpOTYc8egna9amwSZETkVmfQHsz4bV0=
|
|
181
181
|
</data>
|
|
182
182
|
</dict>
|
|
183
183
|
<key>Modules/module.modulemap</key>
|
package/package.json
CHANGED
package/speech/index.ts
CHANGED
|
@@ -553,8 +553,8 @@ class Speech {
|
|
|
553
553
|
});
|
|
554
554
|
}
|
|
555
555
|
|
|
556
|
-
unPauseSpeechRecognition(times: number): Promise<void> {
|
|
557
|
-
this.logCall('unPauseSpeechRecognitionLite', { times });
|
|
556
|
+
unPauseSpeechRecognition(times: number, preFetchMs: number = 0): Promise<void> {
|
|
557
|
+
this.logCall('unPauseSpeechRecognitionLite', { times, preFetchMs });
|
|
558
558
|
|
|
559
559
|
const mod: any = Platform.OS === 'ios' ? NativeSpeech : NativeSTT;
|
|
560
560
|
const fn = mod?.unPauseSpeechRecognitionLite;
|
|
@@ -567,23 +567,38 @@ 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
|
+
dbg('[CALL unPauseSpeechRecognitionLite] native callback fired', { times, preFetchMs, ok });
|
|
572
573
|
resolve();
|
|
573
|
-
}
|
|
574
|
+
};
|
|
575
|
+
if (preFetchMs > 0 && typeof mod?.unPauseSpeechRecognitionLiteWithPreFetch === 'function') {
|
|
576
|
+
dbg('[CALL unPauseSpeechRecognitionLite] invoking iOS prefetch bridge', { times, preFetchMs });
|
|
577
|
+
mod.unPauseSpeechRecognitionLiteWithPreFetch(times, preFetchMs, done);
|
|
578
|
+
return;
|
|
579
|
+
}
|
|
580
|
+
dbg('[CALL unPauseSpeechRecognitionLite] invoking iOS legacy bridge', { times, preFetchMs });
|
|
581
|
+
fn.call(mod, times, done);
|
|
582
|
+
dbg('[CALL unPauseSpeechRecognitionLite] returned from JS->native invocation', { times, preFetchMs });
|
|
574
583
|
} catch (e) {
|
|
584
|
+
dbgErr('[CALL unPauseSpeechRecognitionLite] exception before native callback', String(e));
|
|
575
585
|
reject(e as any);
|
|
576
586
|
}
|
|
577
587
|
});
|
|
578
588
|
}
|
|
579
589
|
return new Promise<void>((resolve, reject) => {
|
|
580
590
|
try {
|
|
581
|
-
|
|
591
|
+
const done = async (ok: boolean) => {
|
|
582
592
|
if (!ok) dbgErr('unPauseSpeechRecognitionLite(times) returned false');
|
|
583
593
|
// ✅ ANDROID: small delay before resolving
|
|
584
594
|
if (Platform.OS === 'android') await sleep(500);
|
|
585
595
|
resolve();
|
|
586
|
-
}
|
|
596
|
+
};
|
|
597
|
+
if (Platform.OS === 'android' && preFetchMs > 0 && typeof mod?.unPauseSpeechRecognitionLiteWithPreFetch === 'function') {
|
|
598
|
+
mod.unPauseSpeechRecognitionLiteWithPreFetch(times, preFetchMs, done);
|
|
599
|
+
return;
|
|
600
|
+
}
|
|
601
|
+
fn.call(mod, times, done);
|
|
587
602
|
} catch (e) {
|
|
588
603
|
reject(e as any);
|
|
589
604
|
}
|