react-native-davoice-tts 1.0.200 → 1.0.201
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 +12 -0
- package/ios/SpeechBridge/SpeechBridge.m +16 -0
- 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 +2 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.abi.json +1849 -1797
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.private.swiftinterface +12 -10
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.swiftinterface +12 -10
- 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 +4 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.abi.json +1550 -1498
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +12 -10
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftinterface +12 -10
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.abi.json +1550 -1498
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +12 -10
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +12 -10
- 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 +32 -0
|
@@ -23,6 +23,8 @@ import phonemes
|
|
|
23
23
|
@objc public static let supportedEvents: [Swift.String]
|
|
24
24
|
@objc final public func isSpeechAvailable(_ completion: @escaping (Swift.Bool) -> Swift.Void)
|
|
25
25
|
@objc final public func isRecognizing() -> Swift.Bool
|
|
26
|
+
@objc final public func pauseMicrophone()
|
|
27
|
+
@objc final public func unPauseMicrophone()
|
|
26
28
|
@objc final public func startSpeech(localeStr: Swift.String?)
|
|
27
29
|
@objc final public func stopSpeech(_ completion: ((Swift.Bool) -> Swift.Void)? = nil)
|
|
28
30
|
@objc final public func cancelSpeech(_ completion: ((Swift.Bool) -> Swift.Void)? = nil)
|
|
@@ -32,6 +34,16 @@ import phonemes
|
|
|
32
34
|
@objc override dynamic public init()
|
|
33
35
|
@objc deinit
|
|
34
36
|
}
|
|
37
|
+
public typealias EngineSchedule = (_ url: Foundation.URL, _ onDone: @escaping () -> Swift.Void) -> Swift.Bool
|
|
38
|
+
public typealias IsEngineReady = () -> Swift.Bool
|
|
39
|
+
public typealias useOnlyEnginePlayback = () -> Swift.Bool
|
|
40
|
+
public typealias StopEnginePlayback = () -> Swift.Void
|
|
41
|
+
public enum AudioPlaybackHook {
|
|
42
|
+
public static var engineScheduleFile: DavoiceTTS.EngineSchedule?
|
|
43
|
+
public static var isEngineReady: DavoiceTTS.IsEngineReady?
|
|
44
|
+
public static var useOnlyEnginePlayback: DavoiceTTS.useOnlyEnginePlayback?
|
|
45
|
+
public static var stopEnginePlayback: DavoiceTTS.StopEnginePlayback?
|
|
46
|
+
}
|
|
35
47
|
@objc @_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers final public class SwiftSoundQueue : ObjectiveC.NSObject, AVFAudio.AVAudioPlayerDelegate {
|
|
36
48
|
@objc deinit
|
|
37
49
|
public static let shared: DavoiceTTS.SwiftSoundQueue
|
|
@@ -60,13 +72,3 @@ import phonemes
|
|
|
60
72
|
final public func synthesize(_ text: Swift.String, speakerId: Swift.Int32 = 0, token: Foundation.UUID, terminal: Swift.Character? = nil) throws -> (AVFAudio.AVAudioPCMBuffer, Swift.Int)
|
|
61
73
|
@objc final public func synthesize_top(_ text: Swift.String, speakerId: Swift.Int32 = 0, token: Foundation.UUID) throws -> AVFAudio.AVAudioPCMBuffer
|
|
62
74
|
}
|
|
63
|
-
public typealias EngineSchedule = (_ url: Foundation.URL, _ onDone: @escaping () -> Swift.Void) -> Swift.Bool
|
|
64
|
-
public typealias IsEngineReady = () -> Swift.Bool
|
|
65
|
-
public typealias useOnlyEnginePlayback = () -> Swift.Bool
|
|
66
|
-
public typealias StopEnginePlayback = () -> Swift.Void
|
|
67
|
-
public enum AudioPlaybackHook {
|
|
68
|
-
public static var engineScheduleFile: DavoiceTTS.EngineSchedule?
|
|
69
|
-
public static var isEngineReady: DavoiceTTS.IsEngineReady?
|
|
70
|
-
public static var useOnlyEnginePlayback: DavoiceTTS.useOnlyEnginePlayback?
|
|
71
|
-
public static var stopEnginePlayback: DavoiceTTS.StopEnginePlayback?
|
|
72
|
-
}
|
|
@@ -23,6 +23,8 @@ import phonemes
|
|
|
23
23
|
@objc public static let supportedEvents: [Swift.String]
|
|
24
24
|
@objc final public func isSpeechAvailable(_ completion: @escaping (Swift.Bool) -> Swift.Void)
|
|
25
25
|
@objc final public func isRecognizing() -> Swift.Bool
|
|
26
|
+
@objc final public func pauseMicrophone()
|
|
27
|
+
@objc final public func unPauseMicrophone()
|
|
26
28
|
@objc final public func startSpeech(localeStr: Swift.String?)
|
|
27
29
|
@objc final public func stopSpeech(_ completion: ((Swift.Bool) -> Swift.Void)? = nil)
|
|
28
30
|
@objc final public func cancelSpeech(_ completion: ((Swift.Bool) -> Swift.Void)? = nil)
|
|
@@ -32,6 +34,16 @@ import phonemes
|
|
|
32
34
|
@objc override dynamic public init()
|
|
33
35
|
@objc deinit
|
|
34
36
|
}
|
|
37
|
+
public typealias EngineSchedule = (_ url: Foundation.URL, _ onDone: @escaping () -> Swift.Void) -> Swift.Bool
|
|
38
|
+
public typealias IsEngineReady = () -> Swift.Bool
|
|
39
|
+
public typealias useOnlyEnginePlayback = () -> Swift.Bool
|
|
40
|
+
public typealias StopEnginePlayback = () -> Swift.Void
|
|
41
|
+
public enum AudioPlaybackHook {
|
|
42
|
+
public static var engineScheduleFile: DavoiceTTS.EngineSchedule?
|
|
43
|
+
public static var isEngineReady: DavoiceTTS.IsEngineReady?
|
|
44
|
+
public static var useOnlyEnginePlayback: DavoiceTTS.useOnlyEnginePlayback?
|
|
45
|
+
public static var stopEnginePlayback: DavoiceTTS.StopEnginePlayback?
|
|
46
|
+
}
|
|
35
47
|
@objc @_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers final public class SwiftSoundQueue : ObjectiveC.NSObject, AVFAudio.AVAudioPlayerDelegate {
|
|
36
48
|
@objc deinit
|
|
37
49
|
public static let shared: DavoiceTTS.SwiftSoundQueue
|
|
@@ -60,13 +72,3 @@ import phonemes
|
|
|
60
72
|
final public func synthesize(_ text: Swift.String, speakerId: Swift.Int32 = 0, token: Foundation.UUID, terminal: Swift.Character? = nil) throws -> (AVFAudio.AVAudioPCMBuffer, Swift.Int)
|
|
61
73
|
@objc final public func synthesize_top(_ text: Swift.String, speakerId: Swift.Int32 = 0, token: Foundation.UUID) throws -> AVFAudio.AVAudioPCMBuffer
|
|
62
74
|
}
|
|
63
|
-
public typealias EngineSchedule = (_ url: Foundation.URL, _ onDone: @escaping () -> Swift.Void) -> Swift.Bool
|
|
64
|
-
public typealias IsEngineReady = () -> Swift.Bool
|
|
65
|
-
public typealias useOnlyEnginePlayback = () -> Swift.Bool
|
|
66
|
-
public typealias StopEnginePlayback = () -> Swift.Void
|
|
67
|
-
public enum AudioPlaybackHook {
|
|
68
|
-
public static var engineScheduleFile: DavoiceTTS.EngineSchedule?
|
|
69
|
-
public static var isEngineReady: DavoiceTTS.IsEngineReady?
|
|
70
|
-
public static var useOnlyEnginePlayback: DavoiceTTS.useOnlyEnginePlayback?
|
|
71
|
-
public static var stopEnginePlayback: DavoiceTTS.StopEnginePlayback?
|
|
72
|
-
}
|
|
Binary file
|
|
Binary file
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
</data>
|
|
23
23
|
<key>Headers/DavoiceTTS-Swift.h</key>
|
|
24
24
|
<data>
|
|
25
|
-
|
|
25
|
+
kZh8AUoebVDMaRty6d8QXGoGOOI=
|
|
26
26
|
</data>
|
|
27
27
|
<key>Info.plist</key>
|
|
28
28
|
<data>
|
|
@@ -30,11 +30,11 @@
|
|
|
30
30
|
</data>
|
|
31
31
|
<key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.abi.json</key>
|
|
32
32
|
<data>
|
|
33
|
-
|
|
33
|
+
yEDJ9wWHf252NyB9cdUhoENfOj4=
|
|
34
34
|
</data>
|
|
35
35
|
<key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
|
|
36
36
|
<data>
|
|
37
|
-
|
|
37
|
+
n1gEm9Zqng+WeoJriWXleVI+fq4=
|
|
38
38
|
</data>
|
|
39
39
|
<key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
|
|
40
40
|
<data>
|
|
@@ -42,19 +42,19 @@
|
|
|
42
42
|
</data>
|
|
43
43
|
<key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
|
|
44
44
|
<data>
|
|
45
|
-
|
|
45
|
+
n1gEm9Zqng+WeoJriWXleVI+fq4=
|
|
46
46
|
</data>
|
|
47
47
|
<key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key>
|
|
48
48
|
<data>
|
|
49
|
-
|
|
49
|
+
Ts4dsKiy4TozSLxrq5ZiU38YrnI=
|
|
50
50
|
</data>
|
|
51
51
|
<key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
|
|
52
52
|
<data>
|
|
53
|
-
|
|
53
|
+
yEDJ9wWHf252NyB9cdUhoENfOj4=
|
|
54
54
|
</data>
|
|
55
55
|
<key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
|
|
56
56
|
<data>
|
|
57
|
-
|
|
57
|
+
6MFWPxJpGbZy1jKZwFaqE7DNwVk=
|
|
58
58
|
</data>
|
|
59
59
|
<key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
|
|
60
60
|
<data>
|
|
@@ -62,11 +62,11 @@
|
|
|
62
62
|
</data>
|
|
63
63
|
<key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key>
|
|
64
64
|
<data>
|
|
65
|
-
|
|
65
|
+
6MFWPxJpGbZy1jKZwFaqE7DNwVk=
|
|
66
66
|
</data>
|
|
67
67
|
<key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key>
|
|
68
68
|
<data>
|
|
69
|
-
|
|
69
|
+
PioJflrDdZaMIGIFEhG2/3b5Qfc=
|
|
70
70
|
</data>
|
|
71
71
|
<key>Modules/module.modulemap</key>
|
|
72
72
|
<data>
|
|
@@ -123,33 +123,33 @@
|
|
|
123
123
|
<dict>
|
|
124
124
|
<key>hash</key>
|
|
125
125
|
<data>
|
|
126
|
-
|
|
126
|
+
kZh8AUoebVDMaRty6d8QXGoGOOI=
|
|
127
127
|
</data>
|
|
128
128
|
<key>hash2</key>
|
|
129
129
|
<data>
|
|
130
|
-
|
|
130
|
+
o44a3ex79DedcbYyRd+GgeuBLMItQA1hJahuK4VuziA=
|
|
131
131
|
</data>
|
|
132
132
|
</dict>
|
|
133
133
|
<key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.abi.json</key>
|
|
134
134
|
<dict>
|
|
135
135
|
<key>hash</key>
|
|
136
136
|
<data>
|
|
137
|
-
|
|
137
|
+
yEDJ9wWHf252NyB9cdUhoENfOj4=
|
|
138
138
|
</data>
|
|
139
139
|
<key>hash2</key>
|
|
140
140
|
<data>
|
|
141
|
-
|
|
141
|
+
jgbgABGlB/a+kh969hBAZTB9k0S4SbDOTs6t5a1zBLI=
|
|
142
142
|
</data>
|
|
143
143
|
</dict>
|
|
144
144
|
<key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
|
|
145
145
|
<dict>
|
|
146
146
|
<key>hash</key>
|
|
147
147
|
<data>
|
|
148
|
-
|
|
148
|
+
n1gEm9Zqng+WeoJriWXleVI+fq4=
|
|
149
149
|
</data>
|
|
150
150
|
<key>hash2</key>
|
|
151
151
|
<data>
|
|
152
|
-
|
|
152
|
+
7KY85FI3bpscmTEJ6Z2kMcgBL16c+pu++UTMMhfBc3I=
|
|
153
153
|
</data>
|
|
154
154
|
</dict>
|
|
155
155
|
<key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
|
|
@@ -167,44 +167,44 @@
|
|
|
167
167
|
<dict>
|
|
168
168
|
<key>hash</key>
|
|
169
169
|
<data>
|
|
170
|
-
|
|
170
|
+
n1gEm9Zqng+WeoJriWXleVI+fq4=
|
|
171
171
|
</data>
|
|
172
172
|
<key>hash2</key>
|
|
173
173
|
<data>
|
|
174
|
-
|
|
174
|
+
7KY85FI3bpscmTEJ6Z2kMcgBL16c+pu++UTMMhfBc3I=
|
|
175
175
|
</data>
|
|
176
176
|
</dict>
|
|
177
177
|
<key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key>
|
|
178
178
|
<dict>
|
|
179
179
|
<key>hash</key>
|
|
180
180
|
<data>
|
|
181
|
-
|
|
181
|
+
Ts4dsKiy4TozSLxrq5ZiU38YrnI=
|
|
182
182
|
</data>
|
|
183
183
|
<key>hash2</key>
|
|
184
184
|
<data>
|
|
185
|
-
|
|
185
|
+
KTMNBjenb6BQRhz0sPtGg740BQyiDn/v9TJPDRQp88A=
|
|
186
186
|
</data>
|
|
187
187
|
</dict>
|
|
188
188
|
<key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
|
|
189
189
|
<dict>
|
|
190
190
|
<key>hash</key>
|
|
191
191
|
<data>
|
|
192
|
-
|
|
192
|
+
yEDJ9wWHf252NyB9cdUhoENfOj4=
|
|
193
193
|
</data>
|
|
194
194
|
<key>hash2</key>
|
|
195
195
|
<data>
|
|
196
|
-
|
|
196
|
+
jgbgABGlB/a+kh969hBAZTB9k0S4SbDOTs6t5a1zBLI=
|
|
197
197
|
</data>
|
|
198
198
|
</dict>
|
|
199
199
|
<key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
|
|
200
200
|
<dict>
|
|
201
201
|
<key>hash</key>
|
|
202
202
|
<data>
|
|
203
|
-
|
|
203
|
+
6MFWPxJpGbZy1jKZwFaqE7DNwVk=
|
|
204
204
|
</data>
|
|
205
205
|
<key>hash2</key>
|
|
206
206
|
<data>
|
|
207
|
-
|
|
207
|
+
uh4kC5ZsiJCVTddavU6kcZ+vHc+xdWe9GKLBKsnzXjc=
|
|
208
208
|
</data>
|
|
209
209
|
</dict>
|
|
210
210
|
<key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
|
|
@@ -222,22 +222,22 @@
|
|
|
222
222
|
<dict>
|
|
223
223
|
<key>hash</key>
|
|
224
224
|
<data>
|
|
225
|
-
|
|
225
|
+
6MFWPxJpGbZy1jKZwFaqE7DNwVk=
|
|
226
226
|
</data>
|
|
227
227
|
<key>hash2</key>
|
|
228
228
|
<data>
|
|
229
|
-
|
|
229
|
+
uh4kC5ZsiJCVTddavU6kcZ+vHc+xdWe9GKLBKsnzXjc=
|
|
230
230
|
</data>
|
|
231
231
|
</dict>
|
|
232
232
|
<key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key>
|
|
233
233
|
<dict>
|
|
234
234
|
<key>hash</key>
|
|
235
235
|
<data>
|
|
236
|
-
|
|
236
|
+
PioJflrDdZaMIGIFEhG2/3b5Qfc=
|
|
237
237
|
</data>
|
|
238
238
|
<key>hash2</key>
|
|
239
239
|
<data>
|
|
240
|
-
|
|
240
|
+
8Y3iVZum+Xstxu9XAW2A6ot+fToBS4D1USrTgSHvoKo=
|
|
241
241
|
</data>
|
|
242
242
|
</dict>
|
|
243
243
|
<key>Modules/module.modulemap</key>
|
package/package.json
CHANGED
package/speech/index.ts
CHANGED
|
@@ -189,6 +189,38 @@ class Speech {
|
|
|
189
189
|
});
|
|
190
190
|
}
|
|
191
191
|
|
|
192
|
+
/** Pause mic/STT (Android native; iOS unified if present) */
|
|
193
|
+
pauseMicrophone(): Promise<void> {
|
|
194
|
+
// Prefer unified iOS if available (safe even if you add iOS later)
|
|
195
|
+
if (Platform.OS === 'ios' && (NativeSpeech as any)?.pauseMicrophone) {
|
|
196
|
+
return new Promise((resolve, reject) => {
|
|
197
|
+
try { (NativeSpeech as any).pauseMicrophone(() => resolve()); }
|
|
198
|
+
catch (e) { reject(e as any); }
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
// Android
|
|
202
|
+
if (!(NativeSTT as any)?.pauseMicrophone) return Promise.resolve();
|
|
203
|
+
return new Promise((resolve, reject) => {
|
|
204
|
+
try { (NativeSTT as any).pauseMicrophone(() => resolve()); }
|
|
205
|
+
catch (e) { reject(e as any); }
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/** Resume mic/STT (Android native; iOS unified if present) */
|
|
210
|
+
unPauseMicrophone(): Promise<void> {
|
|
211
|
+
if (Platform.OS === 'ios' && (NativeSpeech as any)?.unPauseMicrophone) {
|
|
212
|
+
return new Promise((resolve, reject) => {
|
|
213
|
+
try { (NativeSpeech as any).unPauseMicrophone(() => resolve()); }
|
|
214
|
+
catch (e) { reject(e as any); }
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
if (!(NativeSTT as any)?.unPauseMicrophone) return Promise.resolve();
|
|
218
|
+
return new Promise((resolve, reject) => {
|
|
219
|
+
try { (NativeSTT as any).unPauseMicrophone(() => resolve()); }
|
|
220
|
+
catch (e) { reject(e as any); }
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
|
|
192
224
|
stop(): Promise<void> {
|
|
193
225
|
if (Platform.OS === 'ios' && NativeSpeech?.stopSpeech) {
|
|
194
226
|
return new Promise((res) => NativeSpeech.stopSpeech(() => res()));
|