react-native-davoice-tts 1.0.393 → 1.0.395
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/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/DavoiceTTS +0 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.abi.json +370 -252
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/DavoiceTTS +0 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.abi.json +370 -252
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.abi.json +370 -252
- 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 +12 -12
- package/package.json +1 -1
- package/speech/index.ts +37 -8
|
Binary file
|
|
Binary file
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
</data>
|
|
15
15
|
<key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.abi.json</key>
|
|
16
16
|
<data>
|
|
17
|
-
|
|
17
|
+
F/FMlGkpZhi4LscE9H4oQKQcynA=
|
|
18
18
|
</data>
|
|
19
19
|
<key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
|
|
20
20
|
<data>
|
|
@@ -30,11 +30,11 @@
|
|
|
30
30
|
</data>
|
|
31
31
|
<key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key>
|
|
32
32
|
<data>
|
|
33
|
-
|
|
33
|
+
S1kUH/L60nPbi+V4ovIOb2zFDLY=
|
|
34
34
|
</data>
|
|
35
35
|
<key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
|
|
36
36
|
<data>
|
|
37
|
-
|
|
37
|
+
F/FMlGkpZhi4LscE9H4oQKQcynA=
|
|
38
38
|
</data>
|
|
39
39
|
<key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
|
|
40
40
|
<data>
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
</data>
|
|
51
51
|
<key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key>
|
|
52
52
|
<data>
|
|
53
|
-
|
|
53
|
+
A9Bx4WwPHA0oqPFtxCyb753HKpo=
|
|
54
54
|
</data>
|
|
55
55
|
<key>Modules/module.modulemap</key>
|
|
56
56
|
<data>
|
|
@@ -78,11 +78,11 @@
|
|
|
78
78
|
<dict>
|
|
79
79
|
<key>hash</key>
|
|
80
80
|
<data>
|
|
81
|
-
|
|
81
|
+
F/FMlGkpZhi4LscE9H4oQKQcynA=
|
|
82
82
|
</data>
|
|
83
83
|
<key>hash2</key>
|
|
84
84
|
<data>
|
|
85
|
-
|
|
85
|
+
Mp1udQjFu9aXd/gvN60ROPrTPOaFy50xOK4ywf8yhPc=
|
|
86
86
|
</data>
|
|
87
87
|
</dict>
|
|
88
88
|
<key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
|
|
@@ -122,22 +122,22 @@
|
|
|
122
122
|
<dict>
|
|
123
123
|
<key>hash</key>
|
|
124
124
|
<data>
|
|
125
|
-
|
|
125
|
+
S1kUH/L60nPbi+V4ovIOb2zFDLY=
|
|
126
126
|
</data>
|
|
127
127
|
<key>hash2</key>
|
|
128
128
|
<data>
|
|
129
|
-
|
|
129
|
+
LLN9jc7lCol29Lb/NjKPgB6RLkgX3V5uMZw2m4zZd/0=
|
|
130
130
|
</data>
|
|
131
131
|
</dict>
|
|
132
132
|
<key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
|
|
133
133
|
<dict>
|
|
134
134
|
<key>hash</key>
|
|
135
135
|
<data>
|
|
136
|
-
|
|
136
|
+
F/FMlGkpZhi4LscE9H4oQKQcynA=
|
|
137
137
|
</data>
|
|
138
138
|
<key>hash2</key>
|
|
139
139
|
<data>
|
|
140
|
-
|
|
140
|
+
Mp1udQjFu9aXd/gvN60ROPrTPOaFy50xOK4ywf8yhPc=
|
|
141
141
|
</data>
|
|
142
142
|
</dict>
|
|
143
143
|
<key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
|
|
@@ -177,11 +177,11 @@
|
|
|
177
177
|
<dict>
|
|
178
178
|
<key>hash</key>
|
|
179
179
|
<data>
|
|
180
|
-
|
|
180
|
+
A9Bx4WwPHA0oqPFtxCyb753HKpo=
|
|
181
181
|
</data>
|
|
182
182
|
<key>hash2</key>
|
|
183
183
|
<data>
|
|
184
|
-
|
|
184
|
+
Fw2/wBRZd0N6I6MFGWuwAJSx6gOVwv7ccRviEQhpOL8=
|
|
185
185
|
</data>
|
|
186
186
|
</dict>
|
|
187
187
|
<key>Modules/module.modulemap</key>
|
package/package.json
CHANGED
package/speech/index.ts
CHANGED
|
@@ -918,12 +918,15 @@ class Speech {
|
|
|
918
918
|
times: number,
|
|
919
919
|
preFetchMs: number = 0,
|
|
920
920
|
timeoutMs: number = 500,
|
|
921
|
-
): Promise<
|
|
921
|
+
): Promise<{ ok: boolean; reason: string; elapsedMs: number } | undefined> {
|
|
922
922
|
this.logCall('unPauseSpeechRecognitionLite', { times, preFetchMs });
|
|
923
923
|
const startedAt = Date.now();
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
924
|
+
// Previously hard-capped at 500ms regardless of the caller's requested timeoutMs, so the
|
|
925
|
+
// native "did the tap actually start" watchdog almost always gave up before the tap arrived
|
|
926
|
+
// (observed device timings are commonly 500-1000ms+), making result.ok:false noise rather
|
|
927
|
+
// than a meaningful signal. Respect the caller's timeout instead so the watchdog gets a
|
|
928
|
+
// realistic window to confirm the recognizer actually started.
|
|
929
|
+
const effectiveTimeoutMs = Number.isFinite(timeoutMs) && timeoutMs > 0 ? timeoutMs : 500;
|
|
927
930
|
|
|
928
931
|
const mod: any = Platform.OS === 'ios' ? NativeSpeech : NativeSTT;
|
|
929
932
|
const fn = mod?.unPauseSpeechRecognitionLite;
|
|
@@ -947,7 +950,16 @@ class Speech {
|
|
|
947
950
|
if (result?.ok === false) {
|
|
948
951
|
dbgNotice('IMPORTANT: unPauseSpeechRecognitionLiteAsync reached timeout - please note this is not a bug', result?.reason);
|
|
949
952
|
}
|
|
950
|
-
|
|
953
|
+
// Propagate the native verdict instead of swallowing it. Callers need to know when the
|
|
954
|
+
// native side could not confirm the recognizer actually started, otherwise a dead
|
|
955
|
+
// listening session is indistinguishable from a healthy one until a much later watchdog.
|
|
956
|
+
// ok defaults to true when the field is absent so bridge paths that do not report a
|
|
957
|
+
// verdict are not treated as failures.
|
|
958
|
+
return {
|
|
959
|
+
ok: result?.ok !== false,
|
|
960
|
+
reason: String(result?.reason ?? ''),
|
|
961
|
+
elapsedMs: Date.now() - startedAt,
|
|
962
|
+
};
|
|
951
963
|
}
|
|
952
964
|
|
|
953
965
|
if (Platform.OS === 'ios') {
|
|
@@ -992,11 +1004,11 @@ class Speech {
|
|
|
992
1004
|
|
|
993
1005
|
if (PROBABLY_GPT_MISTAKE) {
|
|
994
1006
|
const opId = nextSpeechOpId('unpause-stt');
|
|
995
|
-
await this.enqueueSttTransition(opId, 'unpause', () => work(opId));
|
|
996
|
-
return;
|
|
1007
|
+
await this.enqueueSttTransition(opId, 'unpause', () => work(opId).then(() => undefined));
|
|
1008
|
+
return undefined;
|
|
997
1009
|
}
|
|
998
1010
|
|
|
999
|
-
|
|
1011
|
+
return work();
|
|
1000
1012
|
}
|
|
1001
1013
|
/** Pause mic/STT (Android native; iOS unified if present) */
|
|
1002
1014
|
async pauseMicrophone(): Promise<void> {
|
|
@@ -1123,6 +1135,23 @@ class Speech {
|
|
|
1123
1135
|
}
|
|
1124
1136
|
}
|
|
1125
1137
|
|
|
1138
|
+
/**
|
|
1139
|
+
* Read-only view of the JS half of the event-delivery path. Pairs with the native
|
|
1140
|
+
* sttHealthSnapshot(): native reports whether it will emit (hasListeners), this reports
|
|
1141
|
+
* whether we are subscribed and to which emitter. rewireListenersForMode() tears all
|
|
1142
|
+
* subscriptions down and re-adds them, and ensureListeners() early-returns whenever
|
|
1143
|
+
* subs is non-empty, so a subscription attached to the wrong emitter is permanent.
|
|
1144
|
+
*/
|
|
1145
|
+
sttListenerDiag(): Record<string, any> {
|
|
1146
|
+
return {
|
|
1147
|
+
subsCount: this.subs.length,
|
|
1148
|
+
iosTtsOnly: this.iosTtsOnly,
|
|
1149
|
+
emitter: this.unifiedEmitter ? 'unified' : (this.sttEmitter ? 'stt' : 'none'),
|
|
1150
|
+
hasCompletedFullInit: this.hasCompletedFullInit,
|
|
1151
|
+
hasCompletedTtsInit: this.hasCompletedTtsInit,
|
|
1152
|
+
};
|
|
1153
|
+
}
|
|
1154
|
+
|
|
1126
1155
|
async hasIOSMicPermissions(): Promise<boolean> {
|
|
1127
1156
|
if (Platform.OS !== 'ios') return false;
|
|
1128
1157
|
if (!NativeSpeech?.hasMicPermissions) return false;
|