react-native-davoice-tts 1.0.405 → 1.0.406

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.
Files changed (41) hide show
  1. package/TTSRNBridge.podspec +1 -1
  2. package/android/.gradle/8.9/checksums/checksums.lock +0 -0
  3. package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
  4. package/android/.gradle/9.7.1/checksums/checksums.lock +0 -0
  5. package/android/.gradle/9.7.1/fileHashes/fileHashes.lock +0 -0
  6. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  7. package/android/.gradle/buildOutputCleanup/cache.properties +1 -1
  8. package/android/build/reports/problems/problems-report.html +9 -2
  9. package/android/libs/com/davoice/tts/1.0.0/tts-1.0.0.aar +0 -0
  10. package/android/libs/com/davoice/tts/1.0.0/tts-1.0.0.aar.md5 +1 -1
  11. package/android/libs/com/davoice/tts/1.0.0/tts-1.0.0.aar.sha1 +1 -1
  12. package/android/src/main/java/com/davoice/stt/rn/STTModule.kt +90 -22
  13. package/ios/SpeechBridge/SpeechBridge.m +102 -12
  14. package/ios/TTSRNBridge/DavoiceTTS.xcframework/Info.plist +5 -5
  15. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/DavoiceTTS +0 -0
  16. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Headers/DavoiceTTS-Swift.h +20 -0
  17. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.abi.json +1246 -181
  18. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.private.swiftinterface +34 -0
  19. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  20. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios.swiftinterface +34 -0
  21. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/DavoiceTTS +0 -0
  22. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Headers/DavoiceTTS-Swift.h +40 -0
  23. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.abi.json +1246 -181
  24. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +34 -0
  25. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  26. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/arm64-apple-ios-simulator.swiftinterface +34 -0
  27. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.abi.json +1246 -181
  28. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +34 -0
  29. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  30. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/Modules/DavoiceTTS.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +34 -0
  31. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/_CodeSignature/CodeDirectory +0 -0
  32. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/_CodeSignature/CodeRequirements-1 +0 -0
  33. package/ios/TTSRNBridge/DavoiceTTS.xcframework/ios-arm64_x86_64-simulator/DavoiceTTS.framework/_CodeSignature/CodeResources +33 -33
  34. package/package.json +1 -1
  35. package/speech/index.d.ts +37 -1
  36. package/speech/index.ts +99 -4
  37. package/android/.gradle/9.2.0/checksums/checksums.lock +0 -0
  38. package/android/.gradle/9.2.0/fileHashes/fileHashes.bin +0 -0
  39. package/android/.gradle/9.2.0/fileHashes/fileHashes.lock +0 -0
  40. /package/android/.gradle/{9.2.0 → 9.7.1}/fileChanges/last-build.bin +0 -0
  41. /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
@@ -243,6 +254,25 @@ public struct SpeakerEnrollment : Swift.Codable {
243
254
  public static func deserialize(_ data: Foundation.Data) throws -> DavoiceTTS.SpeakerEnrollment
244
255
  public func encode(to encoder: any Swift.Encoder) throws
245
256
  }
257
+ public struct SVSpeaker {
258
+ public let id: Swift.String
259
+ public let enrollment: DavoiceTTS.SpeakerEnrollment
260
+ public let threshold: Swift.Float
261
+ public let contentKey: Swift.String
262
+ #if compiler(>=5.3) && $NonescapableTypes
263
+ public init(id: Swift.String, enrollment: DavoiceTTS.SpeakerEnrollment, threshold: Swift.Float? = nil)
264
+ #endif
265
+ public static func contentKey(of e: DavoiceTTS.SpeakerEnrollment) -> Swift.String
266
+ }
267
+ public enum SVSpeakerSet {
268
+ public static let defaultSpeakerId: Swift.String
269
+ public static func loadEnrollment(jsonOrPath: Swift.String) throws -> DavoiceTTS.SpeakerEnrollment
270
+ #if compiler(>=5.3) && $NonescapableTypes
271
+ public static func incompatibility(_ e: DavoiceTTS.SpeakerEnrollment, base: DavoiceTTS.SpeakerVerificationConfig, baseDim: Swift.Int) -> Swift.String?
272
+ #endif
273
+ public static func upsert(_ list: [DavoiceTTS.SVSpeaker], _ s: DavoiceTTS.SVSpeaker) -> (list: [DavoiceTTS.SVSpeaker], removed: [Swift.String])
274
+ public static func build(_ items: [DavoiceTTS.SVSpeaker]) -> (list: [DavoiceTTS.SVSpeaker], removed: [Swift.String])
275
+ }
246
276
  public struct SVPendingInfo {
247
277
  public let bufferedSamples: Swift.Int
248
278
  public let bufferedSeconds: Swift.Float
@@ -257,6 +287,8 @@ public struct SpeakerVerificationResult {
257
287
  public let bestKind: Swift.String
258
288
  public let bestId: Swift.String
259
289
  public let isMatch: Swift.Bool
290
+ public let speakerId: Swift.String?
291
+ public let speakerScores: [Swift.String : Swift.Float]
260
292
  public let embeddingDim: Swift.Int
261
293
  public let usedSeconds: Swift.Float
262
294
  public let ortRunMs: Swift.Double
@@ -286,6 +318,8 @@ public enum SpeakerVerificationError : Swift.Error, Swift.CustomStringConvertibl
286
318
  #if compiler(>=5.3) && $NonescapableTypes
287
319
  final public func setEnrollment(_ enrollment: DavoiceTTS.SpeakerEnrollment?)
288
320
  #endif
321
+ final public func setSpeakers(_ list: [DavoiceTTS.SVSpeaker])
322
+ final public func currentSpeakers() -> [DavoiceTTS.SVSpeaker]
289
323
  @objc final public func resetStreamingState()
290
324
  final public func processFrame(frame: [Swift.Float]) throws -> DavoiceTTS.SpeakerVerificationOutput
291
325
  final public func verifyWavFileStreaming(path: Swift.String, resetState: Swift.Bool = true) throws -> DavoiceTTS.SpeakerVerificationResult
@@ -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
@@ -243,6 +254,25 @@ public struct SpeakerEnrollment : Swift.Codable {
243
254
  public static func deserialize(_ data: Foundation.Data) throws -> DavoiceTTS.SpeakerEnrollment
244
255
  public func encode(to encoder: any Swift.Encoder) throws
245
256
  }
257
+ public struct SVSpeaker {
258
+ public let id: Swift.String
259
+ public let enrollment: DavoiceTTS.SpeakerEnrollment
260
+ public let threshold: Swift.Float
261
+ public let contentKey: Swift.String
262
+ #if compiler(>=5.3) && $NonescapableTypes
263
+ public init(id: Swift.String, enrollment: DavoiceTTS.SpeakerEnrollment, threshold: Swift.Float? = nil)
264
+ #endif
265
+ public static func contentKey(of e: DavoiceTTS.SpeakerEnrollment) -> Swift.String
266
+ }
267
+ public enum SVSpeakerSet {
268
+ public static let defaultSpeakerId: Swift.String
269
+ public static func loadEnrollment(jsonOrPath: Swift.String) throws -> DavoiceTTS.SpeakerEnrollment
270
+ #if compiler(>=5.3) && $NonescapableTypes
271
+ public static func incompatibility(_ e: DavoiceTTS.SpeakerEnrollment, base: DavoiceTTS.SpeakerVerificationConfig, baseDim: Swift.Int) -> Swift.String?
272
+ #endif
273
+ public static func upsert(_ list: [DavoiceTTS.SVSpeaker], _ s: DavoiceTTS.SVSpeaker) -> (list: [DavoiceTTS.SVSpeaker], removed: [Swift.String])
274
+ public static func build(_ items: [DavoiceTTS.SVSpeaker]) -> (list: [DavoiceTTS.SVSpeaker], removed: [Swift.String])
275
+ }
246
276
  public struct SVPendingInfo {
247
277
  public let bufferedSamples: Swift.Int
248
278
  public let bufferedSeconds: Swift.Float
@@ -257,6 +287,8 @@ public struct SpeakerVerificationResult {
257
287
  public let bestKind: Swift.String
258
288
  public let bestId: Swift.String
259
289
  public let isMatch: Swift.Bool
290
+ public let speakerId: Swift.String?
291
+ public let speakerScores: [Swift.String : Swift.Float]
260
292
  public let embeddingDim: Swift.Int
261
293
  public let usedSeconds: Swift.Float
262
294
  public let ortRunMs: Swift.Double
@@ -286,6 +318,8 @@ public enum SpeakerVerificationError : Swift.Error, Swift.CustomStringConvertibl
286
318
  #if compiler(>=5.3) && $NonescapableTypes
287
319
  final public func setEnrollment(_ enrollment: DavoiceTTS.SpeakerEnrollment?)
288
320
  #endif
321
+ final public func setSpeakers(_ list: [DavoiceTTS.SVSpeaker])
322
+ final public func currentSpeakers() -> [DavoiceTTS.SVSpeaker]
289
323
  @objc final public func resetStreamingState()
290
324
  final public func processFrame(frame: [Swift.Float]) throws -> DavoiceTTS.SpeakerVerificationOutput
291
325
  final public func verifyWavFileStreaming(path: Swift.String, resetState: Swift.Bool = true) throws -> DavoiceTTS.SpeakerVerificationResult
@@ -416,7 +416,27 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSArray<NSStri
416
416
  - (void)isSpeechAvailable:(void (^ _Nonnull)(BOOL))completion;
417
417
  - (BOOL)isRecognizing SWIFT_WARN_UNUSED_RESULT;
418
418
  - (void)startSpeechWithLocaleStr:(NSString * _Nullable)localeStr;
419
+ /// Starts STT with one speaker. <code>onboardingJsonPath</code> may be a path or the JSON
420
+ /// itself. The speaker is added to the current set (same id or same voiceprint
421
+ /// replaces the older entry) under the id “default”.
419
422
  - (void)startSpeechWithLocaleStr:(NSString * _Nullable)localeStr onboardingJsonPath:(NSString * _Nonnull)onboardingJsonPath;
423
+ - (void)startSpeechWithLocaleStr:(NSString * _Nullable)localeStr onboardingJsonPath:(NSString * _Nonnull)onboardingJsonPath speakerId:(NSString * _Nonnull)speakerId;
424
+ /// Starts STT with an array of speakers, replacing the current set.
425
+ /// Each item: [“id”: speakerId, “json”: JSON string or path to the JSON file].
426
+ - (void)startSpeechWithLocaleStr:(NSString * _Nullable)localeStr speakers:(NSArray<NSDictionary<NSString *, NSString *> *> * _Nonnull)speakers;
427
+ /// Adds one speaker (JSON string or path). Same id or same voiceprint replaces
428
+ /// the older entry. Applies immediately when STT is running, otherwise at the
429
+ /// next start. Throws if the JSON can’t be read or its audio-feature settings
430
+ /// differ from the running engine’s.
431
+ - (BOOL)addSpeakerWithId:(NSString * _Nonnull)id jsonOrPath:(NSString * _Nonnull)jsonOrPath error:(NSError * _Nullable * _Nullable)error;
432
+ /// Replaces the whole speaker set. Items: [“id”: …, “json”: JSON string or path].
433
+ /// An empty array turns speaker verification off.
434
+ - (BOOL)setSpeakers:(NSArray<NSDictionary<NSString *, NSString *> *> * _Nonnull)speakers error:(NSError * _Nullable * _Nullable)error;
435
+ /// Removes a speaker by id. Removing the last one turns the gate off (all audio
436
+ /// passes). Returns false if the id wasn’t enrolled.
437
+ - (BOOL)removeSpeakerWithId:(NSString * _Nonnull)id;
438
+ /// Ids of the enrolled speakers, in insertion order.
439
+ - (NSArray<NSString *> * _Nonnull)getSpeakerIds SWIFT_WARN_UNUSED_RESULT;
420
440
  - (void)stopSpeech:(void (^ _Nullable)(BOOL))completion;
421
441
  - (void)cancelSpeech:(void (^ _Nullable)(BOOL))completion;
422
442
  - (void)destroySpeech:(void (^ _Nullable)(BOOL))completion;
@@ -882,7 +902,27 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSArray<NSStri
882
902
  - (void)isSpeechAvailable:(void (^ _Nonnull)(BOOL))completion;
883
903
  - (BOOL)isRecognizing SWIFT_WARN_UNUSED_RESULT;
884
904
  - (void)startSpeechWithLocaleStr:(NSString * _Nullable)localeStr;
905
+ /// Starts STT with one speaker. <code>onboardingJsonPath</code> may be a path or the JSON
906
+ /// itself. The speaker is added to the current set (same id or same voiceprint
907
+ /// replaces the older entry) under the id “default”.
885
908
  - (void)startSpeechWithLocaleStr:(NSString * _Nullable)localeStr onboardingJsonPath:(NSString * _Nonnull)onboardingJsonPath;
909
+ - (void)startSpeechWithLocaleStr:(NSString * _Nullable)localeStr onboardingJsonPath:(NSString * _Nonnull)onboardingJsonPath speakerId:(NSString * _Nonnull)speakerId;
910
+ /// Starts STT with an array of speakers, replacing the current set.
911
+ /// Each item: [“id”: speakerId, “json”: JSON string or path to the JSON file].
912
+ - (void)startSpeechWithLocaleStr:(NSString * _Nullable)localeStr speakers:(NSArray<NSDictionary<NSString *, NSString *> *> * _Nonnull)speakers;
913
+ /// Adds one speaker (JSON string or path). Same id or same voiceprint replaces
914
+ /// the older entry. Applies immediately when STT is running, otherwise at the
915
+ /// next start. Throws if the JSON can’t be read or its audio-feature settings
916
+ /// differ from the running engine’s.
917
+ - (BOOL)addSpeakerWithId:(NSString * _Nonnull)id jsonOrPath:(NSString * _Nonnull)jsonOrPath error:(NSError * _Nullable * _Nullable)error;
918
+ /// Replaces the whole speaker set. Items: [“id”: …, “json”: JSON string or path].
919
+ /// An empty array turns speaker verification off.
920
+ - (BOOL)setSpeakers:(NSArray<NSDictionary<NSString *, NSString *> *> * _Nonnull)speakers error:(NSError * _Nullable * _Nullable)error;
921
+ /// Removes a speaker by id. Removing the last one turns the gate off (all audio
922
+ /// passes). Returns false if the id wasn’t enrolled.
923
+ - (BOOL)removeSpeakerWithId:(NSString * _Nonnull)id;
924
+ /// Ids of the enrolled speakers, in insertion order.
925
+ - (NSArray<NSString *> * _Nonnull)getSpeakerIds SWIFT_WARN_UNUSED_RESULT;
886
926
  - (void)stopSpeech:(void (^ _Nullable)(BOOL))completion;
887
927
  - (void)cancelSpeech:(void (^ _Nullable)(BOOL))completion;
888
928
  - (void)destroySpeech:(void (^ _Nullable)(BOOL))completion;