react-native-wakeword-sid 1.1.55 → 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/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64/KeyWordDetection.framework/Headers/KeyWordDetection-Swift.h +45 -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 +8485 -2271
- package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64/KeyWordDetection.framework/Modules/KeyWordDetection.swiftmodule/arm64-apple-ios.private.swiftinterface +130 -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 +130 -0
- package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/Headers/KeyWordDetection-Swift.h +90 -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 +8485 -2271
- package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/Modules/KeyWordDetection.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +130 -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 +130 -0
- package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/Modules/KeyWordDetection.swiftmodule/x86_64-apple-ios-simulator.abi.json +8485 -2271
- package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/Modules/KeyWordDetection.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +130 -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 +130 -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 +33 -33
- package/ios/KeyWordRNBridge/KeyWordRNBridge.m +332 -2
- package/package.json +1 -1
- package/wakewords/SpeakerVerificationRNBridge.d.ts +17 -0
- package/wakewords/SpeakerVerificationRNBridge.js +156 -19
- package/wakewords/index.d.ts +7 -4
- package/wakewords/index.js +16 -0
|
@@ -63,6 +63,133 @@ 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 stop()
|
|
167
|
+
@objc deinit
|
|
168
|
+
}
|
|
169
|
+
final public class SpeakerEnrollmentBuilder {
|
|
170
|
+
final public var targetEmbeddingCount: Swift.Int
|
|
171
|
+
public init(config: KeyWordDetection.SpeakerVerificationConfig, enrollmentId: Swift.String, logger: (any KeyWordDetection.SVLogger)? = nil) throws
|
|
172
|
+
final public func armForNextEmbedding(resetBuffer: Swift.Bool = true)
|
|
173
|
+
final public func disarm()
|
|
174
|
+
final public func reset()
|
|
175
|
+
final public func processEnrollmentFrame(_ frame: [Swift.Float]) throws
|
|
176
|
+
final public func isReadyToFinalize() -> Swift.Bool
|
|
177
|
+
final public func finalizeEnrollment() throws -> KeyWordDetection.SpeakerEnrollment
|
|
178
|
+
@objc deinit
|
|
179
|
+
}
|
|
180
|
+
@_inheritsConvenienceInitializers @objc(SpeakerVerificationRNFacade) final public class SpeakerVerificationRNFacade : ObjectiveC.NSObject {
|
|
181
|
+
@objc(createEngineWithModelPath:enrollmentJsonPath:options:error:) public static func createEngine(modelPath: Swift.String, enrollmentJsonPath: Swift.String, options: [Swift.String : Any], error outError: Foundation.NSErrorPointer) -> Any?
|
|
182
|
+
@objc(verifyWavWithEngine:wavPath:reset:error:) public static func verifyWav(engine: Any, wavPath: Swift.String, reset: Swift.Bool, error outError: Foundation.NSErrorPointer) -> [Swift.String : Any]?
|
|
183
|
+
@objc override dynamic public init()
|
|
184
|
+
@objc deinit
|
|
185
|
+
}
|
|
186
|
+
extension KeyWordDetection.SpeakerVerificationRNFacade {
|
|
187
|
+
@objc(createMicControllerWithConfigJson:error:) public static func createMicController(configJson: Swift.String, error outError: Foundation.NSErrorPointer) -> Any?
|
|
188
|
+
}
|
|
189
|
+
extension KeyWordDetection.SpeakerEnrollmentBuilder {
|
|
190
|
+
final public func processEnrollmentFrameDidCollect(_ frame: [Swift.Float]) throws -> Swift.Bool
|
|
191
|
+
final public func collectedCount() -> Swift.Int
|
|
192
|
+
}
|
|
66
193
|
public class AVAudioWrapperBuffer {
|
|
67
194
|
public init(size: Swift.Int)
|
|
68
195
|
public func write(samples: [Swift.Float]) -> Swift.Int16
|
|
@@ -157,3 +284,6 @@ public enum AudioPlaybackHook {
|
|
|
157
284
|
@objc override dynamic public init()
|
|
158
285
|
@objc deinit
|
|
159
286
|
}
|
|
287
|
+
extension KeyWordDetection.SVLogLevel : Swift.Equatable {}
|
|
288
|
+
extension KeyWordDetection.SVLogLevel : Swift.Hashable {}
|
|
289
|
+
extension KeyWordDetection.SVLogLevel : Swift.RawRepresentable {}
|
|
Binary file
|
|
@@ -63,6 +63,133 @@ 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 stop()
|
|
167
|
+
@objc deinit
|
|
168
|
+
}
|
|
169
|
+
final public class SpeakerEnrollmentBuilder {
|
|
170
|
+
final public var targetEmbeddingCount: Swift.Int
|
|
171
|
+
public init(config: KeyWordDetection.SpeakerVerificationConfig, enrollmentId: Swift.String, logger: (any KeyWordDetection.SVLogger)? = nil) throws
|
|
172
|
+
final public func armForNextEmbedding(resetBuffer: Swift.Bool = true)
|
|
173
|
+
final public func disarm()
|
|
174
|
+
final public func reset()
|
|
175
|
+
final public func processEnrollmentFrame(_ frame: [Swift.Float]) throws
|
|
176
|
+
final public func isReadyToFinalize() -> Swift.Bool
|
|
177
|
+
final public func finalizeEnrollment() throws -> KeyWordDetection.SpeakerEnrollment
|
|
178
|
+
@objc deinit
|
|
179
|
+
}
|
|
180
|
+
@_inheritsConvenienceInitializers @objc(SpeakerVerificationRNFacade) final public class SpeakerVerificationRNFacade : ObjectiveC.NSObject {
|
|
181
|
+
@objc(createEngineWithModelPath:enrollmentJsonPath:options:error:) public static func createEngine(modelPath: Swift.String, enrollmentJsonPath: Swift.String, options: [Swift.String : Any], error outError: Foundation.NSErrorPointer) -> Any?
|
|
182
|
+
@objc(verifyWavWithEngine:wavPath:reset:error:) public static func verifyWav(engine: Any, wavPath: Swift.String, reset: Swift.Bool, error outError: Foundation.NSErrorPointer) -> [Swift.String : Any]?
|
|
183
|
+
@objc override dynamic public init()
|
|
184
|
+
@objc deinit
|
|
185
|
+
}
|
|
186
|
+
extension KeyWordDetection.SpeakerVerificationRNFacade {
|
|
187
|
+
@objc(createMicControllerWithConfigJson:error:) public static func createMicController(configJson: Swift.String, error outError: Foundation.NSErrorPointer) -> Any?
|
|
188
|
+
}
|
|
189
|
+
extension KeyWordDetection.SpeakerEnrollmentBuilder {
|
|
190
|
+
final public func processEnrollmentFrameDidCollect(_ frame: [Swift.Float]) throws -> Swift.Bool
|
|
191
|
+
final public func collectedCount() -> Swift.Int
|
|
192
|
+
}
|
|
66
193
|
public class AVAudioWrapperBuffer {
|
|
67
194
|
public init(size: Swift.Int)
|
|
68
195
|
public func write(samples: [Swift.Float]) -> Swift.Int16
|
|
@@ -157,3 +284,6 @@ public enum AudioPlaybackHook {
|
|
|
157
284
|
@objc override dynamic public init()
|
|
158
285
|
@objc deinit
|
|
159
286
|
}
|
|
287
|
+
extension KeyWordDetection.SVLogLevel : Swift.Equatable {}
|
|
288
|
+
extension KeyWordDetection.SVLogLevel : Swift.Hashable {}
|
|
289
|
+
extension KeyWordDetection.SVLogLevel : Swift.RawRepresentable {}
|
|
@@ -372,6 +372,51 @@ 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
|
+
- (void)stop;
|
|
396
|
+
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
|
|
397
|
+
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
|
|
398
|
+
@end
|
|
399
|
+
|
|
400
|
+
SWIFT_PROTOCOL("_TtP16KeyWordDetection33SpeakerVerificationNativeDelegate_")
|
|
401
|
+
@protocol SpeakerVerificationNativeDelegate
|
|
402
|
+
- (void)svOnboardingProgress:(NSDictionary<NSString *, id> * _Nonnull)info;
|
|
403
|
+
- (void)svOnboardingDone:(NSDictionary<NSString *, id> * _Nonnull)info;
|
|
404
|
+
- (void)svVerifyResult:(NSDictionary<NSString *, id> * _Nonnull)info;
|
|
405
|
+
- (void)svError:(NSDictionary<NSString *, id> * _Nonnull)info;
|
|
406
|
+
@end
|
|
407
|
+
|
|
408
|
+
@class NSError;
|
|
409
|
+
SWIFT_CLASS_NAMED("SpeakerVerificationRNFacade")
|
|
410
|
+
@interface SpeakerVerificationRNFacade : NSObject
|
|
411
|
+
+ (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;
|
|
412
|
+
+ (NSDictionary<NSString *, id> * _Nullable)verifyWavWithEngine:(id _Nonnull)engine wavPath:(NSString * _Nonnull)wavPath reset:(BOOL)reset error:(NSError * _Nullable * _Nullable)outError SWIFT_WARN_UNUSED_RESULT;
|
|
413
|
+
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
|
414
|
+
@end
|
|
415
|
+
|
|
416
|
+
@interface SpeakerVerificationRNFacade (SWIFT_EXTENSION(KeyWordDetection))
|
|
417
|
+
+ (id _Nullable)createMicControllerWithConfigJson:(NSString * _Nonnull)configJson error:(NSError * _Nullable * _Nullable)outError SWIFT_WARN_UNUSED_RESULT;
|
|
418
|
+
@end
|
|
419
|
+
|
|
375
420
|
#endif
|
|
376
421
|
#if __has_attribute(external_source_symbol)
|
|
377
422
|
# pragma clang attribute pop
|
|
@@ -754,6 +799,51 @@ SWIFT_CLASS("_TtC16KeyWordDetection14LicenseManager")
|
|
|
754
799
|
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
|
755
800
|
@end
|
|
756
801
|
|
|
802
|
+
SWIFT_CLASS("_TtC16KeyWordDetection25SpeakerVerificationEngine")
|
|
803
|
+
@interface SpeakerVerificationEngine : NSObject
|
|
804
|
+
- (void)resetStreamingState;
|
|
805
|
+
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
|
|
806
|
+
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
|
|
807
|
+
@end
|
|
808
|
+
|
|
809
|
+
@protocol SpeakerVerificationNativeDelegate;
|
|
810
|
+
SWIFT_CLASS("_TtC16KeyWordDetection32SpeakerVerificationMicController")
|
|
811
|
+
@interface SpeakerVerificationMicController : NSObject
|
|
812
|
+
@property (nonatomic, weak) id <SpeakerVerificationNativeDelegate> _Nullable delegate;
|
|
813
|
+
- (BOOL)beginOnboardingWithEnrollmentId:(NSString * _Nonnull)enrollmentId targetEmbeddingCount:(NSInteger)targetEmbeddingCount reset:(BOOL)reset error:(NSError * _Nullable * _Nullable)error;
|
|
814
|
+
/// App calls this each time it wants ONE embedding to be captured from mic.
|
|
815
|
+
/// When collected, controller stops mic and notifies delegate.
|
|
816
|
+
- (BOOL)getNextEmbeddingFromMicAndReturnError:(NSError * _Nullable * _Nullable)error;
|
|
817
|
+
/// Optional explicit finalize (usually you rely on auto-finalize when target reached).
|
|
818
|
+
- (BOOL)finalizeOnboardingNowAndReturnError:(NSError * _Nullable * _Nullable)error;
|
|
819
|
+
- (BOOL)setEnrollmentJson:(NSString * _Nonnull)enrollmentJson error:(NSError * _Nullable * _Nullable)error;
|
|
820
|
+
/// Starts mic and returns first verification result (then stops mic).
|
|
821
|
+
- (BOOL)startVerifyFromMicWithResetState:(BOOL)resetState error:(NSError * _Nullable * _Nullable)error;
|
|
822
|
+
- (void)stop;
|
|
823
|
+
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
|
|
824
|
+
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
|
|
825
|
+
@end
|
|
826
|
+
|
|
827
|
+
SWIFT_PROTOCOL("_TtP16KeyWordDetection33SpeakerVerificationNativeDelegate_")
|
|
828
|
+
@protocol SpeakerVerificationNativeDelegate
|
|
829
|
+
- (void)svOnboardingProgress:(NSDictionary<NSString *, id> * _Nonnull)info;
|
|
830
|
+
- (void)svOnboardingDone:(NSDictionary<NSString *, id> * _Nonnull)info;
|
|
831
|
+
- (void)svVerifyResult:(NSDictionary<NSString *, id> * _Nonnull)info;
|
|
832
|
+
- (void)svError:(NSDictionary<NSString *, id> * _Nonnull)info;
|
|
833
|
+
@end
|
|
834
|
+
|
|
835
|
+
@class NSError;
|
|
836
|
+
SWIFT_CLASS_NAMED("SpeakerVerificationRNFacade")
|
|
837
|
+
@interface SpeakerVerificationRNFacade : NSObject
|
|
838
|
+
+ (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;
|
|
839
|
+
+ (NSDictionary<NSString *, id> * _Nullable)verifyWavWithEngine:(id _Nonnull)engine wavPath:(NSString * _Nonnull)wavPath reset:(BOOL)reset error:(NSError * _Nullable * _Nullable)outError SWIFT_WARN_UNUSED_RESULT;
|
|
840
|
+
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
|
841
|
+
@end
|
|
842
|
+
|
|
843
|
+
@interface SpeakerVerificationRNFacade (SWIFT_EXTENSION(KeyWordDetection))
|
|
844
|
+
+ (id _Nullable)createMicControllerWithConfigJson:(NSString * _Nonnull)configJson error:(NSError * _Nullable * _Nullable)outError SWIFT_WARN_UNUSED_RESULT;
|
|
845
|
+
@end
|
|
846
|
+
|
|
757
847
|
#endif
|
|
758
848
|
#if __has_attribute(external_source_symbol)
|
|
759
849
|
# pragma clang attribute pop
|