react-native-davoice-tts 1.0.405 → 1.0.407
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/README.md +11 -0
- package/TTSRNBridge.podspec +1 -1
- package/android/.gradle/8.9/checksums/checksums.lock +0 -0
- package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/9.7.1/checksums/checksums.lock +0 -0
- package/android/.gradle/9.7.1/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +1 -1
- package/android/build/reports/problems/problems-report.html +9 -2
- 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 +90 -22
- package/android/src/main/java/com/davoice/tts/rn/DaVoiceTTSBridge.java +16 -0
- package/ios/SpeechBridge/SpeechBridge.m +108 -12
- package/ios/TTSRNBridge/DaVoiceTTSBridge.m +6 -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 +24 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.abi.json +1708 -360
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.private.swiftinterface +35 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.swiftinterface +35 -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 +48 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.abi.json +1708 -360
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +35 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftinterface +35 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.abi.json +1708 -360
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +35 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +35 -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 +33 -33
- package/package.json +1 -1
- package/speech/index.d.ts +42 -1
- package/speech/index.ts +115 -4
- package/android/.gradle/9.2.0/checksums/checksums.lock +0 -0
- package/android/.gradle/9.2.0/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/9.2.0/fileHashes/fileHashes.lock +0 -0
- /package/android/.gradle/{9.2.0 → 9.7.1}/fileChanges/last-build.bin +0 -0
- /package/android/.gradle/{9.2.0 → 9.7.1}/gc.properties +0 -0
|
@@ -96,6 +96,17 @@ public enum AudioPlaybackHook {
|
|
|
96
96
|
@objc final public func startSpeech(localeStr: Swift.String?, onboardingJsonPath: Swift.String)
|
|
97
97
|
#endif
|
|
98
98
|
#if compiler(>=5.3) && $NonescapableTypes
|
|
99
|
+
@objc final public func startSpeech(localeStr: Swift.String?, onboardingJsonPath: Swift.String, speakerId: Swift.String)
|
|
100
|
+
#endif
|
|
101
|
+
#if compiler(>=5.3) && $NonescapableTypes
|
|
102
|
+
@objc final public func startSpeech(localeStr: Swift.String?, speakers: [[Swift.String : Swift.String]])
|
|
103
|
+
#endif
|
|
104
|
+
@objc final public func addSpeaker(id: Swift.String, jsonOrPath: Swift.String) throws
|
|
105
|
+
@objc final public func setSpeakers(_ speakers: [[Swift.String : Swift.String]]) throws
|
|
106
|
+
@objc @discardableResult
|
|
107
|
+
final public func removeSpeaker(id: Swift.String) -> Swift.Bool
|
|
108
|
+
@objc final public func getSpeakerIds() -> [Swift.String]
|
|
109
|
+
#if compiler(>=5.3) && $NonescapableTypes
|
|
99
110
|
@objc final public func stopSpeech(_ completion: ((Swift.Bool) -> Swift.Void)? = nil)
|
|
100
111
|
#endif
|
|
101
112
|
#if compiler(>=5.3) && $NonescapableTypes
|
|
@@ -148,6 +159,7 @@ public enum AudioPlaybackHook {
|
|
|
148
159
|
get
|
|
149
160
|
}
|
|
150
161
|
}
|
|
162
|
+
@objc final public func getAllVoices() -> [Swift.String]
|
|
151
163
|
@objc(changeVoice:completion:) final public func changeVoice(_ name: Swift.String, completion: @escaping (Swift.Int) -> Swift.Void)
|
|
152
164
|
@objc final public var onLastUtteranceFinished: (() -> Swift.Void)?
|
|
153
165
|
@objc deinit
|
|
@@ -243,6 +255,25 @@ public struct SpeakerEnrollment : Swift.Codable {
|
|
|
243
255
|
public static func deserialize(_ data: Foundation.Data) throws -> DavoiceTTS.SpeakerEnrollment
|
|
244
256
|
public func encode(to encoder: any Swift.Encoder) throws
|
|
245
257
|
}
|
|
258
|
+
public struct SVSpeaker {
|
|
259
|
+
public let id: Swift.String
|
|
260
|
+
public let enrollment: DavoiceTTS.SpeakerEnrollment
|
|
261
|
+
public let threshold: Swift.Float
|
|
262
|
+
public let contentKey: Swift.String
|
|
263
|
+
#if compiler(>=5.3) && $NonescapableTypes
|
|
264
|
+
public init(id: Swift.String, enrollment: DavoiceTTS.SpeakerEnrollment, threshold: Swift.Float? = nil)
|
|
265
|
+
#endif
|
|
266
|
+
public static func contentKey(of e: DavoiceTTS.SpeakerEnrollment) -> Swift.String
|
|
267
|
+
}
|
|
268
|
+
public enum SVSpeakerSet {
|
|
269
|
+
public static let defaultSpeakerId: Swift.String
|
|
270
|
+
public static func loadEnrollment(jsonOrPath: Swift.String) throws -> DavoiceTTS.SpeakerEnrollment
|
|
271
|
+
#if compiler(>=5.3) && $NonescapableTypes
|
|
272
|
+
public static func incompatibility(_ e: DavoiceTTS.SpeakerEnrollment, base: DavoiceTTS.SpeakerVerificationConfig, baseDim: Swift.Int) -> Swift.String?
|
|
273
|
+
#endif
|
|
274
|
+
public static func upsert(_ list: [DavoiceTTS.SVSpeaker], _ s: DavoiceTTS.SVSpeaker) -> (list: [DavoiceTTS.SVSpeaker], removed: [Swift.String])
|
|
275
|
+
public static func build(_ items: [DavoiceTTS.SVSpeaker]) -> (list: [DavoiceTTS.SVSpeaker], removed: [Swift.String])
|
|
276
|
+
}
|
|
246
277
|
public struct SVPendingInfo {
|
|
247
278
|
public let bufferedSamples: Swift.Int
|
|
248
279
|
public let bufferedSeconds: Swift.Float
|
|
@@ -257,6 +288,8 @@ public struct SpeakerVerificationResult {
|
|
|
257
288
|
public let bestKind: Swift.String
|
|
258
289
|
public let bestId: Swift.String
|
|
259
290
|
public let isMatch: Swift.Bool
|
|
291
|
+
public let speakerId: Swift.String?
|
|
292
|
+
public let speakerScores: [Swift.String : Swift.Float]
|
|
260
293
|
public let embeddingDim: Swift.Int
|
|
261
294
|
public let usedSeconds: Swift.Float
|
|
262
295
|
public let ortRunMs: Swift.Double
|
|
@@ -286,6 +319,8 @@ public enum SpeakerVerificationError : Swift.Error, Swift.CustomStringConvertibl
|
|
|
286
319
|
#if compiler(>=5.3) && $NonescapableTypes
|
|
287
320
|
final public func setEnrollment(_ enrollment: DavoiceTTS.SpeakerEnrollment?)
|
|
288
321
|
#endif
|
|
322
|
+
final public func setSpeakers(_ list: [DavoiceTTS.SVSpeaker])
|
|
323
|
+
final public func currentSpeakers() -> [DavoiceTTS.SVSpeaker]
|
|
289
324
|
@objc final public func resetStreamingState()
|
|
290
325
|
final public func processFrame(frame: [Swift.Float]) throws -> DavoiceTTS.SpeakerVerificationOutput
|
|
291
326
|
final public func verifyWavFileStreaming(path: Swift.String, resetState: Swift.Bool = true) throws -> DavoiceTTS.SpeakerVerificationResult
|
|
Binary file
|
|
@@ -96,6 +96,17 @@ public enum AudioPlaybackHook {
|
|
|
96
96
|
@objc final public func startSpeech(localeStr: Swift.String?, onboardingJsonPath: Swift.String)
|
|
97
97
|
#endif
|
|
98
98
|
#if compiler(>=5.3) && $NonescapableTypes
|
|
99
|
+
@objc final public func startSpeech(localeStr: Swift.String?, onboardingJsonPath: Swift.String, speakerId: Swift.String)
|
|
100
|
+
#endif
|
|
101
|
+
#if compiler(>=5.3) && $NonescapableTypes
|
|
102
|
+
@objc final public func startSpeech(localeStr: Swift.String?, speakers: [[Swift.String : Swift.String]])
|
|
103
|
+
#endif
|
|
104
|
+
@objc final public func addSpeaker(id: Swift.String, jsonOrPath: Swift.String) throws
|
|
105
|
+
@objc final public func setSpeakers(_ speakers: [[Swift.String : Swift.String]]) throws
|
|
106
|
+
@objc @discardableResult
|
|
107
|
+
final public func removeSpeaker(id: Swift.String) -> Swift.Bool
|
|
108
|
+
@objc final public func getSpeakerIds() -> [Swift.String]
|
|
109
|
+
#if compiler(>=5.3) && $NonescapableTypes
|
|
99
110
|
@objc final public func stopSpeech(_ completion: ((Swift.Bool) -> Swift.Void)? = nil)
|
|
100
111
|
#endif
|
|
101
112
|
#if compiler(>=5.3) && $NonescapableTypes
|
|
@@ -148,6 +159,7 @@ public enum AudioPlaybackHook {
|
|
|
148
159
|
get
|
|
149
160
|
}
|
|
150
161
|
}
|
|
162
|
+
@objc final public func getAllVoices() -> [Swift.String]
|
|
151
163
|
@objc(changeVoice:completion:) final public func changeVoice(_ name: Swift.String, completion: @escaping (Swift.Int) -> Swift.Void)
|
|
152
164
|
@objc final public var onLastUtteranceFinished: (() -> Swift.Void)?
|
|
153
165
|
@objc deinit
|
|
@@ -243,6 +255,25 @@ public struct SpeakerEnrollment : Swift.Codable {
|
|
|
243
255
|
public static func deserialize(_ data: Foundation.Data) throws -> DavoiceTTS.SpeakerEnrollment
|
|
244
256
|
public func encode(to encoder: any Swift.Encoder) throws
|
|
245
257
|
}
|
|
258
|
+
public struct SVSpeaker {
|
|
259
|
+
public let id: Swift.String
|
|
260
|
+
public let enrollment: DavoiceTTS.SpeakerEnrollment
|
|
261
|
+
public let threshold: Swift.Float
|
|
262
|
+
public let contentKey: Swift.String
|
|
263
|
+
#if compiler(>=5.3) && $NonescapableTypes
|
|
264
|
+
public init(id: Swift.String, enrollment: DavoiceTTS.SpeakerEnrollment, threshold: Swift.Float? = nil)
|
|
265
|
+
#endif
|
|
266
|
+
public static func contentKey(of e: DavoiceTTS.SpeakerEnrollment) -> Swift.String
|
|
267
|
+
}
|
|
268
|
+
public enum SVSpeakerSet {
|
|
269
|
+
public static let defaultSpeakerId: Swift.String
|
|
270
|
+
public static func loadEnrollment(jsonOrPath: Swift.String) throws -> DavoiceTTS.SpeakerEnrollment
|
|
271
|
+
#if compiler(>=5.3) && $NonescapableTypes
|
|
272
|
+
public static func incompatibility(_ e: DavoiceTTS.SpeakerEnrollment, base: DavoiceTTS.SpeakerVerificationConfig, baseDim: Swift.Int) -> Swift.String?
|
|
273
|
+
#endif
|
|
274
|
+
public static func upsert(_ list: [DavoiceTTS.SVSpeaker], _ s: DavoiceTTS.SVSpeaker) -> (list: [DavoiceTTS.SVSpeaker], removed: [Swift.String])
|
|
275
|
+
public static func build(_ items: [DavoiceTTS.SVSpeaker]) -> (list: [DavoiceTTS.SVSpeaker], removed: [Swift.String])
|
|
276
|
+
}
|
|
246
277
|
public struct SVPendingInfo {
|
|
247
278
|
public let bufferedSamples: Swift.Int
|
|
248
279
|
public let bufferedSeconds: Swift.Float
|
|
@@ -257,6 +288,8 @@ public struct SpeakerVerificationResult {
|
|
|
257
288
|
public let bestKind: Swift.String
|
|
258
289
|
public let bestId: Swift.String
|
|
259
290
|
public let isMatch: Swift.Bool
|
|
291
|
+
public let speakerId: Swift.String?
|
|
292
|
+
public let speakerScores: [Swift.String : Swift.Float]
|
|
260
293
|
public let embeddingDim: Swift.Int
|
|
261
294
|
public let usedSeconds: Swift.Float
|
|
262
295
|
public let ortRunMs: Swift.Double
|
|
@@ -286,6 +319,8 @@ public enum SpeakerVerificationError : Swift.Error, Swift.CustomStringConvertibl
|
|
|
286
319
|
#if compiler(>=5.3) && $NonescapableTypes
|
|
287
320
|
final public func setEnrollment(_ enrollment: DavoiceTTS.SpeakerEnrollment?)
|
|
288
321
|
#endif
|
|
322
|
+
final public func setSpeakers(_ list: [DavoiceTTS.SVSpeaker])
|
|
323
|
+
final public func currentSpeakers() -> [DavoiceTTS.SVSpeaker]
|
|
289
324
|
@objc final public func resetStreamingState()
|
|
290
325
|
final public func processFrame(frame: [Swift.Float]) throws -> DavoiceTTS.SpeakerVerificationOutput
|
|
291
326
|
final public func verifyWavFileStreaming(path: Swift.String, resetState: Swift.Bool = true) throws -> DavoiceTTS.SpeakerVerificationResult
|
|
Binary file
|
|
@@ -350,6 +350,10 @@ SWIFT_CLASS("_TtC10DavoiceTTS10DaVoiceTTS")
|
|
|
350
350
|
+ (void)setUseDavoiceProprietaryPhonemizer:(BOOL)enabled;
|
|
351
351
|
+ (BOOL)getUseDavoiceProprietaryPhonemizer SWIFT_WARN_UNUSED_RESULT;
|
|
352
352
|
- (BOOL)isUsingDavoiceProprietaryPhonemizer SWIFT_WARN_UNUSED_RESULT;
|
|
353
|
+
/// Voices available in the loaded .dm (the names changeVoice() accepts, the
|
|
354
|
+
/// first being the default). Empty for v1 models, a .dm without voices, or
|
|
355
|
+
/// after destroy().
|
|
356
|
+
- (NSArray<NSString *> * _Nonnull)getAllVoices SWIFT_WARN_UNUSED_RESULT;
|
|
353
357
|
- (void)changeVoice:(NSString * _Nonnull)name completion:(void (^ _Nonnull)(NSInteger))completion;
|
|
354
358
|
@property (nonatomic, copy) void (^ _Nullable onLastUtteranceFinished)(void);
|
|
355
359
|
+ (BOOL)activateLicenseWithLicenseKey:(NSString * _Nonnull)licenseKey SWIFT_WARN_UNUSED_RESULT;
|
|
@@ -416,7 +420,27 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSArray<NSStri
|
|
|
416
420
|
- (void)isSpeechAvailable:(void (^ _Nonnull)(BOOL))completion;
|
|
417
421
|
- (BOOL)isRecognizing SWIFT_WARN_UNUSED_RESULT;
|
|
418
422
|
- (void)startSpeechWithLocaleStr:(NSString * _Nullable)localeStr;
|
|
423
|
+
/// Starts STT with one speaker. <code>onboardingJsonPath</code> may be a path or the JSON
|
|
424
|
+
/// itself. The speaker is added to the current set (same id or same voiceprint
|
|
425
|
+
/// replaces the older entry) under the id “default”.
|
|
419
426
|
- (void)startSpeechWithLocaleStr:(NSString * _Nullable)localeStr onboardingJsonPath:(NSString * _Nonnull)onboardingJsonPath;
|
|
427
|
+
- (void)startSpeechWithLocaleStr:(NSString * _Nullable)localeStr onboardingJsonPath:(NSString * _Nonnull)onboardingJsonPath speakerId:(NSString * _Nonnull)speakerId;
|
|
428
|
+
/// Starts STT with an array of speakers, replacing the current set.
|
|
429
|
+
/// Each item: [“id”: speakerId, “json”: JSON string or path to the JSON file].
|
|
430
|
+
- (void)startSpeechWithLocaleStr:(NSString * _Nullable)localeStr speakers:(NSArray<NSDictionary<NSString *, NSString *> *> * _Nonnull)speakers;
|
|
431
|
+
/// Adds one speaker (JSON string or path). Same id or same voiceprint replaces
|
|
432
|
+
/// the older entry. Applies immediately when STT is running, otherwise at the
|
|
433
|
+
/// next start. Throws if the JSON can’t be read or its audio-feature settings
|
|
434
|
+
/// differ from the running engine’s.
|
|
435
|
+
- (BOOL)addSpeakerWithId:(NSString * _Nonnull)id jsonOrPath:(NSString * _Nonnull)jsonOrPath error:(NSError * _Nullable * _Nullable)error;
|
|
436
|
+
/// Replaces the whole speaker set. Items: [“id”: …, “json”: JSON string or path].
|
|
437
|
+
/// An empty array turns speaker verification off.
|
|
438
|
+
- (BOOL)setSpeakers:(NSArray<NSDictionary<NSString *, NSString *> *> * _Nonnull)speakers error:(NSError * _Nullable * _Nullable)error;
|
|
439
|
+
/// Removes a speaker by id. Removing the last one turns the gate off (all audio
|
|
440
|
+
/// passes). Returns false if the id wasn’t enrolled.
|
|
441
|
+
- (BOOL)removeSpeakerWithId:(NSString * _Nonnull)id;
|
|
442
|
+
/// Ids of the enrolled speakers, in insertion order.
|
|
443
|
+
- (NSArray<NSString *> * _Nonnull)getSpeakerIds SWIFT_WARN_UNUSED_RESULT;
|
|
420
444
|
- (void)stopSpeech:(void (^ _Nullable)(BOOL))completion;
|
|
421
445
|
- (void)cancelSpeech:(void (^ _Nullable)(BOOL))completion;
|
|
422
446
|
- (void)destroySpeech:(void (^ _Nullable)(BOOL))completion;
|
|
@@ -816,6 +840,10 @@ SWIFT_CLASS("_TtC10DavoiceTTS10DaVoiceTTS")
|
|
|
816
840
|
+ (void)setUseDavoiceProprietaryPhonemizer:(BOOL)enabled;
|
|
817
841
|
+ (BOOL)getUseDavoiceProprietaryPhonemizer SWIFT_WARN_UNUSED_RESULT;
|
|
818
842
|
- (BOOL)isUsingDavoiceProprietaryPhonemizer SWIFT_WARN_UNUSED_RESULT;
|
|
843
|
+
/// Voices available in the loaded .dm (the names changeVoice() accepts, the
|
|
844
|
+
/// first being the default). Empty for v1 models, a .dm without voices, or
|
|
845
|
+
/// after destroy().
|
|
846
|
+
- (NSArray<NSString *> * _Nonnull)getAllVoices SWIFT_WARN_UNUSED_RESULT;
|
|
819
847
|
- (void)changeVoice:(NSString * _Nonnull)name completion:(void (^ _Nonnull)(NSInteger))completion;
|
|
820
848
|
@property (nonatomic, copy) void (^ _Nullable onLastUtteranceFinished)(void);
|
|
821
849
|
+ (BOOL)activateLicenseWithLicenseKey:(NSString * _Nonnull)licenseKey SWIFT_WARN_UNUSED_RESULT;
|
|
@@ -882,7 +910,27 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSArray<NSStri
|
|
|
882
910
|
- (void)isSpeechAvailable:(void (^ _Nonnull)(BOOL))completion;
|
|
883
911
|
- (BOOL)isRecognizing SWIFT_WARN_UNUSED_RESULT;
|
|
884
912
|
- (void)startSpeechWithLocaleStr:(NSString * _Nullable)localeStr;
|
|
913
|
+
/// Starts STT with one speaker. <code>onboardingJsonPath</code> may be a path or the JSON
|
|
914
|
+
/// itself. The speaker is added to the current set (same id or same voiceprint
|
|
915
|
+
/// replaces the older entry) under the id “default”.
|
|
885
916
|
- (void)startSpeechWithLocaleStr:(NSString * _Nullable)localeStr onboardingJsonPath:(NSString * _Nonnull)onboardingJsonPath;
|
|
917
|
+
- (void)startSpeechWithLocaleStr:(NSString * _Nullable)localeStr onboardingJsonPath:(NSString * _Nonnull)onboardingJsonPath speakerId:(NSString * _Nonnull)speakerId;
|
|
918
|
+
/// Starts STT with an array of speakers, replacing the current set.
|
|
919
|
+
/// Each item: [“id”: speakerId, “json”: JSON string or path to the JSON file].
|
|
920
|
+
- (void)startSpeechWithLocaleStr:(NSString * _Nullable)localeStr speakers:(NSArray<NSDictionary<NSString *, NSString *> *> * _Nonnull)speakers;
|
|
921
|
+
/// Adds one speaker (JSON string or path). Same id or same voiceprint replaces
|
|
922
|
+
/// the older entry. Applies immediately when STT is running, otherwise at the
|
|
923
|
+
/// next start. Throws if the JSON can’t be read or its audio-feature settings
|
|
924
|
+
/// differ from the running engine’s.
|
|
925
|
+
- (BOOL)addSpeakerWithId:(NSString * _Nonnull)id jsonOrPath:(NSString * _Nonnull)jsonOrPath error:(NSError * _Nullable * _Nullable)error;
|
|
926
|
+
/// Replaces the whole speaker set. Items: [“id”: …, “json”: JSON string or path].
|
|
927
|
+
/// An empty array turns speaker verification off.
|
|
928
|
+
- (BOOL)setSpeakers:(NSArray<NSDictionary<NSString *, NSString *> *> * _Nonnull)speakers error:(NSError * _Nullable * _Nullable)error;
|
|
929
|
+
/// Removes a speaker by id. Removing the last one turns the gate off (all audio
|
|
930
|
+
/// passes). Returns false if the id wasn’t enrolled.
|
|
931
|
+
- (BOOL)removeSpeakerWithId:(NSString * _Nonnull)id;
|
|
932
|
+
/// Ids of the enrolled speakers, in insertion order.
|
|
933
|
+
- (NSArray<NSString *> * _Nonnull)getSpeakerIds SWIFT_WARN_UNUSED_RESULT;
|
|
886
934
|
- (void)stopSpeech:(void (^ _Nullable)(BOOL))completion;
|
|
887
935
|
- (void)cancelSpeech:(void (^ _Nullable)(BOOL))completion;
|
|
888
936
|
- (void)destroySpeech:(void (^ _Nullable)(BOOL))completion;
|