react-native-davoice-tts 1.0.281 → 1.0.283
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/src/main/java/com/davoice/tts/rn/DaVoiceTTSBridge.java +26 -0
- 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 +8 -1
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.abi.json +8308 -7491
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.private.swiftinterface +36 -29
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.swiftinterface +36 -29
- 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 +16 -2
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.abi.json +8360 -7543
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +78 -71
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftinterface +78 -71
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.abi.json +8360 -7543
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +78 -71
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +78 -71
- 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 +37 -0
|
@@ -14,33 +14,53 @@ import _StringProcessing
|
|
|
14
14
|
import _SwiftConcurrencyShims
|
|
15
15
|
import onnxruntime_objc
|
|
16
16
|
import phonemes
|
|
17
|
-
@objc public
|
|
18
|
-
@objc
|
|
17
|
+
@objc @_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers final public class SwiftSoundQueue : ObjectiveC.NSObject, AVFAudio.AVAudioPlayerDelegate {
|
|
18
|
+
@objc deinit
|
|
19
|
+
public static let shared: DavoiceTTS.SwiftSoundQueue
|
|
20
|
+
final public func notifyWhenURLFinishes(_ url: Foundation.URL, _ cb: @escaping () -> Swift.Void)
|
|
21
|
+
final public var onItemDone: ((Foundation.URL) -> Swift.Void)?
|
|
22
|
+
final public var onQueueEmpty: (() -> Swift.Void)?
|
|
23
|
+
final public func enqueue(_ source: DavoiceTTS.SwiftSoundQueue.Source)
|
|
24
|
+
final public func enqueueMany(_ sources: [DavoiceTTS.SwiftSoundQueue.Source])
|
|
25
|
+
final public func stop()
|
|
26
|
+
public enum Source {
|
|
27
|
+
case fileURL(Foundation.URL)
|
|
28
|
+
case named(Swift.String)
|
|
29
|
+
}
|
|
30
|
+
@objc final public func audioPlayerDidFinishPlaying(_ p: AVFAudio.AVAudioPlayer, successfully ok: Swift.Bool)
|
|
31
|
+
final public func activatePlaybackOnlySession()
|
|
32
|
+
final public func activateSpeaker()
|
|
19
33
|
}
|
|
20
|
-
@objc @
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
@objc final public var
|
|
24
|
-
@objc public static let supportedEvents: [Swift.String]
|
|
25
|
-
@objc final public func pauseSpeechRecognitionLite()
|
|
26
|
-
@objc final public func unPauseSpeechRecognitionLite(_ times: Foundation.NSNumber)
|
|
27
|
-
@objc final public func pauseMicrophoneAndWait(_ timeoutMs: Foundation.NSNumber, completion: @escaping (Swift.Bool, Swift.String?) -> Swift.Void)
|
|
28
|
-
@objc final public func unPauseMicrophoneAndWait(_ timeoutMs: Foundation.NSNumber, completion: @escaping (Swift.Bool, Swift.String?) -> Swift.Void)
|
|
29
|
-
@objc final public func pauseMicrophone()
|
|
30
|
-
@objc final public func unPauseMicrophone()
|
|
31
|
-
@objc final public func setAECEnabled(_ enabled: Swift.Bool)
|
|
32
|
-
@objc final public func isAECEnabled() -> Swift.Bool
|
|
33
|
-
@objc final public func isSpeechAvailable(_ completion: @escaping (Swift.Bool) -> Swift.Void)
|
|
34
|
-
@objc final public func isRecognizing() -> Swift.Bool
|
|
35
|
-
@objc final public func startSpeech(localeStr: Swift.String?)
|
|
36
|
-
@objc final public func startSpeech(localeStr: Swift.String?, onboardingJsonPath: Swift.String)
|
|
37
|
-
@objc final public func stopSpeech(_ completion: ((Swift.Bool) -> Swift.Void)? = nil)
|
|
38
|
-
@objc final public func cancelSpeech(_ completion: ((Swift.Bool) -> Swift.Void)? = nil)
|
|
39
|
-
@objc final public func destroySpeech(_ completion: ((Swift.Bool) -> Swift.Void)? = nil)
|
|
40
|
-
@objc final public func teardown()
|
|
41
|
-
@objc final public func speechRecognizer(_ speechRecognizer: Speech.SFSpeechRecognizer, availabilityDidChange available: Swift.Bool)
|
|
42
|
-
@objc override dynamic public init()
|
|
34
|
+
@objc @objcMembers final public class DaVoiceTTS : ObjectiveC.NSObject {
|
|
35
|
+
public struct Config {
|
|
36
|
+
}
|
|
37
|
+
@objc final public var onLastUtteranceFinished: (() -> Swift.Void)?
|
|
43
38
|
@objc deinit
|
|
39
|
+
public struct Biquad {
|
|
40
|
+
public var b0: Swift.Float, b1: Swift.Float, b2: Swift.Float, a1: Swift.Float, a2: Swift.Float
|
|
41
|
+
public init(b0: Swift.Float, b1: Swift.Float, b2: Swift.Float, a1: Swift.Float, a2: Swift.Float)
|
|
42
|
+
public mutating func process(_ x: Swift.UnsafeMutablePointer<Swift.Float>, _ n: Swift.Int)
|
|
43
|
+
}
|
|
44
|
+
@objc public init(model: Foundation.URL) throws
|
|
45
|
+
@objc final public func stopSpeaking()
|
|
46
|
+
@objc final public func destroy()
|
|
47
|
+
@objc(speak:sid:) final public func speak(_ txt: Swift.String, sid: Swift.Int32 = 0)
|
|
48
|
+
@objc(speak:sid:speed:) final public func speak(_ txt: Swift.String, sid: Swift.Int32 = 0, speed: Swift.Float)
|
|
49
|
+
@objc final public func synthesize_top(_ _text: Swift.String, speakerId: Swift.Int32 = 0, token: Foundation.UUID, speed_adjuster: Swift.Float) throws -> AVFAudio.AVAudioPCMBuffer
|
|
50
|
+
@objc final public func playWav(_ url: Foundation.URL, markAsLastUtterance: Swift.Bool = true)
|
|
51
|
+
@objc final public func playBuffer(_ buffer: AVFAudio.AVAudioPCMBuffer, markAsLastUtterance: Swift.Bool = true)
|
|
52
|
+
}
|
|
53
|
+
public typealias EngineSchedule = (_ url: Foundation.URL, _ onDone: @escaping () -> Swift.Void) -> Swift.Bool
|
|
54
|
+
public typealias IsEngineReady = () -> Swift.Bool
|
|
55
|
+
public typealias useOnlyEnginePlayback = () -> Swift.Bool
|
|
56
|
+
public typealias StopEnginePlayback = () -> Swift.Void
|
|
57
|
+
public typealias CurrentEngineProvider = () -> AVFAudio.AVAudioEngine?
|
|
58
|
+
public enum AudioPlaybackHook {
|
|
59
|
+
public static var engineScheduleFile: DavoiceTTS.EngineSchedule?
|
|
60
|
+
public static var isEngineReady: DavoiceTTS.IsEngineReady?
|
|
61
|
+
public static var useOnlyEnginePlayback: DavoiceTTS.useOnlyEnginePlayback?
|
|
62
|
+
public static var stopEnginePlayback: DavoiceTTS.StopEnginePlayback?
|
|
63
|
+
public static var currentEngine: DavoiceTTS.CurrentEngineProvider?
|
|
44
64
|
}
|
|
45
65
|
public enum SVLogLevel : Swift.Int, Swift.Codable {
|
|
46
66
|
case off, error, warn, info, debug, trace
|
|
@@ -138,59 +158,46 @@ public enum SpeakerVerificationError : Swift.Error, Swift.CustomStringConvertibl
|
|
|
138
158
|
final public func verifyWavFileStreaming(path: Swift.String, resetState: Swift.Bool = true) throws -> DavoiceTTS.SpeakerVerificationResult
|
|
139
159
|
@objc deinit
|
|
140
160
|
}
|
|
141
|
-
@_inheritsConvenienceInitializers @objc(
|
|
161
|
+
@_inheritsConvenienceInitializers @objc(DavoiceSpeakerVerificationRNFacade) final public class SpeakerVerificationRNFacade : ObjectiveC.NSObject {
|
|
142
162
|
@objc(createEngineWithModelPath:enrollmentJsonPath:options:error:) public static func createEngine(modelPath: Swift.String, enrollmentJsonPath: Swift.String, options: [Swift.String : Any], error outError: Foundation.NSErrorPointer) -> Any?
|
|
143
163
|
@objc(verifyWavWithEngine:wavPath:reset:error:) public static func verifyWav(engine: Any, wavPath: Swift.String, reset: Swift.Bool, error outError: Foundation.NSErrorPointer) -> [Swift.String : Any]?
|
|
144
164
|
@objc override dynamic public init()
|
|
145
165
|
@objc deinit
|
|
146
166
|
}
|
|
147
|
-
@objc
|
|
148
|
-
@objc
|
|
149
|
-
public static let shared: DavoiceTTS.SwiftSoundQueue
|
|
150
|
-
final public func notifyWhenURLFinishes(_ url: Foundation.URL, _ cb: @escaping () -> Swift.Void)
|
|
151
|
-
final public var onItemDone: ((Foundation.URL) -> Swift.Void)?
|
|
152
|
-
final public var onQueueEmpty: (() -> Swift.Void)?
|
|
153
|
-
final public func enqueue(_ source: DavoiceTTS.SwiftSoundQueue.Source)
|
|
154
|
-
final public func enqueueMany(_ sources: [DavoiceTTS.SwiftSoundQueue.Source])
|
|
155
|
-
final public func stop()
|
|
156
|
-
public enum Source {
|
|
157
|
-
case fileURL(Foundation.URL)
|
|
158
|
-
case named(Swift.String)
|
|
159
|
-
}
|
|
160
|
-
@objc final public func audioPlayerDidFinishPlaying(_ p: AVFAudio.AVAudioPlayer, successfully ok: Swift.Bool)
|
|
161
|
-
final public func activatePlaybackOnlySession()
|
|
162
|
-
final public func activateSpeaker()
|
|
167
|
+
@objc public protocol STTDelegate {
|
|
168
|
+
@objc func stt(_ stt: DavoiceTTS.STT, didEmitEvent name: Swift.String, body: [Swift.String : Any]?)
|
|
163
169
|
}
|
|
164
|
-
@objc @objcMembers final public class
|
|
165
|
-
public
|
|
166
|
-
|
|
167
|
-
@objc final public var
|
|
170
|
+
@objc @_inheritsConvenienceInitializers @objcMembers final public class STT : ObjectiveC.NSObject, Speech.SFSpeechRecognizerDelegate {
|
|
171
|
+
@objc weak final public var delegate: (any DavoiceTTS.STTDelegate)?
|
|
172
|
+
@objc final public var continuous: Swift.Bool
|
|
173
|
+
@objc final public var aecEnabled: Swift.Bool
|
|
174
|
+
@objc final public var force16kMicSampleRate: Swift.Bool
|
|
175
|
+
@objc final public var useLegacySpeakerGateBehavior: Swift.Bool
|
|
176
|
+
@objc final public var useSpeakerGateHangover: Swift.Bool
|
|
177
|
+
@objc final public var speakerGateHangoverSeconds: Swift.Double
|
|
178
|
+
@objc final public var useShortSpeakerVerificationTailWindow: Swift.Bool
|
|
179
|
+
@objc final public var shortSpeakerVerificationTailSeconds: Swift.Float
|
|
180
|
+
@objc final public var speakerPreRollFlushMaxSeconds: Swift.Double
|
|
181
|
+
@objc public static let supportedEvents: [Swift.String]
|
|
182
|
+
@objc final public func pauseSpeechRecognitionLite()
|
|
183
|
+
@objc final public func unPauseSpeechRecognitionLite(_ times: Foundation.NSNumber)
|
|
184
|
+
@objc final public func pauseMicrophoneAndWait(_ timeoutMs: Foundation.NSNumber, completion: @escaping (Swift.Bool, Swift.String?) -> Swift.Void)
|
|
185
|
+
@objc final public func unPauseMicrophoneAndWait(_ timeoutMs: Foundation.NSNumber, completion: @escaping (Swift.Bool, Swift.String?) -> Swift.Void)
|
|
186
|
+
@objc final public func pauseMicrophone()
|
|
187
|
+
@objc final public func unPauseMicrophone()
|
|
188
|
+
@objc final public func setAECEnabled(_ enabled: Swift.Bool)
|
|
189
|
+
@objc final public func isAECEnabled() -> Swift.Bool
|
|
190
|
+
@objc final public func isSpeechAvailable(_ completion: @escaping (Swift.Bool) -> Swift.Void)
|
|
191
|
+
@objc final public func isRecognizing() -> Swift.Bool
|
|
192
|
+
@objc final public func startSpeech(localeStr: Swift.String?)
|
|
193
|
+
@objc final public func startSpeech(localeStr: Swift.String?, onboardingJsonPath: Swift.String)
|
|
194
|
+
@objc final public func stopSpeech(_ completion: ((Swift.Bool) -> Swift.Void)? = nil)
|
|
195
|
+
@objc final public func cancelSpeech(_ completion: ((Swift.Bool) -> Swift.Void)? = nil)
|
|
196
|
+
@objc final public func destroySpeech(_ completion: ((Swift.Bool) -> Swift.Void)? = nil)
|
|
197
|
+
@objc final public func teardown()
|
|
198
|
+
@objc final public func speechRecognizer(_ speechRecognizer: Speech.SFSpeechRecognizer, availabilityDidChange available: Swift.Bool)
|
|
199
|
+
@objc override dynamic public init()
|
|
168
200
|
@objc deinit
|
|
169
|
-
public struct Biquad {
|
|
170
|
-
public var b0: Swift.Float, b1: Swift.Float, b2: Swift.Float, a1: Swift.Float, a2: Swift.Float
|
|
171
|
-
public init(b0: Swift.Float, b1: Swift.Float, b2: Swift.Float, a1: Swift.Float, a2: Swift.Float)
|
|
172
|
-
public mutating func process(_ x: Swift.UnsafeMutablePointer<Swift.Float>, _ n: Swift.Int)
|
|
173
|
-
}
|
|
174
|
-
@objc public init(model: Foundation.URL) throws
|
|
175
|
-
@objc final public func stopSpeaking()
|
|
176
|
-
@objc final public func destroy()
|
|
177
|
-
@objc(speak:sid:) final public func speak(_ txt: Swift.String, sid: Swift.Int32 = 0)
|
|
178
|
-
@objc(speak:sid:speed:) final public func speak(_ txt: Swift.String, sid: Swift.Int32 = 0, speed: Swift.Float)
|
|
179
|
-
@objc final public func synthesize_top(_ _text: Swift.String, speakerId: Swift.Int32 = 0, token: Foundation.UUID, speed_adjuster: Swift.Float) throws -> AVFAudio.AVAudioPCMBuffer
|
|
180
|
-
@objc final public func playWav(_ url: Foundation.URL, markAsLastUtterance: Swift.Bool = true)
|
|
181
|
-
@objc final public func playBuffer(_ buffer: AVFAudio.AVAudioPCMBuffer, markAsLastUtterance: Swift.Bool = true)
|
|
182
|
-
}
|
|
183
|
-
public typealias EngineSchedule = (_ url: Foundation.URL, _ onDone: @escaping () -> Swift.Void) -> Swift.Bool
|
|
184
|
-
public typealias IsEngineReady = () -> Swift.Bool
|
|
185
|
-
public typealias useOnlyEnginePlayback = () -> Swift.Bool
|
|
186
|
-
public typealias StopEnginePlayback = () -> Swift.Void
|
|
187
|
-
public typealias CurrentEngineProvider = () -> AVFAudio.AVAudioEngine?
|
|
188
|
-
public enum AudioPlaybackHook {
|
|
189
|
-
public static var engineScheduleFile: DavoiceTTS.EngineSchedule?
|
|
190
|
-
public static var isEngineReady: DavoiceTTS.IsEngineReady?
|
|
191
|
-
public static var useOnlyEnginePlayback: DavoiceTTS.useOnlyEnginePlayback?
|
|
192
|
-
public static var stopEnginePlayback: DavoiceTTS.StopEnginePlayback?
|
|
193
|
-
public static var currentEngine: DavoiceTTS.CurrentEngineProvider?
|
|
194
201
|
}
|
|
195
202
|
extension DavoiceTTS.SVLogLevel : Swift.Equatable {}
|
|
196
203
|
extension DavoiceTTS.SVLogLevel : Swift.Hashable {}
|
|
@@ -14,33 +14,53 @@ import _StringProcessing
|
|
|
14
14
|
import _SwiftConcurrencyShims
|
|
15
15
|
import onnxruntime_objc
|
|
16
16
|
import phonemes
|
|
17
|
-
@objc public
|
|
18
|
-
@objc
|
|
17
|
+
@objc @_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers final public class SwiftSoundQueue : ObjectiveC.NSObject, AVFAudio.AVAudioPlayerDelegate {
|
|
18
|
+
@objc deinit
|
|
19
|
+
public static let shared: DavoiceTTS.SwiftSoundQueue
|
|
20
|
+
final public func notifyWhenURLFinishes(_ url: Foundation.URL, _ cb: @escaping () -> Swift.Void)
|
|
21
|
+
final public var onItemDone: ((Foundation.URL) -> Swift.Void)?
|
|
22
|
+
final public var onQueueEmpty: (() -> Swift.Void)?
|
|
23
|
+
final public func enqueue(_ source: DavoiceTTS.SwiftSoundQueue.Source)
|
|
24
|
+
final public func enqueueMany(_ sources: [DavoiceTTS.SwiftSoundQueue.Source])
|
|
25
|
+
final public func stop()
|
|
26
|
+
public enum Source {
|
|
27
|
+
case fileURL(Foundation.URL)
|
|
28
|
+
case named(Swift.String)
|
|
29
|
+
}
|
|
30
|
+
@objc final public func audioPlayerDidFinishPlaying(_ p: AVFAudio.AVAudioPlayer, successfully ok: Swift.Bool)
|
|
31
|
+
final public func activatePlaybackOnlySession()
|
|
32
|
+
final public func activateSpeaker()
|
|
19
33
|
}
|
|
20
|
-
@objc @
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
@objc final public var
|
|
24
|
-
@objc public static let supportedEvents: [Swift.String]
|
|
25
|
-
@objc final public func pauseSpeechRecognitionLite()
|
|
26
|
-
@objc final public func unPauseSpeechRecognitionLite(_ times: Foundation.NSNumber)
|
|
27
|
-
@objc final public func pauseMicrophoneAndWait(_ timeoutMs: Foundation.NSNumber, completion: @escaping (Swift.Bool, Swift.String?) -> Swift.Void)
|
|
28
|
-
@objc final public func unPauseMicrophoneAndWait(_ timeoutMs: Foundation.NSNumber, completion: @escaping (Swift.Bool, Swift.String?) -> Swift.Void)
|
|
29
|
-
@objc final public func pauseMicrophone()
|
|
30
|
-
@objc final public func unPauseMicrophone()
|
|
31
|
-
@objc final public func setAECEnabled(_ enabled: Swift.Bool)
|
|
32
|
-
@objc final public func isAECEnabled() -> Swift.Bool
|
|
33
|
-
@objc final public func isSpeechAvailable(_ completion: @escaping (Swift.Bool) -> Swift.Void)
|
|
34
|
-
@objc final public func isRecognizing() -> Swift.Bool
|
|
35
|
-
@objc final public func startSpeech(localeStr: Swift.String?)
|
|
36
|
-
@objc final public func startSpeech(localeStr: Swift.String?, onboardingJsonPath: Swift.String)
|
|
37
|
-
@objc final public func stopSpeech(_ completion: ((Swift.Bool) -> Swift.Void)? = nil)
|
|
38
|
-
@objc final public func cancelSpeech(_ completion: ((Swift.Bool) -> Swift.Void)? = nil)
|
|
39
|
-
@objc final public func destroySpeech(_ completion: ((Swift.Bool) -> Swift.Void)? = nil)
|
|
40
|
-
@objc final public func teardown()
|
|
41
|
-
@objc final public func speechRecognizer(_ speechRecognizer: Speech.SFSpeechRecognizer, availabilityDidChange available: Swift.Bool)
|
|
42
|
-
@objc override dynamic public init()
|
|
34
|
+
@objc @objcMembers final public class DaVoiceTTS : ObjectiveC.NSObject {
|
|
35
|
+
public struct Config {
|
|
36
|
+
}
|
|
37
|
+
@objc final public var onLastUtteranceFinished: (() -> Swift.Void)?
|
|
43
38
|
@objc deinit
|
|
39
|
+
public struct Biquad {
|
|
40
|
+
public var b0: Swift.Float, b1: Swift.Float, b2: Swift.Float, a1: Swift.Float, a2: Swift.Float
|
|
41
|
+
public init(b0: Swift.Float, b1: Swift.Float, b2: Swift.Float, a1: Swift.Float, a2: Swift.Float)
|
|
42
|
+
public mutating func process(_ x: Swift.UnsafeMutablePointer<Swift.Float>, _ n: Swift.Int)
|
|
43
|
+
}
|
|
44
|
+
@objc public init(model: Foundation.URL) throws
|
|
45
|
+
@objc final public func stopSpeaking()
|
|
46
|
+
@objc final public func destroy()
|
|
47
|
+
@objc(speak:sid:) final public func speak(_ txt: Swift.String, sid: Swift.Int32 = 0)
|
|
48
|
+
@objc(speak:sid:speed:) final public func speak(_ txt: Swift.String, sid: Swift.Int32 = 0, speed: Swift.Float)
|
|
49
|
+
@objc final public func synthesize_top(_ _text: Swift.String, speakerId: Swift.Int32 = 0, token: Foundation.UUID, speed_adjuster: Swift.Float) throws -> AVFAudio.AVAudioPCMBuffer
|
|
50
|
+
@objc final public func playWav(_ url: Foundation.URL, markAsLastUtterance: Swift.Bool = true)
|
|
51
|
+
@objc final public func playBuffer(_ buffer: AVFAudio.AVAudioPCMBuffer, markAsLastUtterance: Swift.Bool = true)
|
|
52
|
+
}
|
|
53
|
+
public typealias EngineSchedule = (_ url: Foundation.URL, _ onDone: @escaping () -> Swift.Void) -> Swift.Bool
|
|
54
|
+
public typealias IsEngineReady = () -> Swift.Bool
|
|
55
|
+
public typealias useOnlyEnginePlayback = () -> Swift.Bool
|
|
56
|
+
public typealias StopEnginePlayback = () -> Swift.Void
|
|
57
|
+
public typealias CurrentEngineProvider = () -> AVFAudio.AVAudioEngine?
|
|
58
|
+
public enum AudioPlaybackHook {
|
|
59
|
+
public static var engineScheduleFile: DavoiceTTS.EngineSchedule?
|
|
60
|
+
public static var isEngineReady: DavoiceTTS.IsEngineReady?
|
|
61
|
+
public static var useOnlyEnginePlayback: DavoiceTTS.useOnlyEnginePlayback?
|
|
62
|
+
public static var stopEnginePlayback: DavoiceTTS.StopEnginePlayback?
|
|
63
|
+
public static var currentEngine: DavoiceTTS.CurrentEngineProvider?
|
|
44
64
|
}
|
|
45
65
|
public enum SVLogLevel : Swift.Int, Swift.Codable {
|
|
46
66
|
case off, error, warn, info, debug, trace
|
|
@@ -138,59 +158,46 @@ public enum SpeakerVerificationError : Swift.Error, Swift.CustomStringConvertibl
|
|
|
138
158
|
final public func verifyWavFileStreaming(path: Swift.String, resetState: Swift.Bool = true) throws -> DavoiceTTS.SpeakerVerificationResult
|
|
139
159
|
@objc deinit
|
|
140
160
|
}
|
|
141
|
-
@_inheritsConvenienceInitializers @objc(
|
|
161
|
+
@_inheritsConvenienceInitializers @objc(DavoiceSpeakerVerificationRNFacade) final public class SpeakerVerificationRNFacade : ObjectiveC.NSObject {
|
|
142
162
|
@objc(createEngineWithModelPath:enrollmentJsonPath:options:error:) public static func createEngine(modelPath: Swift.String, enrollmentJsonPath: Swift.String, options: [Swift.String : Any], error outError: Foundation.NSErrorPointer) -> Any?
|
|
143
163
|
@objc(verifyWavWithEngine:wavPath:reset:error:) public static func verifyWav(engine: Any, wavPath: Swift.String, reset: Swift.Bool, error outError: Foundation.NSErrorPointer) -> [Swift.String : Any]?
|
|
144
164
|
@objc override dynamic public init()
|
|
145
165
|
@objc deinit
|
|
146
166
|
}
|
|
147
|
-
@objc
|
|
148
|
-
@objc
|
|
149
|
-
public static let shared: DavoiceTTS.SwiftSoundQueue
|
|
150
|
-
final public func notifyWhenURLFinishes(_ url: Foundation.URL, _ cb: @escaping () -> Swift.Void)
|
|
151
|
-
final public var onItemDone: ((Foundation.URL) -> Swift.Void)?
|
|
152
|
-
final public var onQueueEmpty: (() -> Swift.Void)?
|
|
153
|
-
final public func enqueue(_ source: DavoiceTTS.SwiftSoundQueue.Source)
|
|
154
|
-
final public func enqueueMany(_ sources: [DavoiceTTS.SwiftSoundQueue.Source])
|
|
155
|
-
final public func stop()
|
|
156
|
-
public enum Source {
|
|
157
|
-
case fileURL(Foundation.URL)
|
|
158
|
-
case named(Swift.String)
|
|
159
|
-
}
|
|
160
|
-
@objc final public func audioPlayerDidFinishPlaying(_ p: AVFAudio.AVAudioPlayer, successfully ok: Swift.Bool)
|
|
161
|
-
final public func activatePlaybackOnlySession()
|
|
162
|
-
final public func activateSpeaker()
|
|
167
|
+
@objc public protocol STTDelegate {
|
|
168
|
+
@objc func stt(_ stt: DavoiceTTS.STT, didEmitEvent name: Swift.String, body: [Swift.String : Any]?)
|
|
163
169
|
}
|
|
164
|
-
@objc @objcMembers final public class
|
|
165
|
-
public
|
|
166
|
-
|
|
167
|
-
@objc final public var
|
|
170
|
+
@objc @_inheritsConvenienceInitializers @objcMembers final public class STT : ObjectiveC.NSObject, Speech.SFSpeechRecognizerDelegate {
|
|
171
|
+
@objc weak final public var delegate: (any DavoiceTTS.STTDelegate)?
|
|
172
|
+
@objc final public var continuous: Swift.Bool
|
|
173
|
+
@objc final public var aecEnabled: Swift.Bool
|
|
174
|
+
@objc final public var force16kMicSampleRate: Swift.Bool
|
|
175
|
+
@objc final public var useLegacySpeakerGateBehavior: Swift.Bool
|
|
176
|
+
@objc final public var useSpeakerGateHangover: Swift.Bool
|
|
177
|
+
@objc final public var speakerGateHangoverSeconds: Swift.Double
|
|
178
|
+
@objc final public var useShortSpeakerVerificationTailWindow: Swift.Bool
|
|
179
|
+
@objc final public var shortSpeakerVerificationTailSeconds: Swift.Float
|
|
180
|
+
@objc final public var speakerPreRollFlushMaxSeconds: Swift.Double
|
|
181
|
+
@objc public static let supportedEvents: [Swift.String]
|
|
182
|
+
@objc final public func pauseSpeechRecognitionLite()
|
|
183
|
+
@objc final public func unPauseSpeechRecognitionLite(_ times: Foundation.NSNumber)
|
|
184
|
+
@objc final public func pauseMicrophoneAndWait(_ timeoutMs: Foundation.NSNumber, completion: @escaping (Swift.Bool, Swift.String?) -> Swift.Void)
|
|
185
|
+
@objc final public func unPauseMicrophoneAndWait(_ timeoutMs: Foundation.NSNumber, completion: @escaping (Swift.Bool, Swift.String?) -> Swift.Void)
|
|
186
|
+
@objc final public func pauseMicrophone()
|
|
187
|
+
@objc final public func unPauseMicrophone()
|
|
188
|
+
@objc final public func setAECEnabled(_ enabled: Swift.Bool)
|
|
189
|
+
@objc final public func isAECEnabled() -> Swift.Bool
|
|
190
|
+
@objc final public func isSpeechAvailable(_ completion: @escaping (Swift.Bool) -> Swift.Void)
|
|
191
|
+
@objc final public func isRecognizing() -> Swift.Bool
|
|
192
|
+
@objc final public func startSpeech(localeStr: Swift.String?)
|
|
193
|
+
@objc final public func startSpeech(localeStr: Swift.String?, onboardingJsonPath: Swift.String)
|
|
194
|
+
@objc final public func stopSpeech(_ completion: ((Swift.Bool) -> Swift.Void)? = nil)
|
|
195
|
+
@objc final public func cancelSpeech(_ completion: ((Swift.Bool) -> Swift.Void)? = nil)
|
|
196
|
+
@objc final public func destroySpeech(_ completion: ((Swift.Bool) -> Swift.Void)? = nil)
|
|
197
|
+
@objc final public func teardown()
|
|
198
|
+
@objc final public func speechRecognizer(_ speechRecognizer: Speech.SFSpeechRecognizer, availabilityDidChange available: Swift.Bool)
|
|
199
|
+
@objc override dynamic public init()
|
|
168
200
|
@objc deinit
|
|
169
|
-
public struct Biquad {
|
|
170
|
-
public var b0: Swift.Float, b1: Swift.Float, b2: Swift.Float, a1: Swift.Float, a2: Swift.Float
|
|
171
|
-
public init(b0: Swift.Float, b1: Swift.Float, b2: Swift.Float, a1: Swift.Float, a2: Swift.Float)
|
|
172
|
-
public mutating func process(_ x: Swift.UnsafeMutablePointer<Swift.Float>, _ n: Swift.Int)
|
|
173
|
-
}
|
|
174
|
-
@objc public init(model: Foundation.URL) throws
|
|
175
|
-
@objc final public func stopSpeaking()
|
|
176
|
-
@objc final public func destroy()
|
|
177
|
-
@objc(speak:sid:) final public func speak(_ txt: Swift.String, sid: Swift.Int32 = 0)
|
|
178
|
-
@objc(speak:sid:speed:) final public func speak(_ txt: Swift.String, sid: Swift.Int32 = 0, speed: Swift.Float)
|
|
179
|
-
@objc final public func synthesize_top(_ _text: Swift.String, speakerId: Swift.Int32 = 0, token: Foundation.UUID, speed_adjuster: Swift.Float) throws -> AVFAudio.AVAudioPCMBuffer
|
|
180
|
-
@objc final public func playWav(_ url: Foundation.URL, markAsLastUtterance: Swift.Bool = true)
|
|
181
|
-
@objc final public func playBuffer(_ buffer: AVFAudio.AVAudioPCMBuffer, markAsLastUtterance: Swift.Bool = true)
|
|
182
|
-
}
|
|
183
|
-
public typealias EngineSchedule = (_ url: Foundation.URL, _ onDone: @escaping () -> Swift.Void) -> Swift.Bool
|
|
184
|
-
public typealias IsEngineReady = () -> Swift.Bool
|
|
185
|
-
public typealias useOnlyEnginePlayback = () -> Swift.Bool
|
|
186
|
-
public typealias StopEnginePlayback = () -> Swift.Void
|
|
187
|
-
public typealias CurrentEngineProvider = () -> AVFAudio.AVAudioEngine?
|
|
188
|
-
public enum AudioPlaybackHook {
|
|
189
|
-
public static var engineScheduleFile: DavoiceTTS.EngineSchedule?
|
|
190
|
-
public static var isEngineReady: DavoiceTTS.IsEngineReady?
|
|
191
|
-
public static var useOnlyEnginePlayback: DavoiceTTS.useOnlyEnginePlayback?
|
|
192
|
-
public static var stopEnginePlayback: DavoiceTTS.StopEnginePlayback?
|
|
193
|
-
public static var currentEngine: DavoiceTTS.CurrentEngineProvider?
|
|
194
201
|
}
|
|
195
202
|
extension DavoiceTTS.SVLogLevel : Swift.Equatable {}
|
|
196
203
|
extension DavoiceTTS.SVLogLevel : Swift.Hashable {}
|
|
Binary file
|
|
Binary file
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
</data>
|
|
15
15
|
<key>Headers/DavoiceTTS-Swift.h</key>
|
|
16
16
|
<data>
|
|
17
|
-
|
|
17
|
+
oPI/EK4v9rLVeZz0HFu9GfLUZyc=
|
|
18
18
|
</data>
|
|
19
19
|
<key>Info.plist</key>
|
|
20
20
|
<data>
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
</data>
|
|
23
23
|
<key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.abi.json</key>
|
|
24
24
|
<data>
|
|
25
|
-
|
|
25
|
+
fo3s73e/wiPZukK1lndQWF1JZ6I=
|
|
26
26
|
</data>
|
|
27
27
|
<key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
|
|
28
28
|
<data>
|
|
29
|
-
|
|
29
|
+
KVkV1ruaFZtCdwJXiFdrdgr6ueU=
|
|
30
30
|
</data>
|
|
31
31
|
<key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
|
|
32
32
|
<data>
|
|
@@ -34,19 +34,19 @@
|
|
|
34
34
|
</data>
|
|
35
35
|
<key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
|
|
36
36
|
<data>
|
|
37
|
-
|
|
37
|
+
KVkV1ruaFZtCdwJXiFdrdgr6ueU=
|
|
38
38
|
</data>
|
|
39
39
|
<key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key>
|
|
40
40
|
<data>
|
|
41
|
-
|
|
41
|
+
S0g+LoSwUCvo/7sU9gTYqLJJUug=
|
|
42
42
|
</data>
|
|
43
43
|
<key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
|
|
44
44
|
<data>
|
|
45
|
-
|
|
45
|
+
fo3s73e/wiPZukK1lndQWF1JZ6I=
|
|
46
46
|
</data>
|
|
47
47
|
<key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
|
|
48
48
|
<data>
|
|
49
|
-
|
|
49
|
+
VGN8fu+7Yrg5cBMaX7x/ePudro8=
|
|
50
50
|
</data>
|
|
51
51
|
<key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
|
|
52
52
|
<data>
|
|
@@ -54,11 +54,11 @@
|
|
|
54
54
|
</data>
|
|
55
55
|
<key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key>
|
|
56
56
|
<data>
|
|
57
|
-
|
|
57
|
+
VGN8fu+7Yrg5cBMaX7x/ePudro8=
|
|
58
58
|
</data>
|
|
59
59
|
<key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key>
|
|
60
60
|
<data>
|
|
61
|
-
|
|
61
|
+
XumRYqKZ5X8xKtk4PT7LEw6jLpU=
|
|
62
62
|
</data>
|
|
63
63
|
<key>Modules/module.modulemap</key>
|
|
64
64
|
<data>
|
|
@@ -93,33 +93,33 @@
|
|
|
93
93
|
<dict>
|
|
94
94
|
<key>hash</key>
|
|
95
95
|
<data>
|
|
96
|
-
|
|
96
|
+
oPI/EK4v9rLVeZz0HFu9GfLUZyc=
|
|
97
97
|
</data>
|
|
98
98
|
<key>hash2</key>
|
|
99
99
|
<data>
|
|
100
|
-
|
|
100
|
+
JLnpjYmWT9yRlzhA2CRm2RCMzODFbj7GH1G6J6dUn64=
|
|
101
101
|
</data>
|
|
102
102
|
</dict>
|
|
103
103
|
<key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.abi.json</key>
|
|
104
104
|
<dict>
|
|
105
105
|
<key>hash</key>
|
|
106
106
|
<data>
|
|
107
|
-
|
|
107
|
+
fo3s73e/wiPZukK1lndQWF1JZ6I=
|
|
108
108
|
</data>
|
|
109
109
|
<key>hash2</key>
|
|
110
110
|
<data>
|
|
111
|
-
|
|
111
|
+
+m87eommXoWnYWEWF6eTDkMAwnYrFJpgI7BsRjBZRm8=
|
|
112
112
|
</data>
|
|
113
113
|
</dict>
|
|
114
114
|
<key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
|
|
115
115
|
<dict>
|
|
116
116
|
<key>hash</key>
|
|
117
117
|
<data>
|
|
118
|
-
|
|
118
|
+
KVkV1ruaFZtCdwJXiFdrdgr6ueU=
|
|
119
119
|
</data>
|
|
120
120
|
<key>hash2</key>
|
|
121
121
|
<data>
|
|
122
|
-
|
|
122
|
+
F7FF3qFMUTD0s4/LwPFLShO/6iRzL1YfoAjc9qi+VNw=
|
|
123
123
|
</data>
|
|
124
124
|
</dict>
|
|
125
125
|
<key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
|
|
@@ -137,44 +137,44 @@
|
|
|
137
137
|
<dict>
|
|
138
138
|
<key>hash</key>
|
|
139
139
|
<data>
|
|
140
|
-
|
|
140
|
+
KVkV1ruaFZtCdwJXiFdrdgr6ueU=
|
|
141
141
|
</data>
|
|
142
142
|
<key>hash2</key>
|
|
143
143
|
<data>
|
|
144
|
-
|
|
144
|
+
F7FF3qFMUTD0s4/LwPFLShO/6iRzL1YfoAjc9qi+VNw=
|
|
145
145
|
</data>
|
|
146
146
|
</dict>
|
|
147
147
|
<key>Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key>
|
|
148
148
|
<dict>
|
|
149
149
|
<key>hash</key>
|
|
150
150
|
<data>
|
|
151
|
-
|
|
151
|
+
S0g+LoSwUCvo/7sU9gTYqLJJUug=
|
|
152
152
|
</data>
|
|
153
153
|
<key>hash2</key>
|
|
154
154
|
<data>
|
|
155
|
-
|
|
155
|
+
KvhnUVZQGrlgSi6oKKciV3Ry5wVl6+QDzZTE0/OtEGE=
|
|
156
156
|
</data>
|
|
157
157
|
</dict>
|
|
158
158
|
<key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
|
|
159
159
|
<dict>
|
|
160
160
|
<key>hash</key>
|
|
161
161
|
<data>
|
|
162
|
-
|
|
162
|
+
fo3s73e/wiPZukK1lndQWF1JZ6I=
|
|
163
163
|
</data>
|
|
164
164
|
<key>hash2</key>
|
|
165
165
|
<data>
|
|
166
|
-
|
|
166
|
+
+m87eommXoWnYWEWF6eTDkMAwnYrFJpgI7BsRjBZRm8=
|
|
167
167
|
</data>
|
|
168
168
|
</dict>
|
|
169
169
|
<key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
|
|
170
170
|
<dict>
|
|
171
171
|
<key>hash</key>
|
|
172
172
|
<data>
|
|
173
|
-
|
|
173
|
+
VGN8fu+7Yrg5cBMaX7x/ePudro8=
|
|
174
174
|
</data>
|
|
175
175
|
<key>hash2</key>
|
|
176
176
|
<data>
|
|
177
|
-
|
|
177
|
+
J1tmmoQe5h603NXXjjpVv+AZsuXc56oikkYx3fxDC8Q=
|
|
178
178
|
</data>
|
|
179
179
|
</dict>
|
|
180
180
|
<key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
|
|
@@ -192,22 +192,22 @@
|
|
|
192
192
|
<dict>
|
|
193
193
|
<key>hash</key>
|
|
194
194
|
<data>
|
|
195
|
-
|
|
195
|
+
VGN8fu+7Yrg5cBMaX7x/ePudro8=
|
|
196
196
|
</data>
|
|
197
197
|
<key>hash2</key>
|
|
198
198
|
<data>
|
|
199
|
-
|
|
199
|
+
J1tmmoQe5h603NXXjjpVv+AZsuXc56oikkYx3fxDC8Q=
|
|
200
200
|
</data>
|
|
201
201
|
</dict>
|
|
202
202
|
<key>Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key>
|
|
203
203
|
<dict>
|
|
204
204
|
<key>hash</key>
|
|
205
205
|
<data>
|
|
206
|
-
|
|
206
|
+
XumRYqKZ5X8xKtk4PT7LEw6jLpU=
|
|
207
207
|
</data>
|
|
208
208
|
<key>hash2</key>
|
|
209
209
|
<data>
|
|
210
|
-
|
|
210
|
+
jYF21hPpJTApLzhnKHHmKEx2+tUW6FgHnA1i76EzUJ0=
|
|
211
211
|
</data>
|
|
212
212
|
</dict>
|
|
213
213
|
<key>Modules/module.modulemap</key>
|
package/package.json
CHANGED
package/speech/index.ts
CHANGED
|
@@ -185,6 +185,7 @@ class Speech {
|
|
|
185
185
|
private lastLocale: string | null = null;
|
|
186
186
|
private lastModel: string | null = null;
|
|
187
187
|
private iosTtsOnly = false; // when true, use NativeTTS directly on iOS
|
|
188
|
+
private androidTtsPlaybackOnly = false;
|
|
188
189
|
|
|
189
190
|
|
|
190
191
|
private logCall(name: string, payload?: any) {
|
|
@@ -322,9 +323,42 @@ class Speech {
|
|
|
322
323
|
console.log('[MODELDBG] initAllRemoteSTT.modelPath (resolved)=', modelPath);
|
|
323
324
|
console.log('[MODELDBG] initAllRemoteSTT.modelExt (resolved)=', modelExt);
|
|
324
325
|
await NativeTTS.initTTS({ model: modelPath, modelExt });
|
|
326
|
+
this.androidTtsPlaybackOnly = false;
|
|
325
327
|
await sleep(500);
|
|
326
328
|
}
|
|
327
329
|
|
|
330
|
+
/**
|
|
331
|
+
* ANDROID ONLY: Start remote STT and initialize TTS in playback-only mode (no model/ONNX init).
|
|
332
|
+
* Accepts the same argument shape as initAllRemoteSTT() for API compatibility.
|
|
333
|
+
* model/onboardingJsonPath are intentionally ignored on Android for now.
|
|
334
|
+
*/
|
|
335
|
+
async initAllRemoteSTTAndTTS(
|
|
336
|
+
_modelOrOpts?: ModelRef | { model: ModelRef; onboardingJsonPath?: string },
|
|
337
|
+
): Promise<void> {
|
|
338
|
+
if (Platform.OS !== 'android') {
|
|
339
|
+
throw new Error('initAllRemoteSTTAndTTS is Android-only.');
|
|
340
|
+
}
|
|
341
|
+
if (!NativeSTT?.startRemoteSpeech) {
|
|
342
|
+
throw new Error('Native STT module missing startRemoteSpeech()');
|
|
343
|
+
}
|
|
344
|
+
this.ensureListeners();
|
|
345
|
+
|
|
346
|
+
await new Promise<void>((resolve, reject) => {
|
|
347
|
+
try {
|
|
348
|
+
NativeSTT.startRemoteSpeech((err: string) => (err ? reject(new Error(err)) : resolve()));
|
|
349
|
+
} catch (e) {
|
|
350
|
+
reject(e as any);
|
|
351
|
+
}
|
|
352
|
+
});
|
|
353
|
+
|
|
354
|
+
if (!NativeTTS?.initTTSPlaybackOnly) {
|
|
355
|
+
throw new Error('Native TTS module missing initTTSPlaybackOnly()');
|
|
356
|
+
}
|
|
357
|
+
await NativeTTS.initTTSPlaybackOnly();
|
|
358
|
+
this.androidTtsPlaybackOnly = true;
|
|
359
|
+
await sleep(200);
|
|
360
|
+
}
|
|
361
|
+
|
|
328
362
|
dbgModel(label: string, model: any) {
|
|
329
363
|
try {
|
|
330
364
|
console.log(`[MODELDBG] ${label} typeof=`, typeof model, ' value=', model);
|
|
@@ -408,12 +442,14 @@ class Speech {
|
|
|
408
442
|
const modelExt = this.resolveModelExt(opts.model);
|
|
409
443
|
console.log('[MODELDBG] initAll.modelExt (resolved)=', modelExt);
|
|
410
444
|
await NativeTTS.initTTS({ model: modelPath, modelExt });
|
|
445
|
+
this.androidTtsPlaybackOnly = false;
|
|
411
446
|
}
|
|
412
447
|
|
|
413
448
|
async destroyAll() {
|
|
414
449
|
this._cancelTtsWait('destroyAll');
|
|
415
450
|
this.ttsChain = Promise.resolve();
|
|
416
451
|
this.wavChain = Promise.resolve();
|
|
452
|
+
this.androidTtsPlaybackOnly = false;
|
|
417
453
|
|
|
418
454
|
// iOS unified
|
|
419
455
|
if (Platform.OS === 'ios' && NativeSpeech?.destroyAll) {
|
|
@@ -681,6 +717,7 @@ class Speech {
|
|
|
681
717
|
if (!cfg?.model) throw new Error("initTTS: missing 'model'");
|
|
682
718
|
const modelPath = this.resolveModelToPath(cfg.model);
|
|
683
719
|
this.lastModel = modelPath;
|
|
720
|
+
this.androidTtsPlaybackOnly = false;
|
|
684
721
|
return NativeTTS.initTTS({ model: modelPath });
|
|
685
722
|
}
|
|
686
723
|
|