react-native-wakeword 1.1.56 → 1.1.58

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 (39) hide show
  1. package/KeyWordRNBridge.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/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  5. package/android/.gradle/buildOutputCleanup/cache.properties +1 -1
  6. package/android/libs/com/davoice/keyworddetection/1.0.0/keyworddetection-1.0.0.aar +0 -0
  7. package/android/libs/com/davoice/keyworddetection/1.0.0/keyworddetection-1.0.0.aar.md5 +1 -1
  8. package/android/libs/com/davoice/keyworddetection/1.0.0/keyworddetection-1.0.0.aar.sha1 +1 -1
  9. package/android/src/main/java/com/davoice/keywordspotting/KeyWordRNBridge.java +764 -85
  10. package/android/src/main/java/com/davoice/speakeridrn/SpeakerIdRNBridge.java_not_used_yet +588 -0
  11. package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64/KeyWordDetection.framework/Headers/KeyWordDetection-Swift.h +56 -0
  12. package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64/KeyWordDetection.framework/Info.plist +0 -0
  13. package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64/KeyWordDetection.framework/KeyWordDetection +0 -0
  14. package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64/KeyWordDetection.framework/Modules/KeyWordDetection.swiftmodule/arm64-apple-ios.abi.json +8970 -2462
  15. package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64/KeyWordDetection.framework/Modules/KeyWordDetection.swiftmodule/arm64-apple-ios.private.swiftinterface +133 -0
  16. package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64/KeyWordDetection.framework/Modules/KeyWordDetection.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  17. package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64/KeyWordDetection.framework/Modules/KeyWordDetection.swiftmodule/arm64-apple-ios.swiftinterface +133 -0
  18. package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/Headers/KeyWordDetection-Swift.h +112 -0
  19. package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/Info.plist +0 -0
  20. package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/KeyWordDetection +0 -0
  21. package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/Modules/KeyWordDetection.swiftmodule/arm64-apple-ios-simulator.abi.json +8970 -2462
  22. package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/Modules/KeyWordDetection.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +133 -0
  23. package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/Modules/KeyWordDetection.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  24. package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/Modules/KeyWordDetection.swiftmodule/arm64-apple-ios-simulator.swiftinterface +133 -0
  25. package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/Modules/KeyWordDetection.swiftmodule/x86_64-apple-ios-simulator.abi.json +8970 -2462
  26. package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/Modules/KeyWordDetection.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +133 -0
  27. package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/Modules/KeyWordDetection.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  28. package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/Modules/KeyWordDetection.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +133 -0
  29. package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/_CodeSignature/CodeDirectory +0 -0
  30. package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/_CodeSignature/CodeRequirements-1 +0 -0
  31. package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/_CodeSignature/CodeResources +34 -34
  32. package/ios/KeyWordRNBridge/KeyWordRNBridge.m +704 -3
  33. package/package.json +1 -1
  34. package/wakewords/SpeakerVerificationRNBridge.d.ts +49 -0
  35. package/wakewords/SpeakerVerificationRNBridge.js +294 -0
  36. package/wakewords/index.d.ts +18 -10
  37. package/wakewords/index.js +28 -0
  38. package/android/src/main/assets/coca_cola_model_28_05052025.dm +0 -0
  39. package/wakewords/index.d.ts.chat_idiot +0 -2
@@ -63,6 +63,136 @@ public class AVAudioWrapperFrameListener {
63
63
  }
64
64
  @objc deinit
65
65
  }
66
+ @objc public protocol SpeakerVerificationNativeDelegate {
67
+ @objc func svOnboardingProgress(_ info: [Swift.String : Any])
68
+ @objc func svOnboardingDone(_ info: [Swift.String : Any])
69
+ @objc func svVerifyResult(_ info: [Swift.String : Any])
70
+ @objc func svError(_ info: [Swift.String : Any])
71
+ }
72
+ public enum SVLogLevel : Swift.Int, Swift.Codable {
73
+ case off, error, warn, info, debug, trace
74
+ public init?(rawValue: Swift.Int)
75
+ public typealias RawValue = Swift.Int
76
+ public var rawValue: Swift.Int {
77
+ get
78
+ }
79
+ }
80
+ public protocol SVLogger {
81
+ func log(_ level: KeyWordDetection.SVLogLevel, _ tag: Swift.String, _ msg: Swift.String)
82
+ }
83
+ final public class SVDefaultLogger : KeyWordDetection.SVLogger {
84
+ final public var level: KeyWordDetection.SVLogLevel
85
+ public init(level: KeyWordDetection.SVLogLevel = .debug)
86
+ final public func log(_ level: KeyWordDetection.SVLogLevel, _ tag: Swift.String, _ msg: Swift.String)
87
+ @objc deinit
88
+ }
89
+ public struct SpeakerVerificationConfig : Swift.Codable {
90
+ public var modelPath: Swift.String
91
+ public var sampleRate: Swift.Int
92
+ public var numMelBins: Swift.Int
93
+ public var cmn: Swift.Bool
94
+ public var frameLengthMs: Swift.Float
95
+ public var frameShiftMs: Swift.Float
96
+ public var nFFT: Swift.Int
97
+ public var decisionThreshold: Swift.Float
98
+ public var expectedLayoutBDT: Swift.Bool
99
+ public var frameSize: Swift.Int
100
+ public var tailSeconds: Swift.Float
101
+ public var maxTailSeconds: Swift.Float
102
+ public var logLevel: KeyWordDetection.SVLogLevel
103
+ public init(from decoder: any Swift.Decoder) throws
104
+ public func encode(to encoder: any Swift.Encoder) throws
105
+ public init(modelPath: Swift.String, sampleRate: Swift.Int = 16_000, numMelBins: Swift.Int = 80, cmn: Swift.Bool = true, frameLengthMs: Swift.Float = 25.0, frameShiftMs: Swift.Float = 10.0, nFFT: Swift.Int = 512, decisionThreshold: Swift.Float = 0.35, expectedLayoutBDT: Swift.Bool = false, frameSize: Swift.Int = 1280, tailSeconds: Swift.Float = 2.0, maxTailSeconds: Swift.Float = 3.0, logLevel: KeyWordDetection.SVLogLevel = .debug)
106
+ }
107
+ public struct SpeakerEnrollment : Swift.Codable {
108
+ public let enrollmentId: Swift.String
109
+ public let createdAtEpochMs: Swift.Int64
110
+ public let configSnapshot: KeyWordDetection.SpeakerVerificationConfig
111
+ public let enrolledEmbeddings: [[Swift.Float]]
112
+ public let meanEmbedding: [Swift.Float]
113
+ public func serialize() throws -> Foundation.Data
114
+ public static func deserialize(_ data: Foundation.Data) throws -> KeyWordDetection.SpeakerEnrollment
115
+ public func encode(to encoder: any Swift.Encoder) throws
116
+ public init(from decoder: any Swift.Decoder) throws
117
+ }
118
+ public struct SVPendingInfo {
119
+ public let bufferedSamples: Swift.Int
120
+ public let bufferedSeconds: Swift.Float
121
+ public let neededSeconds: Swift.Float
122
+ }
123
+ public struct SpeakerVerificationResult {
124
+ public let scoreBest: Swift.Float
125
+ public let scoreMean: Swift.Float
126
+ public let scoreWorst: Swift.Float
127
+ public let isMatch: Swift.Bool
128
+ public let embeddingDim: Swift.Int
129
+ public let usedSeconds: Swift.Float
130
+ public let ortRunMs: Swift.Double
131
+ public let featureMs: Swift.Double
132
+ public let totalMs: Swift.Double
133
+ }
134
+ public enum SpeakerVerificationOutput {
135
+ case pending(KeyWordDetection.SVPendingInfo)
136
+ case result(KeyWordDetection.SpeakerVerificationResult)
137
+ }
138
+ public enum SpeakerVerificationError : Swift.Error, Swift.CustomStringConvertible {
139
+ case invalidFrameSize(expected: Swift.Int, got: Swift.Int)
140
+ case enrollmentMissing
141
+ case emptyAudio
142
+ case onnx(Swift.String)
143
+ case feature(Swift.String)
144
+ public var description: Swift.String {
145
+ get
146
+ }
147
+ }
148
+ @objc @objcMembers final public class SpeakerVerificationEngine : ObjectiveC.NSObject {
149
+ final public let config: KeyWordDetection.SpeakerVerificationConfig
150
+ final public let logger: any KeyWordDetection.SVLogger
151
+ public init(config: KeyWordDetection.SpeakerVerificationConfig, logger: (any KeyWordDetection.SVLogger)? = nil) throws
152
+ final public func setEnrollment(_ enrollment: KeyWordDetection.SpeakerEnrollment?)
153
+ @objc final public func resetStreamingState()
154
+ final public func processFrame(frame: [Swift.Float]) throws -> KeyWordDetection.SpeakerVerificationOutput
155
+ final public func verifyWavFileStreaming(path: Swift.String, resetState: Swift.Bool = true) throws -> KeyWordDetection.SpeakerVerificationResult
156
+ @objc deinit
157
+ }
158
+ @objc @objcMembers final public class SpeakerVerificationMicController : ObjectiveC.NSObject {
159
+ @objc weak final public var delegate: (any KeyWordDetection.SpeakerVerificationNativeDelegate)?
160
+ public init(config: KeyWordDetection.SpeakerVerificationConfig) throws
161
+ @objc final public func beginOnboarding(enrollmentId: Swift.String, targetEmbeddingCount: Swift.Int = 3, reset: Swift.Bool = true) throws
162
+ @objc final public func getNextEmbeddingFromMic() throws
163
+ @objc final public func finalizeOnboardingNow() throws
164
+ @objc final public func setEnrollmentJson(_ enrollmentJson: Swift.String) throws
165
+ @objc final public func startVerifyFromMic(resetState: Swift.Bool = true) throws
166
+ @objc(startEndlessVerifyFromMicWithHopSeconds:stopOnMatch:error:) final public func startEndlessVerifyFromMicWithHopSeconds(_ hopSeconds: Foundation.NSNumber, stopOnMatch: Swift.Bool, error outError: Foundation.NSErrorPointer) -> Swift.Bool
167
+ @objc final public func startEndlessVerifyFromMic(hopSeconds: Swift.Float = 0.5, stopOnMatch: Swift.Bool = false, resetState: Swift.Bool = true) throws
168
+ @objc final public func stop()
169
+ @objc deinit
170
+ }
171
+ final public class SpeakerEnrollmentBuilder {
172
+ final public var targetEmbeddingCount: Swift.Int
173
+ public init(config: KeyWordDetection.SpeakerVerificationConfig, enrollmentId: Swift.String, logger: (any KeyWordDetection.SVLogger)? = nil) throws
174
+ final public func armForNextEmbedding(resetBuffer: Swift.Bool = true)
175
+ final public func debugState() -> (armed: Swift.Bool, buffered: Swift.Int, needed: Swift.Int, collected: Swift.Int)
176
+ final public func disarm()
177
+ final public func reset()
178
+ final public func processEnrollmentFrame(_ frame: [Swift.Float]) throws
179
+ final public func isReadyToFinalize() -> Swift.Bool
180
+ final public func finalizeEnrollment() throws -> KeyWordDetection.SpeakerEnrollment
181
+ @objc deinit
182
+ }
183
+ @_inheritsConvenienceInitializers @objc(SpeakerVerificationRNFacade) final public class SpeakerVerificationRNFacade : ObjectiveC.NSObject {
184
+ @objc(createEngineWithModelPath:enrollmentJsonPath:options:error:) public static func createEngine(modelPath: Swift.String, enrollmentJsonPath: Swift.String, options: [Swift.String : Any], error outError: Foundation.NSErrorPointer) -> Any?
185
+ @objc(verifyWavWithEngine:wavPath:reset:error:) public static func verifyWav(engine: Any, wavPath: Swift.String, reset: Swift.Bool, error outError: Foundation.NSErrorPointer) -> [Swift.String : Any]?
186
+ @objc override dynamic public init()
187
+ @objc deinit
188
+ }
189
+ extension KeyWordDetection.SpeakerVerificationRNFacade {
190
+ @objc(createMicControllerWithConfigJson:error:) public static func createMicController(configJson: Swift.String, error outError: Foundation.NSErrorPointer) -> Any?
191
+ }
192
+ extension KeyWordDetection.SpeakerEnrollmentBuilder {
193
+ final public func processEnrollmentFrameDidCollect(_ frame: [Swift.Float]) throws -> Swift.Bool
194
+ final public func collectedCount() -> Swift.Int
195
+ }
66
196
  public class AVAudioWrapperBuffer {
67
197
  public init(size: Swift.Int)
68
198
  public func write(samples: [Swift.Float]) -> Swift.Int16
@@ -157,3 +287,6 @@ public enum AudioPlaybackHook {
157
287
  @objc override dynamic public init()
158
288
  @objc deinit
159
289
  }
290
+ extension KeyWordDetection.SVLogLevel : Swift.Equatable {}
291
+ extension KeyWordDetection.SVLogLevel : Swift.Hashable {}
292
+ extension KeyWordDetection.SVLogLevel : Swift.RawRepresentable {}
@@ -63,6 +63,136 @@ public class AVAudioWrapperFrameListener {
63
63
  }
64
64
  @objc deinit
65
65
  }
66
+ @objc public protocol SpeakerVerificationNativeDelegate {
67
+ @objc func svOnboardingProgress(_ info: [Swift.String : Any])
68
+ @objc func svOnboardingDone(_ info: [Swift.String : Any])
69
+ @objc func svVerifyResult(_ info: [Swift.String : Any])
70
+ @objc func svError(_ info: [Swift.String : Any])
71
+ }
72
+ public enum SVLogLevel : Swift.Int, Swift.Codable {
73
+ case off, error, warn, info, debug, trace
74
+ public init?(rawValue: Swift.Int)
75
+ public typealias RawValue = Swift.Int
76
+ public var rawValue: Swift.Int {
77
+ get
78
+ }
79
+ }
80
+ public protocol SVLogger {
81
+ func log(_ level: KeyWordDetection.SVLogLevel, _ tag: Swift.String, _ msg: Swift.String)
82
+ }
83
+ final public class SVDefaultLogger : KeyWordDetection.SVLogger {
84
+ final public var level: KeyWordDetection.SVLogLevel
85
+ public init(level: KeyWordDetection.SVLogLevel = .debug)
86
+ final public func log(_ level: KeyWordDetection.SVLogLevel, _ tag: Swift.String, _ msg: Swift.String)
87
+ @objc deinit
88
+ }
89
+ public struct SpeakerVerificationConfig : Swift.Codable {
90
+ public var modelPath: Swift.String
91
+ public var sampleRate: Swift.Int
92
+ public var numMelBins: Swift.Int
93
+ public var cmn: Swift.Bool
94
+ public var frameLengthMs: Swift.Float
95
+ public var frameShiftMs: Swift.Float
96
+ public var nFFT: Swift.Int
97
+ public var decisionThreshold: Swift.Float
98
+ public var expectedLayoutBDT: Swift.Bool
99
+ public var frameSize: Swift.Int
100
+ public var tailSeconds: Swift.Float
101
+ public var maxTailSeconds: Swift.Float
102
+ public var logLevel: KeyWordDetection.SVLogLevel
103
+ public init(from decoder: any Swift.Decoder) throws
104
+ public func encode(to encoder: any Swift.Encoder) throws
105
+ public init(modelPath: Swift.String, sampleRate: Swift.Int = 16_000, numMelBins: Swift.Int = 80, cmn: Swift.Bool = true, frameLengthMs: Swift.Float = 25.0, frameShiftMs: Swift.Float = 10.0, nFFT: Swift.Int = 512, decisionThreshold: Swift.Float = 0.35, expectedLayoutBDT: Swift.Bool = false, frameSize: Swift.Int = 1280, tailSeconds: Swift.Float = 2.0, maxTailSeconds: Swift.Float = 3.0, logLevel: KeyWordDetection.SVLogLevel = .debug)
106
+ }
107
+ public struct SpeakerEnrollment : Swift.Codable {
108
+ public let enrollmentId: Swift.String
109
+ public let createdAtEpochMs: Swift.Int64
110
+ public let configSnapshot: KeyWordDetection.SpeakerVerificationConfig
111
+ public let enrolledEmbeddings: [[Swift.Float]]
112
+ public let meanEmbedding: [Swift.Float]
113
+ public func serialize() throws -> Foundation.Data
114
+ public static func deserialize(_ data: Foundation.Data) throws -> KeyWordDetection.SpeakerEnrollment
115
+ public func encode(to encoder: any Swift.Encoder) throws
116
+ public init(from decoder: any Swift.Decoder) throws
117
+ }
118
+ public struct SVPendingInfo {
119
+ public let bufferedSamples: Swift.Int
120
+ public let bufferedSeconds: Swift.Float
121
+ public let neededSeconds: Swift.Float
122
+ }
123
+ public struct SpeakerVerificationResult {
124
+ public let scoreBest: Swift.Float
125
+ public let scoreMean: Swift.Float
126
+ public let scoreWorst: Swift.Float
127
+ public let isMatch: Swift.Bool
128
+ public let embeddingDim: Swift.Int
129
+ public let usedSeconds: Swift.Float
130
+ public let ortRunMs: Swift.Double
131
+ public let featureMs: Swift.Double
132
+ public let totalMs: Swift.Double
133
+ }
134
+ public enum SpeakerVerificationOutput {
135
+ case pending(KeyWordDetection.SVPendingInfo)
136
+ case result(KeyWordDetection.SpeakerVerificationResult)
137
+ }
138
+ public enum SpeakerVerificationError : Swift.Error, Swift.CustomStringConvertible {
139
+ case invalidFrameSize(expected: Swift.Int, got: Swift.Int)
140
+ case enrollmentMissing
141
+ case emptyAudio
142
+ case onnx(Swift.String)
143
+ case feature(Swift.String)
144
+ public var description: Swift.String {
145
+ get
146
+ }
147
+ }
148
+ @objc @objcMembers final public class SpeakerVerificationEngine : ObjectiveC.NSObject {
149
+ final public let config: KeyWordDetection.SpeakerVerificationConfig
150
+ final public let logger: any KeyWordDetection.SVLogger
151
+ public init(config: KeyWordDetection.SpeakerVerificationConfig, logger: (any KeyWordDetection.SVLogger)? = nil) throws
152
+ final public func setEnrollment(_ enrollment: KeyWordDetection.SpeakerEnrollment?)
153
+ @objc final public func resetStreamingState()
154
+ final public func processFrame(frame: [Swift.Float]) throws -> KeyWordDetection.SpeakerVerificationOutput
155
+ final public func verifyWavFileStreaming(path: Swift.String, resetState: Swift.Bool = true) throws -> KeyWordDetection.SpeakerVerificationResult
156
+ @objc deinit
157
+ }
158
+ @objc @objcMembers final public class SpeakerVerificationMicController : ObjectiveC.NSObject {
159
+ @objc weak final public var delegate: (any KeyWordDetection.SpeakerVerificationNativeDelegate)?
160
+ public init(config: KeyWordDetection.SpeakerVerificationConfig) throws
161
+ @objc final public func beginOnboarding(enrollmentId: Swift.String, targetEmbeddingCount: Swift.Int = 3, reset: Swift.Bool = true) throws
162
+ @objc final public func getNextEmbeddingFromMic() throws
163
+ @objc final public func finalizeOnboardingNow() throws
164
+ @objc final public func setEnrollmentJson(_ enrollmentJson: Swift.String) throws
165
+ @objc final public func startVerifyFromMic(resetState: Swift.Bool = true) throws
166
+ @objc(startEndlessVerifyFromMicWithHopSeconds:stopOnMatch:error:) final public func startEndlessVerifyFromMicWithHopSeconds(_ hopSeconds: Foundation.NSNumber, stopOnMatch: Swift.Bool, error outError: Foundation.NSErrorPointer) -> Swift.Bool
167
+ @objc final public func startEndlessVerifyFromMic(hopSeconds: Swift.Float = 0.5, stopOnMatch: Swift.Bool = false, resetState: Swift.Bool = true) throws
168
+ @objc final public func stop()
169
+ @objc deinit
170
+ }
171
+ final public class SpeakerEnrollmentBuilder {
172
+ final public var targetEmbeddingCount: Swift.Int
173
+ public init(config: KeyWordDetection.SpeakerVerificationConfig, enrollmentId: Swift.String, logger: (any KeyWordDetection.SVLogger)? = nil) throws
174
+ final public func armForNextEmbedding(resetBuffer: Swift.Bool = true)
175
+ final public func debugState() -> (armed: Swift.Bool, buffered: Swift.Int, needed: Swift.Int, collected: Swift.Int)
176
+ final public func disarm()
177
+ final public func reset()
178
+ final public func processEnrollmentFrame(_ frame: [Swift.Float]) throws
179
+ final public func isReadyToFinalize() -> Swift.Bool
180
+ final public func finalizeEnrollment() throws -> KeyWordDetection.SpeakerEnrollment
181
+ @objc deinit
182
+ }
183
+ @_inheritsConvenienceInitializers @objc(SpeakerVerificationRNFacade) final public class SpeakerVerificationRNFacade : ObjectiveC.NSObject {
184
+ @objc(createEngineWithModelPath:enrollmentJsonPath:options:error:) public static func createEngine(modelPath: Swift.String, enrollmentJsonPath: Swift.String, options: [Swift.String : Any], error outError: Foundation.NSErrorPointer) -> Any?
185
+ @objc(verifyWavWithEngine:wavPath:reset:error:) public static func verifyWav(engine: Any, wavPath: Swift.String, reset: Swift.Bool, error outError: Foundation.NSErrorPointer) -> [Swift.String : Any]?
186
+ @objc override dynamic public init()
187
+ @objc deinit
188
+ }
189
+ extension KeyWordDetection.SpeakerVerificationRNFacade {
190
+ @objc(createMicControllerWithConfigJson:error:) public static func createMicController(configJson: Swift.String, error outError: Foundation.NSErrorPointer) -> Any?
191
+ }
192
+ extension KeyWordDetection.SpeakerEnrollmentBuilder {
193
+ final public func processEnrollmentFrameDidCollect(_ frame: [Swift.Float]) throws -> Swift.Bool
194
+ final public func collectedCount() -> Swift.Int
195
+ }
66
196
  public class AVAudioWrapperBuffer {
67
197
  public init(size: Swift.Int)
68
198
  public func write(samples: [Swift.Float]) -> Swift.Int16
@@ -157,3 +287,6 @@ public enum AudioPlaybackHook {
157
287
  @objc override dynamic public init()
158
288
  @objc deinit
159
289
  }
290
+ extension KeyWordDetection.SVLogLevel : Swift.Equatable {}
291
+ extension KeyWordDetection.SVLogLevel : Swift.Hashable {}
292
+ extension KeyWordDetection.SVLogLevel : Swift.RawRepresentable {}
@@ -372,6 +372,62 @@ SWIFT_CLASS("_TtC16KeyWordDetection14LicenseManager")
372
372
  - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
373
373
  @end
374
374
 
375
+ SWIFT_CLASS("_TtC16KeyWordDetection25SpeakerVerificationEngine")
376
+ @interface SpeakerVerificationEngine : NSObject
377
+ - (void)resetStreamingState;
378
+ - (nonnull instancetype)init SWIFT_UNAVAILABLE;
379
+ + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
380
+ @end
381
+
382
+ @protocol SpeakerVerificationNativeDelegate;
383
+ @class NSError;
384
+ SWIFT_CLASS("_TtC16KeyWordDetection32SpeakerVerificationMicController")
385
+ @interface SpeakerVerificationMicController : NSObject
386
+ @property (nonatomic, weak) id <SpeakerVerificationNativeDelegate> _Nullable delegate;
387
+ - (BOOL)beginOnboardingWithEnrollmentId:(NSString * _Nonnull)enrollmentId targetEmbeddingCount:(NSInteger)targetEmbeddingCount reset:(BOOL)reset error:(NSError * _Nullable * _Nullable)error;
388
+ /// App calls this each time it wants ONE embedding to be captured from mic.
389
+ /// When collected, controller stops mic and notifies delegate.
390
+ - (BOOL)getNextEmbeddingFromMicAndReturnError:(NSError * _Nullable * _Nullable)error;
391
+ /// Optional explicit finalize (usually you rely on auto-finalize when target reached).
392
+ - (BOOL)finalizeOnboardingNowAndReturnError:(NSError * _Nullable * _Nullable)error;
393
+ - (BOOL)setEnrollmentJson:(NSString * _Nonnull)enrollmentJson error:(NSError * _Nullable * _Nullable)error;
394
+ /// Starts mic and returns first verification result (then stops mic).
395
+ - (BOOL)startVerifyFromMicWithResetState:(BOOL)resetState error:(NSError * _Nullable * _Nullable)error;
396
+ - (BOOL)startEndlessVerifyFromMicWithHopSeconds:(NSNumber * _Nonnull)hopSeconds stopOnMatch:(BOOL)stopOnMatch error:(NSError * _Nullable * _Nullable)outError SWIFT_WARN_UNUSED_RESULT;
397
+ /// Starts mic and keeps verifying forever (emits result every hopSeconds).
398
+ /// <ul>
399
+ /// <li>
400
+ /// hopSeconds: how often to emit results (e.g. 0.5)
401
+ /// </li>
402
+ /// <li>
403
+ /// stopOnMatch: if true, stops mic on first match; otherwise keeps running
404
+ /// </li>
405
+ /// </ul>
406
+ - (BOOL)startEndlessVerifyFromMicWithHopSeconds:(float)hopSeconds stopOnMatch:(BOOL)stopOnMatch resetState:(BOOL)resetState error:(NSError * _Nullable * _Nullable)error;
407
+ - (void)stop;
408
+ - (nonnull instancetype)init SWIFT_UNAVAILABLE;
409
+ + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
410
+ @end
411
+
412
+ SWIFT_PROTOCOL("_TtP16KeyWordDetection33SpeakerVerificationNativeDelegate_")
413
+ @protocol SpeakerVerificationNativeDelegate
414
+ - (void)svOnboardingProgress:(NSDictionary<NSString *, id> * _Nonnull)info;
415
+ - (void)svOnboardingDone:(NSDictionary<NSString *, id> * _Nonnull)info;
416
+ - (void)svVerifyResult:(NSDictionary<NSString *, id> * _Nonnull)info;
417
+ - (void)svError:(NSDictionary<NSString *, id> * _Nonnull)info;
418
+ @end
419
+
420
+ SWIFT_CLASS_NAMED("SpeakerVerificationRNFacade")
421
+ @interface SpeakerVerificationRNFacade : NSObject
422
+ + (id _Nullable)createEngineWithModelPath:(NSString * _Nonnull)modelPath enrollmentJsonPath:(NSString * _Nonnull)enrollmentJsonPath options:(NSDictionary<NSString *, id> * _Nonnull)options error:(NSError * _Nullable * _Nullable)outError SWIFT_WARN_UNUSED_RESULT;
423
+ + (NSDictionary<NSString *, id> * _Nullable)verifyWavWithEngine:(id _Nonnull)engine wavPath:(NSString * _Nonnull)wavPath reset:(BOOL)reset error:(NSError * _Nullable * _Nullable)outError SWIFT_WARN_UNUSED_RESULT;
424
+ - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
425
+ @end
426
+
427
+ @interface SpeakerVerificationRNFacade (SWIFT_EXTENSION(KeyWordDetection))
428
+ + (id _Nullable)createMicControllerWithConfigJson:(NSString * _Nonnull)configJson error:(NSError * _Nullable * _Nullable)outError SWIFT_WARN_UNUSED_RESULT;
429
+ @end
430
+
375
431
  #endif
376
432
  #if __has_attribute(external_source_symbol)
377
433
  # pragma clang attribute pop
@@ -754,6 +810,62 @@ SWIFT_CLASS("_TtC16KeyWordDetection14LicenseManager")
754
810
  - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
755
811
  @end
756
812
 
813
+ SWIFT_CLASS("_TtC16KeyWordDetection25SpeakerVerificationEngine")
814
+ @interface SpeakerVerificationEngine : NSObject
815
+ - (void)resetStreamingState;
816
+ - (nonnull instancetype)init SWIFT_UNAVAILABLE;
817
+ + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
818
+ @end
819
+
820
+ @protocol SpeakerVerificationNativeDelegate;
821
+ @class NSError;
822
+ SWIFT_CLASS("_TtC16KeyWordDetection32SpeakerVerificationMicController")
823
+ @interface SpeakerVerificationMicController : NSObject
824
+ @property (nonatomic, weak) id <SpeakerVerificationNativeDelegate> _Nullable delegate;
825
+ - (BOOL)beginOnboardingWithEnrollmentId:(NSString * _Nonnull)enrollmentId targetEmbeddingCount:(NSInteger)targetEmbeddingCount reset:(BOOL)reset error:(NSError * _Nullable * _Nullable)error;
826
+ /// App calls this each time it wants ONE embedding to be captured from mic.
827
+ /// When collected, controller stops mic and notifies delegate.
828
+ - (BOOL)getNextEmbeddingFromMicAndReturnError:(NSError * _Nullable * _Nullable)error;
829
+ /// Optional explicit finalize (usually you rely on auto-finalize when target reached).
830
+ - (BOOL)finalizeOnboardingNowAndReturnError:(NSError * _Nullable * _Nullable)error;
831
+ - (BOOL)setEnrollmentJson:(NSString * _Nonnull)enrollmentJson error:(NSError * _Nullable * _Nullable)error;
832
+ /// Starts mic and returns first verification result (then stops mic).
833
+ - (BOOL)startVerifyFromMicWithResetState:(BOOL)resetState error:(NSError * _Nullable * _Nullable)error;
834
+ - (BOOL)startEndlessVerifyFromMicWithHopSeconds:(NSNumber * _Nonnull)hopSeconds stopOnMatch:(BOOL)stopOnMatch error:(NSError * _Nullable * _Nullable)outError SWIFT_WARN_UNUSED_RESULT;
835
+ /// Starts mic and keeps verifying forever (emits result every hopSeconds).
836
+ /// <ul>
837
+ /// <li>
838
+ /// hopSeconds: how often to emit results (e.g. 0.5)
839
+ /// </li>
840
+ /// <li>
841
+ /// stopOnMatch: if true, stops mic on first match; otherwise keeps running
842
+ /// </li>
843
+ /// </ul>
844
+ - (BOOL)startEndlessVerifyFromMicWithHopSeconds:(float)hopSeconds stopOnMatch:(BOOL)stopOnMatch resetState:(BOOL)resetState error:(NSError * _Nullable * _Nullable)error;
845
+ - (void)stop;
846
+ - (nonnull instancetype)init SWIFT_UNAVAILABLE;
847
+ + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
848
+ @end
849
+
850
+ SWIFT_PROTOCOL("_TtP16KeyWordDetection33SpeakerVerificationNativeDelegate_")
851
+ @protocol SpeakerVerificationNativeDelegate
852
+ - (void)svOnboardingProgress:(NSDictionary<NSString *, id> * _Nonnull)info;
853
+ - (void)svOnboardingDone:(NSDictionary<NSString *, id> * _Nonnull)info;
854
+ - (void)svVerifyResult:(NSDictionary<NSString *, id> * _Nonnull)info;
855
+ - (void)svError:(NSDictionary<NSString *, id> * _Nonnull)info;
856
+ @end
857
+
858
+ SWIFT_CLASS_NAMED("SpeakerVerificationRNFacade")
859
+ @interface SpeakerVerificationRNFacade : NSObject
860
+ + (id _Nullable)createEngineWithModelPath:(NSString * _Nonnull)modelPath enrollmentJsonPath:(NSString * _Nonnull)enrollmentJsonPath options:(NSDictionary<NSString *, id> * _Nonnull)options error:(NSError * _Nullable * _Nullable)outError SWIFT_WARN_UNUSED_RESULT;
861
+ + (NSDictionary<NSString *, id> * _Nullable)verifyWavWithEngine:(id _Nonnull)engine wavPath:(NSString * _Nonnull)wavPath reset:(BOOL)reset error:(NSError * _Nullable * _Nullable)outError SWIFT_WARN_UNUSED_RESULT;
862
+ - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
863
+ @end
864
+
865
+ @interface SpeakerVerificationRNFacade (SWIFT_EXTENSION(KeyWordDetection))
866
+ + (id _Nullable)createMicControllerWithConfigJson:(NSString * _Nonnull)configJson error:(NSError * _Nullable * _Nullable)outError SWIFT_WARN_UNUSED_RESULT;
867
+ @end
868
+
757
869
  #endif
758
870
  #if __has_attribute(external_source_symbol)
759
871
  # pragma clang attribute pop