react-native-wakeword 1.1.56 → 1.1.57
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/KeyWordRNBridge.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/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +1 -1
- package/android/libs/com/davoice/keyworddetection/1.0.0/keyworddetection-1.0.0.aar +0 -0
- package/android/libs/com/davoice/keyworddetection/1.0.0/keyworddetection-1.0.0.aar.md5 +1 -1
- package/android/libs/com/davoice/keyworddetection/1.0.0/keyworddetection-1.0.0.aar.sha1 +1 -1
- package/android/src/main/java/com/davoice/keywordspotting/KeyWordRNBridge.java +764 -85
- package/android/src/main/java/com/davoice/speakeridrn/SpeakerIdRNBridge.java_not_used_yet +588 -0
- package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64/KeyWordDetection.framework/Headers/KeyWordDetection-Swift.h +55 -0
- package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64/KeyWordDetection.framework/Info.plist +0 -0
- package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64/KeyWordDetection.framework/KeyWordDetection +0 -0
- package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64/KeyWordDetection.framework/Modules/KeyWordDetection.swiftmodule/arm64-apple-ios.abi.json +8863 -2435
- package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64/KeyWordDetection.framework/Modules/KeyWordDetection.swiftmodule/arm64-apple-ios.private.swiftinterface +132 -0
- package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64/KeyWordDetection.framework/Modules/KeyWordDetection.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64/KeyWordDetection.framework/Modules/KeyWordDetection.swiftmodule/arm64-apple-ios.swiftinterface +132 -0
- package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/Headers/KeyWordDetection-Swift.h +110 -0
- package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/Info.plist +0 -0
- package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/KeyWordDetection +0 -0
- package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/Modules/KeyWordDetection.swiftmodule/arm64-apple-ios-simulator.abi.json +8863 -2435
- package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/Modules/KeyWordDetection.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +132 -0
- package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/Modules/KeyWordDetection.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/Modules/KeyWordDetection.swiftmodule/arm64-apple-ios-simulator.swiftinterface +132 -0
- package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/Modules/KeyWordDetection.swiftmodule/x86_64-apple-ios-simulator.abi.json +8863 -2435
- package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/Modules/KeyWordDetection.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +132 -0
- package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/Modules/KeyWordDetection.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/Modules/KeyWordDetection.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +132 -0
- package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/_CodeSignature/CodeDirectory +0 -0
- package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/_CodeSignature/CodeRequirements-1 +0 -0
- package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/_CodeSignature/CodeResources +34 -34
- package/ios/KeyWordRNBridge/KeyWordRNBridge.m +704 -3
- package/package.json +1 -1
- package/wakewords/SpeakerVerificationRNBridge.d.ts +49 -0
- package/wakewords/SpeakerVerificationRNBridge.js +294 -0
- package/wakewords/index.d.ts +18 -10
- package/wakewords/index.js +28 -0
- package/android/src/main/assets/coca_cola_model_28_05052025.dm +0 -0
- package/wakewords/index.d.ts.chat_idiot +0 -2
|
@@ -63,6 +63,135 @@ 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 final public func startEndlessVerifyFromMic(hopSeconds: Swift.Float = 0.5, stopOnMatch: Swift.Bool = false, resetState: Swift.Bool = true) throws
|
|
167
|
+
@objc final public func stop()
|
|
168
|
+
@objc deinit
|
|
169
|
+
}
|
|
170
|
+
final public class SpeakerEnrollmentBuilder {
|
|
171
|
+
final public var targetEmbeddingCount: Swift.Int
|
|
172
|
+
public init(config: KeyWordDetection.SpeakerVerificationConfig, enrollmentId: Swift.String, logger: (any KeyWordDetection.SVLogger)? = nil) throws
|
|
173
|
+
final public func armForNextEmbedding(resetBuffer: Swift.Bool = true)
|
|
174
|
+
final public func debugState() -> (armed: Swift.Bool, buffered: Swift.Int, needed: Swift.Int, collected: Swift.Int)
|
|
175
|
+
final public func disarm()
|
|
176
|
+
final public func reset()
|
|
177
|
+
final public func processEnrollmentFrame(_ frame: [Swift.Float]) throws
|
|
178
|
+
final public func isReadyToFinalize() -> Swift.Bool
|
|
179
|
+
final public func finalizeEnrollment() throws -> KeyWordDetection.SpeakerEnrollment
|
|
180
|
+
@objc deinit
|
|
181
|
+
}
|
|
182
|
+
@_inheritsConvenienceInitializers @objc(SpeakerVerificationRNFacade) final public class SpeakerVerificationRNFacade : ObjectiveC.NSObject {
|
|
183
|
+
@objc(createEngineWithModelPath:enrollmentJsonPath:options:error:) public static func createEngine(modelPath: Swift.String, enrollmentJsonPath: Swift.String, options: [Swift.String : Any], error outError: Foundation.NSErrorPointer) -> Any?
|
|
184
|
+
@objc(verifyWavWithEngine:wavPath:reset:error:) public static func verifyWav(engine: Any, wavPath: Swift.String, reset: Swift.Bool, error outError: Foundation.NSErrorPointer) -> [Swift.String : Any]?
|
|
185
|
+
@objc override dynamic public init()
|
|
186
|
+
@objc deinit
|
|
187
|
+
}
|
|
188
|
+
extension KeyWordDetection.SpeakerVerificationRNFacade {
|
|
189
|
+
@objc(createMicControllerWithConfigJson:error:) public static func createMicController(configJson: Swift.String, error outError: Foundation.NSErrorPointer) -> Any?
|
|
190
|
+
}
|
|
191
|
+
extension KeyWordDetection.SpeakerEnrollmentBuilder {
|
|
192
|
+
final public func processEnrollmentFrameDidCollect(_ frame: [Swift.Float]) throws -> Swift.Bool
|
|
193
|
+
final public func collectedCount() -> Swift.Int
|
|
194
|
+
}
|
|
66
195
|
public class AVAudioWrapperBuffer {
|
|
67
196
|
public init(size: Swift.Int)
|
|
68
197
|
public func write(samples: [Swift.Float]) -> Swift.Int16
|
|
@@ -157,3 +286,6 @@ public enum AudioPlaybackHook {
|
|
|
157
286
|
@objc override dynamic public init()
|
|
158
287
|
@objc deinit
|
|
159
288
|
}
|
|
289
|
+
extension KeyWordDetection.SVLogLevel : Swift.Equatable {}
|
|
290
|
+
extension KeyWordDetection.SVLogLevel : Swift.Hashable {}
|
|
291
|
+
extension KeyWordDetection.SVLogLevel : Swift.RawRepresentable {}
|
|
Binary file
|
|
@@ -63,6 +63,135 @@ 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 final public func startEndlessVerifyFromMic(hopSeconds: Swift.Float = 0.5, stopOnMatch: Swift.Bool = false, resetState: Swift.Bool = true) throws
|
|
167
|
+
@objc final public func stop()
|
|
168
|
+
@objc deinit
|
|
169
|
+
}
|
|
170
|
+
final public class SpeakerEnrollmentBuilder {
|
|
171
|
+
final public var targetEmbeddingCount: Swift.Int
|
|
172
|
+
public init(config: KeyWordDetection.SpeakerVerificationConfig, enrollmentId: Swift.String, logger: (any KeyWordDetection.SVLogger)? = nil) throws
|
|
173
|
+
final public func armForNextEmbedding(resetBuffer: Swift.Bool = true)
|
|
174
|
+
final public func debugState() -> (armed: Swift.Bool, buffered: Swift.Int, needed: Swift.Int, collected: Swift.Int)
|
|
175
|
+
final public func disarm()
|
|
176
|
+
final public func reset()
|
|
177
|
+
final public func processEnrollmentFrame(_ frame: [Swift.Float]) throws
|
|
178
|
+
final public func isReadyToFinalize() -> Swift.Bool
|
|
179
|
+
final public func finalizeEnrollment() throws -> KeyWordDetection.SpeakerEnrollment
|
|
180
|
+
@objc deinit
|
|
181
|
+
}
|
|
182
|
+
@_inheritsConvenienceInitializers @objc(SpeakerVerificationRNFacade) final public class SpeakerVerificationRNFacade : ObjectiveC.NSObject {
|
|
183
|
+
@objc(createEngineWithModelPath:enrollmentJsonPath:options:error:) public static func createEngine(modelPath: Swift.String, enrollmentJsonPath: Swift.String, options: [Swift.String : Any], error outError: Foundation.NSErrorPointer) -> Any?
|
|
184
|
+
@objc(verifyWavWithEngine:wavPath:reset:error:) public static func verifyWav(engine: Any, wavPath: Swift.String, reset: Swift.Bool, error outError: Foundation.NSErrorPointer) -> [Swift.String : Any]?
|
|
185
|
+
@objc override dynamic public init()
|
|
186
|
+
@objc deinit
|
|
187
|
+
}
|
|
188
|
+
extension KeyWordDetection.SpeakerVerificationRNFacade {
|
|
189
|
+
@objc(createMicControllerWithConfigJson:error:) public static func createMicController(configJson: Swift.String, error outError: Foundation.NSErrorPointer) -> Any?
|
|
190
|
+
}
|
|
191
|
+
extension KeyWordDetection.SpeakerEnrollmentBuilder {
|
|
192
|
+
final public func processEnrollmentFrameDidCollect(_ frame: [Swift.Float]) throws -> Swift.Bool
|
|
193
|
+
final public func collectedCount() -> Swift.Int
|
|
194
|
+
}
|
|
66
195
|
public class AVAudioWrapperBuffer {
|
|
67
196
|
public init(size: Swift.Int)
|
|
68
197
|
public func write(samples: [Swift.Float]) -> Swift.Int16
|
|
@@ -157,3 +286,6 @@ public enum AudioPlaybackHook {
|
|
|
157
286
|
@objc override dynamic public init()
|
|
158
287
|
@objc deinit
|
|
159
288
|
}
|
|
289
|
+
extension KeyWordDetection.SVLogLevel : Swift.Equatable {}
|
|
290
|
+
extension KeyWordDetection.SVLogLevel : Swift.Hashable {}
|
|
291
|
+
extension KeyWordDetection.SVLogLevel : Swift.RawRepresentable {}
|
|
@@ -372,6 +372,61 @@ 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
|
+
SWIFT_CLASS("_TtC16KeyWordDetection32SpeakerVerificationMicController")
|
|
384
|
+
@interface SpeakerVerificationMicController : NSObject
|
|
385
|
+
@property (nonatomic, weak) id <SpeakerVerificationNativeDelegate> _Nullable delegate;
|
|
386
|
+
- (BOOL)beginOnboardingWithEnrollmentId:(NSString * _Nonnull)enrollmentId targetEmbeddingCount:(NSInteger)targetEmbeddingCount reset:(BOOL)reset error:(NSError * _Nullable * _Nullable)error;
|
|
387
|
+
/// App calls this each time it wants ONE embedding to be captured from mic.
|
|
388
|
+
/// When collected, controller stops mic and notifies delegate.
|
|
389
|
+
- (BOOL)getNextEmbeddingFromMicAndReturnError:(NSError * _Nullable * _Nullable)error;
|
|
390
|
+
/// Optional explicit finalize (usually you rely on auto-finalize when target reached).
|
|
391
|
+
- (BOOL)finalizeOnboardingNowAndReturnError:(NSError * _Nullable * _Nullable)error;
|
|
392
|
+
- (BOOL)setEnrollmentJson:(NSString * _Nonnull)enrollmentJson error:(NSError * _Nullable * _Nullable)error;
|
|
393
|
+
/// Starts mic and returns first verification result (then stops mic).
|
|
394
|
+
- (BOOL)startVerifyFromMicWithResetState:(BOOL)resetState error:(NSError * _Nullable * _Nullable)error;
|
|
395
|
+
/// Starts mic and keeps verifying forever (emits result every hopSeconds).
|
|
396
|
+
/// <ul>
|
|
397
|
+
/// <li>
|
|
398
|
+
/// hopSeconds: how often to emit results (e.g. 0.5)
|
|
399
|
+
/// </li>
|
|
400
|
+
/// <li>
|
|
401
|
+
/// stopOnMatch: if true, stops mic on first match; otherwise keeps running
|
|
402
|
+
/// </li>
|
|
403
|
+
/// </ul>
|
|
404
|
+
- (BOOL)startEndlessVerifyFromMicWithHopSeconds:(float)hopSeconds stopOnMatch:(BOOL)stopOnMatch resetState:(BOOL)resetState error:(NSError * _Nullable * _Nullable)error;
|
|
405
|
+
- (void)stop;
|
|
406
|
+
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
|
|
407
|
+
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
|
|
408
|
+
@end
|
|
409
|
+
|
|
410
|
+
SWIFT_PROTOCOL("_TtP16KeyWordDetection33SpeakerVerificationNativeDelegate_")
|
|
411
|
+
@protocol SpeakerVerificationNativeDelegate
|
|
412
|
+
- (void)svOnboardingProgress:(NSDictionary<NSString *, id> * _Nonnull)info;
|
|
413
|
+
- (void)svOnboardingDone:(NSDictionary<NSString *, id> * _Nonnull)info;
|
|
414
|
+
- (void)svVerifyResult:(NSDictionary<NSString *, id> * _Nonnull)info;
|
|
415
|
+
- (void)svError:(NSDictionary<NSString *, id> * _Nonnull)info;
|
|
416
|
+
@end
|
|
417
|
+
|
|
418
|
+
@class NSError;
|
|
419
|
+
SWIFT_CLASS_NAMED("SpeakerVerificationRNFacade")
|
|
420
|
+
@interface SpeakerVerificationRNFacade : NSObject
|
|
421
|
+
+ (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;
|
|
422
|
+
+ (NSDictionary<NSString *, id> * _Nullable)verifyWavWithEngine:(id _Nonnull)engine wavPath:(NSString * _Nonnull)wavPath reset:(BOOL)reset error:(NSError * _Nullable * _Nullable)outError SWIFT_WARN_UNUSED_RESULT;
|
|
423
|
+
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
|
424
|
+
@end
|
|
425
|
+
|
|
426
|
+
@interface SpeakerVerificationRNFacade (SWIFT_EXTENSION(KeyWordDetection))
|
|
427
|
+
+ (id _Nullable)createMicControllerWithConfigJson:(NSString * _Nonnull)configJson error:(NSError * _Nullable * _Nullable)outError SWIFT_WARN_UNUSED_RESULT;
|
|
428
|
+
@end
|
|
429
|
+
|
|
375
430
|
#endif
|
|
376
431
|
#if __has_attribute(external_source_symbol)
|
|
377
432
|
# pragma clang attribute pop
|
|
@@ -754,6 +809,61 @@ SWIFT_CLASS("_TtC16KeyWordDetection14LicenseManager")
|
|
|
754
809
|
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
|
755
810
|
@end
|
|
756
811
|
|
|
812
|
+
SWIFT_CLASS("_TtC16KeyWordDetection25SpeakerVerificationEngine")
|
|
813
|
+
@interface SpeakerVerificationEngine : NSObject
|
|
814
|
+
- (void)resetStreamingState;
|
|
815
|
+
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
|
|
816
|
+
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
|
|
817
|
+
@end
|
|
818
|
+
|
|
819
|
+
@protocol SpeakerVerificationNativeDelegate;
|
|
820
|
+
SWIFT_CLASS("_TtC16KeyWordDetection32SpeakerVerificationMicController")
|
|
821
|
+
@interface SpeakerVerificationMicController : NSObject
|
|
822
|
+
@property (nonatomic, weak) id <SpeakerVerificationNativeDelegate> _Nullable delegate;
|
|
823
|
+
- (BOOL)beginOnboardingWithEnrollmentId:(NSString * _Nonnull)enrollmentId targetEmbeddingCount:(NSInteger)targetEmbeddingCount reset:(BOOL)reset error:(NSError * _Nullable * _Nullable)error;
|
|
824
|
+
/// App calls this each time it wants ONE embedding to be captured from mic.
|
|
825
|
+
/// When collected, controller stops mic and notifies delegate.
|
|
826
|
+
- (BOOL)getNextEmbeddingFromMicAndReturnError:(NSError * _Nullable * _Nullable)error;
|
|
827
|
+
/// Optional explicit finalize (usually you rely on auto-finalize when target reached).
|
|
828
|
+
- (BOOL)finalizeOnboardingNowAndReturnError:(NSError * _Nullable * _Nullable)error;
|
|
829
|
+
- (BOOL)setEnrollmentJson:(NSString * _Nonnull)enrollmentJson error:(NSError * _Nullable * _Nullable)error;
|
|
830
|
+
/// Starts mic and returns first verification result (then stops mic).
|
|
831
|
+
- (BOOL)startVerifyFromMicWithResetState:(BOOL)resetState error:(NSError * _Nullable * _Nullable)error;
|
|
832
|
+
/// Starts mic and keeps verifying forever (emits result every hopSeconds).
|
|
833
|
+
/// <ul>
|
|
834
|
+
/// <li>
|
|
835
|
+
/// hopSeconds: how often to emit results (e.g. 0.5)
|
|
836
|
+
/// </li>
|
|
837
|
+
/// <li>
|
|
838
|
+
/// stopOnMatch: if true, stops mic on first match; otherwise keeps running
|
|
839
|
+
/// </li>
|
|
840
|
+
/// </ul>
|
|
841
|
+
- (BOOL)startEndlessVerifyFromMicWithHopSeconds:(float)hopSeconds stopOnMatch:(BOOL)stopOnMatch resetState:(BOOL)resetState error:(NSError * _Nullable * _Nullable)error;
|
|
842
|
+
- (void)stop;
|
|
843
|
+
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
|
|
844
|
+
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
|
|
845
|
+
@end
|
|
846
|
+
|
|
847
|
+
SWIFT_PROTOCOL("_TtP16KeyWordDetection33SpeakerVerificationNativeDelegate_")
|
|
848
|
+
@protocol SpeakerVerificationNativeDelegate
|
|
849
|
+
- (void)svOnboardingProgress:(NSDictionary<NSString *, id> * _Nonnull)info;
|
|
850
|
+
- (void)svOnboardingDone:(NSDictionary<NSString *, id> * _Nonnull)info;
|
|
851
|
+
- (void)svVerifyResult:(NSDictionary<NSString *, id> * _Nonnull)info;
|
|
852
|
+
- (void)svError:(NSDictionary<NSString *, id> * _Nonnull)info;
|
|
853
|
+
@end
|
|
854
|
+
|
|
855
|
+
@class NSError;
|
|
856
|
+
SWIFT_CLASS_NAMED("SpeakerVerificationRNFacade")
|
|
857
|
+
@interface SpeakerVerificationRNFacade : NSObject
|
|
858
|
+
+ (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;
|
|
859
|
+
+ (NSDictionary<NSString *, id> * _Nullable)verifyWavWithEngine:(id _Nonnull)engine wavPath:(NSString * _Nonnull)wavPath reset:(BOOL)reset error:(NSError * _Nullable * _Nullable)outError SWIFT_WARN_UNUSED_RESULT;
|
|
860
|
+
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
|
861
|
+
@end
|
|
862
|
+
|
|
863
|
+
@interface SpeakerVerificationRNFacade (SWIFT_EXTENSION(KeyWordDetection))
|
|
864
|
+
+ (id _Nullable)createMicControllerWithConfigJson:(NSString * _Nonnull)configJson error:(NSError * _Nullable * _Nullable)outError SWIFT_WARN_UNUSED_RESULT;
|
|
865
|
+
@end
|
|
866
|
+
|
|
757
867
|
#endif
|
|
758
868
|
#if __has_attribute(external_source_symbol)
|
|
759
869
|
# pragma clang attribute pop
|
|
Binary file
|