react-native-wakeword-sid 1.1.70
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 +58 -0
- package/LICENSE +21 -0
- package/README.md +282 -0
- package/android/.gradle/8.9/checksums/checksums.lock +0 -0
- package/android/.gradle/8.9/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/8.9/fileChanges/last-build.bin +0 -0
- package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/8.9/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/build.gradle +48 -0
- 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 -0
- package/android/libs/com/davoice/keyworddetection/1.0.0/keyworddetection-1.0.0.aar.sha1 +1 -0
- package/android/libs/com/davoice/keyworddetection/1.0.0/keyworddetection-1.0.0.pom +10 -0
- package/android/libs/com/davoice/keyworddetection/1.0.0/keyworddetection-1.0.0.pom.md5 +1 -0
- package/android/libs/com/davoice/keyworddetection/1.0.0/keyworddetection-1.0.0.pom.sha1 +1 -0
- package/android/settings.gradle +2 -0
- package/android/src/main/AndroidManifest.xml +17 -0
- package/android/src/main/assets/hey_lookdeep.dm +0 -0
- package/android/src/main/assets/layer1.dm +0 -0
- package/android/src/main/assets/need_help_now.dm +0 -0
- package/android/src/main/java/com/davoice/keywordspotting/KeyWordRNBridge.java +331 -0
- package/android/src/main/java/com/davoice/keywordspotting/KeyWordRNBridgePackage.java +25 -0
- package/android/src/main/java/com/davoice/speakeridrn/SpeakerIdRNBridge.java +373 -0
- package/android/src/main/java/com/davoice/speakeridrn/SpeakerIdRNBridgePackage.java +24 -0
- package/android/src/main/libs/MyLibrary-release.aar +0 -0
- package/app.plugin.js +60 -0
- package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/Info.plist +44 -0
- package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64/KeyWordDetection.framework/Headers/KeyWordDetection-Swift.h +399 -0
- package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64/KeyWordDetection.framework/Headers/KeyWordDetection.h +18 -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 +5570 -0
- package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64/KeyWordDetection.framework/Modules/KeyWordDetection.swiftmodule/arm64-apple-ios.private.swiftinterface +157 -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 +157 -0
- package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64/KeyWordDetection.framework/Modules/module.modulemap +11 -0
- package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/Headers/KeyWordDetection-Swift.h +794 -0
- package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/Headers/KeyWordDetection.h +18 -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 +5570 -0
- package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/Modules/KeyWordDetection.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +157 -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 +157 -0
- package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/Modules/KeyWordDetection.swiftmodule/x86_64-apple-ios-simulator.abi.json +5570 -0
- package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/Modules/KeyWordDetection.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +157 -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 +157 -0
- package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/Modules/module.modulemap +11 -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 +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 +297 -0
- package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/_CodeSignature/CodeSignature +0 -0
- package/ios/KeyWordRNBridge/KeyWordRNBridge.h +19 -0
- package/ios/KeyWordRNBridge/KeyWordRNBridge.mm +395 -0
- package/ios/KeyWordRNBridge/models/coca_cola_model_28_05052025.onnx +0 -0
- package/ios/KeyWordRNBridge/models/embedding_model.onnx +0 -0
- package/ios/KeyWordRNBridge/models/hey_lookdeep.onnx +0 -0
- package/ios/KeyWordRNBridge/models/melspectrogram.onnx +0 -0
- package/ios/KeyWordRNBridge/models/need_help_now.onnx +0 -0
- package/ios/KeyWordRNBridge/models/silero_vad.onnx +0 -0
- package/package.json +74 -0
- package/speakerid/SpeakerIdRNBridge.d.ts +44 -0
- package/speakerid/SpeakerIdRNBridge.js +169 -0
- package/wakewords/KeyWordRNBridge.d.ts +37 -0
- package/wakewords/KeyWordRNBridge.js +221 -0
- package/wakewords/index.d.ts +10 -0
- package/wakewords/index.js +21 -0
- package/wakewords/useModel.d.ts +19 -0
- package/wakewords/useModel.tsx +235 -0
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
// swift-interface-format-version: 1.0
|
|
2
|
+
// swift-compiler-version: Apple Swift version 6.1.2 effective-5.10 (swiftlang-6.1.2.1.2 clang-1700.0.13.5)
|
|
3
|
+
// swift-module-flags: -target arm64-apple-ios13.5 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -enable-experimental-feature DebugDescriptionMacro -enable-bare-slash-regex -module-name KeyWordDetection
|
|
4
|
+
// swift-module-flags-ignorable: -no-verify-emitted-module-interface -interface-compiler-version 6.1.2
|
|
5
|
+
import AVFAudio
|
|
6
|
+
import AVFoundation
|
|
7
|
+
import Accelerate
|
|
8
|
+
import AudioToolbox
|
|
9
|
+
import CommonCrypto
|
|
10
|
+
import Foundation
|
|
11
|
+
@_exported import KeyWordDetection
|
|
12
|
+
import Swift
|
|
13
|
+
import _Concurrency
|
|
14
|
+
import _StringProcessing
|
|
15
|
+
import _SwiftConcurrencyShims
|
|
16
|
+
import os.log
|
|
17
|
+
import onnxruntime_objc
|
|
18
|
+
import os
|
|
19
|
+
public class AVAudioWrapperBufferCE {
|
|
20
|
+
public init(size: Swift.Int)
|
|
21
|
+
public func write(samples: [Swift.Float])
|
|
22
|
+
public func read(count: Swift.Int) -> [Swift.Float]
|
|
23
|
+
public func availableSamples() -> Swift.Int
|
|
24
|
+
@objc deinit
|
|
25
|
+
}
|
|
26
|
+
public typealias AVAudioWrapperFrameCallback = ([Swift.Float]) -> Swift.Void
|
|
27
|
+
public class AVAudioWrapperFrameListener {
|
|
28
|
+
public init(_ callback: @escaping KeyWordDetection.AVAudioWrapperFrameCallback)
|
|
29
|
+
public func onFrame(_ frame: [Swift.Float])
|
|
30
|
+
@objc deinit
|
|
31
|
+
}
|
|
32
|
+
@_hasMissingDesignatedInitializers public class AVAudioWrapperCE {
|
|
33
|
+
public static let instance: KeyWordDetection.AVAudioWrapperCE
|
|
34
|
+
public var isRecording: Swift.Bool {
|
|
35
|
+
get
|
|
36
|
+
}
|
|
37
|
+
public var frameLength: Swift.UInt32? {
|
|
38
|
+
get
|
|
39
|
+
}
|
|
40
|
+
public var sampleRate: Swift.UInt32? {
|
|
41
|
+
get
|
|
42
|
+
}
|
|
43
|
+
public var numFrameListeners: Swift.Int {
|
|
44
|
+
get
|
|
45
|
+
}
|
|
46
|
+
public static var hasRecordAudioPermission: Swift.Bool {
|
|
47
|
+
get
|
|
48
|
+
}
|
|
49
|
+
public static func requestRecordAudioPermission(_ response: @escaping (Swift.Bool) -> Swift.Void)
|
|
50
|
+
public func addFrameListener(_ listener: KeyWordDetection.AVAudioWrapperFrameListener)
|
|
51
|
+
public func removeFrameListener(_ listener: KeyWordDetection.AVAudioWrapperFrameListener)
|
|
52
|
+
public func clearFrameListeners()
|
|
53
|
+
public func setSessionOptions(sessionOptions: AVFAudio.AVAudioSession.CategoryOptions)
|
|
54
|
+
public func start(frameLength: Swift.UInt32, sampleRate: Swift.UInt32, setActive: Swift.Bool = true, duckOthers: Swift.Bool = false, mixWithOthers: Swift.Bool = true, defaultToSpeaker: Swift.Bool = true)
|
|
55
|
+
public func stop() throws
|
|
56
|
+
@objc deinit
|
|
57
|
+
}
|
|
58
|
+
public class AVAudioWrapperBuffer {
|
|
59
|
+
public init(size: Swift.Int)
|
|
60
|
+
public func write(samples: [Swift.Float]) -> Swift.Int16
|
|
61
|
+
public func read(count: Swift.Int) -> [Swift.Float]
|
|
62
|
+
public func availableSamples() -> Swift.Int
|
|
63
|
+
@objc deinit
|
|
64
|
+
}
|
|
65
|
+
public class AVAudioWrapper {
|
|
66
|
+
public static let instance: KeyWordDetection.AVAudioWrapper
|
|
67
|
+
public var isRecording: Swift.Bool {
|
|
68
|
+
get
|
|
69
|
+
}
|
|
70
|
+
public var frameLength: Swift.UInt32? {
|
|
71
|
+
get
|
|
72
|
+
}
|
|
73
|
+
public var sampleRate: Swift.UInt32? {
|
|
74
|
+
get
|
|
75
|
+
}
|
|
76
|
+
public var numFrameListeners: Swift.Int {
|
|
77
|
+
get
|
|
78
|
+
}
|
|
79
|
+
public func setSessionOptions(sessionOptions: AVFAudio.AVAudioSession.CategoryOptions)
|
|
80
|
+
public init()
|
|
81
|
+
public static var hasRecordAudioPermission: Swift.Bool {
|
|
82
|
+
get
|
|
83
|
+
}
|
|
84
|
+
public static func requestRecordAudioPermission(_ response: @escaping (Swift.Bool) -> Swift.Void)
|
|
85
|
+
public func addFrameListener(_ listener: KeyWordDetection.AVAudioWrapperFrameListener)
|
|
86
|
+
public func addFrameListeners(_ listeners: [KeyWordDetection.AVAudioWrapperFrameListener])
|
|
87
|
+
public func removeFrameListener(_ listener: KeyWordDetection.AVAudioWrapperFrameListener)
|
|
88
|
+
public func removeFrameListeners(_ listeners: [KeyWordDetection.AVAudioWrapperFrameListener])
|
|
89
|
+
public func clearFrameListeners()
|
|
90
|
+
public func startAfterUnDucking()
|
|
91
|
+
public func start(frameLength: Swift.UInt32, sampleRate: Swift.UInt32, setActive: Swift.Bool = true, duckOthers: Swift.Bool = false, mixWithOthers: Swift.Bool = true, defaultToSpeaker: Swift.Bool = true)
|
|
92
|
+
public func stop() throws
|
|
93
|
+
@objc deinit
|
|
94
|
+
}
|
|
95
|
+
@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objc public class GlobalVariables : ObjectiveC.NSObject {
|
|
96
|
+
@objc public static let shared: KeyWordDetection.GlobalVariables
|
|
97
|
+
@objc public var keyWordsDetectionInstance: KeyWordDetection.KeyWordsDetection?
|
|
98
|
+
@objc public var modelName: Swift.String?
|
|
99
|
+
@objc public var threshold: Swift.Float
|
|
100
|
+
@objc public var bufferCnt: Swift.Int
|
|
101
|
+
@objc deinit
|
|
102
|
+
}
|
|
103
|
+
@objc public protocol KeywordDetectionRNDelegate {
|
|
104
|
+
@objc func KeywordDetectionDidDetectEvent(_ eventInfo: [Swift.String : Any])
|
|
105
|
+
}
|
|
106
|
+
@objc public class KeyWordsDetection : ObjectiveC.NSObject {
|
|
107
|
+
@objc weak public var delegate: (any KeyWordDetection.KeywordDetectionRNDelegate)?
|
|
108
|
+
public var eventSink: (([Swift.String : Any]) -> Swift.Void)?
|
|
109
|
+
@objc convenience public init(modelPath: Swift.String, threshold: Swift.Float, bufferCnt: Swift.Int) throws
|
|
110
|
+
@objc convenience public init(modelPaths: [Swift.String], thresholds: [Foundation.NSNumber], bufferCnts: [Foundation.NSNumber], msBetweenCallback: [Foundation.NSNumber]) throws
|
|
111
|
+
@objc public init(modelPaths: [Swift.String], thresholds: [Swift.Float], bufferCnts: [Swift.Int], msBetweenCallback: [Swift.Int64], cancelEcho: Swift.Bool = false) throws
|
|
112
|
+
@objc public func replaceKeywordDetectionModel(modelPath: Swift.String, threshold: Swift.Float, bufferCnt: Swift.Int) throws
|
|
113
|
+
@objc public func replaceKeywordDetectionModels(modelPaths: [Swift.String], thresholds: [Swift.Float], bufferCnts: [Swift.Int], msBetweenCallback: [Swift.Int64]) throws
|
|
114
|
+
@objc public func getKeywordDetectionModel() -> Swift.String
|
|
115
|
+
@objc public func getRecordingWav() -> Swift.String
|
|
116
|
+
@objc public func setKeywordDetectionLicense(licenseKey: Swift.String) -> Swift.Bool
|
|
117
|
+
@objc public func setLicense(licenseKey: Swift.String) -> Swift.Bool
|
|
118
|
+
@objc public func callBack(frame: [Swift.Float])
|
|
119
|
+
@objc public func startListening(setActive: Swift.Bool = true, duckOthers: Swift.Bool = false, mixWithOthers: Swift.Bool = true, defaultToSpeaker: Swift.Bool = true) -> Swift.Bool
|
|
120
|
+
@objc public func stopListening()
|
|
121
|
+
@objc public func getVoiceProps() -> [Swift.String : Any]
|
|
122
|
+
@objc public func startSilentListening() -> Swift.Bool
|
|
123
|
+
@objc public func startVADListening() -> Swift.Bool
|
|
124
|
+
@objc public func setVADParams(threshold: Swift.Float, msWindow: Swift.Int) throws
|
|
125
|
+
@objc public func stopSilentListening()
|
|
126
|
+
@objc public func stopVADListening()
|
|
127
|
+
@objc deinit
|
|
128
|
+
}
|
|
129
|
+
public typealias EngineSchedule = (_ url: Foundation.URL, _ onDone: @escaping () -> Swift.Void) -> Swift.Bool
|
|
130
|
+
public enum AudioPlaybackHook {
|
|
131
|
+
public static var engineScheduleFile: KeyWordDetection.EngineSchedule?
|
|
132
|
+
}
|
|
133
|
+
@_inheritsConvenienceInitializers @objc public class AudioSessionAndDuckingManager : ObjectiveC.NSObject {
|
|
134
|
+
@objc public static let shared: KeyWordDetection.AudioSessionAndDuckingManager
|
|
135
|
+
@objc public func initAudioSessAndDuckManage()
|
|
136
|
+
@objc public func disableDucking()
|
|
137
|
+
@objc public func _disableDucking()
|
|
138
|
+
@objc public func enableAggressiveDucking()
|
|
139
|
+
@objc public func _enableAggressiveDucking()
|
|
140
|
+
@objc public func enableAggressiveDuckingWorksMaxSilencing()
|
|
141
|
+
@objc public func enableAggressiveDuckingWorksOnSecondTime()
|
|
142
|
+
@objc public func disableDuckingWorks()
|
|
143
|
+
@objc public func disableDuckingDidNotUnDuck()
|
|
144
|
+
@objc public func disableDuckingOrg()
|
|
145
|
+
@objc public func restartListeningAfterDucking()
|
|
146
|
+
@objc public func disableDuckingAndCleanup()
|
|
147
|
+
@objc public func activateSessionForDucking()
|
|
148
|
+
@objc public func playInstructionSound(_ soundURL: Foundation.URL)
|
|
149
|
+
@objc public func speakInstruction(_ text: Swift.String)
|
|
150
|
+
@objc public func deactivateSession()
|
|
151
|
+
@objc override dynamic public init()
|
|
152
|
+
@objc deinit
|
|
153
|
+
}
|
|
154
|
+
@_inheritsConvenienceInitializers @objc public class LicenseManager : ObjectiveC.NSObject {
|
|
155
|
+
@objc override dynamic public init()
|
|
156
|
+
@objc deinit
|
|
157
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
// swift-interface-format-version: 1.0
|
|
2
|
+
// swift-compiler-version: Apple Swift version 6.1.2 effective-5.10 (swiftlang-6.1.2.1.2 clang-1700.0.13.5)
|
|
3
|
+
// swift-module-flags: -target arm64-apple-ios13.5 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -enable-experimental-feature DebugDescriptionMacro -enable-bare-slash-regex -module-name KeyWordDetection
|
|
4
|
+
// swift-module-flags-ignorable: -no-verify-emitted-module-interface -interface-compiler-version 6.1.2
|
|
5
|
+
import AVFAudio
|
|
6
|
+
import AVFoundation
|
|
7
|
+
import Accelerate
|
|
8
|
+
import AudioToolbox
|
|
9
|
+
import CommonCrypto
|
|
10
|
+
import Foundation
|
|
11
|
+
@_exported import KeyWordDetection
|
|
12
|
+
import Swift
|
|
13
|
+
import _Concurrency
|
|
14
|
+
import _StringProcessing
|
|
15
|
+
import _SwiftConcurrencyShims
|
|
16
|
+
import os.log
|
|
17
|
+
import onnxruntime_objc
|
|
18
|
+
import os
|
|
19
|
+
public class AVAudioWrapperBufferCE {
|
|
20
|
+
public init(size: Swift.Int)
|
|
21
|
+
public func write(samples: [Swift.Float])
|
|
22
|
+
public func read(count: Swift.Int) -> [Swift.Float]
|
|
23
|
+
public func availableSamples() -> Swift.Int
|
|
24
|
+
@objc deinit
|
|
25
|
+
}
|
|
26
|
+
public typealias AVAudioWrapperFrameCallback = ([Swift.Float]) -> Swift.Void
|
|
27
|
+
public class AVAudioWrapperFrameListener {
|
|
28
|
+
public init(_ callback: @escaping KeyWordDetection.AVAudioWrapperFrameCallback)
|
|
29
|
+
public func onFrame(_ frame: [Swift.Float])
|
|
30
|
+
@objc deinit
|
|
31
|
+
}
|
|
32
|
+
@_hasMissingDesignatedInitializers public class AVAudioWrapperCE {
|
|
33
|
+
public static let instance: KeyWordDetection.AVAudioWrapperCE
|
|
34
|
+
public var isRecording: Swift.Bool {
|
|
35
|
+
get
|
|
36
|
+
}
|
|
37
|
+
public var frameLength: Swift.UInt32? {
|
|
38
|
+
get
|
|
39
|
+
}
|
|
40
|
+
public var sampleRate: Swift.UInt32? {
|
|
41
|
+
get
|
|
42
|
+
}
|
|
43
|
+
public var numFrameListeners: Swift.Int {
|
|
44
|
+
get
|
|
45
|
+
}
|
|
46
|
+
public static var hasRecordAudioPermission: Swift.Bool {
|
|
47
|
+
get
|
|
48
|
+
}
|
|
49
|
+
public static func requestRecordAudioPermission(_ response: @escaping (Swift.Bool) -> Swift.Void)
|
|
50
|
+
public func addFrameListener(_ listener: KeyWordDetection.AVAudioWrapperFrameListener)
|
|
51
|
+
public func removeFrameListener(_ listener: KeyWordDetection.AVAudioWrapperFrameListener)
|
|
52
|
+
public func clearFrameListeners()
|
|
53
|
+
public func setSessionOptions(sessionOptions: AVFAudio.AVAudioSession.CategoryOptions)
|
|
54
|
+
public func start(frameLength: Swift.UInt32, sampleRate: Swift.UInt32, setActive: Swift.Bool = true, duckOthers: Swift.Bool = false, mixWithOthers: Swift.Bool = true, defaultToSpeaker: Swift.Bool = true)
|
|
55
|
+
public func stop() throws
|
|
56
|
+
@objc deinit
|
|
57
|
+
}
|
|
58
|
+
public class AVAudioWrapperBuffer {
|
|
59
|
+
public init(size: Swift.Int)
|
|
60
|
+
public func write(samples: [Swift.Float]) -> Swift.Int16
|
|
61
|
+
public func read(count: Swift.Int) -> [Swift.Float]
|
|
62
|
+
public func availableSamples() -> Swift.Int
|
|
63
|
+
@objc deinit
|
|
64
|
+
}
|
|
65
|
+
public class AVAudioWrapper {
|
|
66
|
+
public static let instance: KeyWordDetection.AVAudioWrapper
|
|
67
|
+
public var isRecording: Swift.Bool {
|
|
68
|
+
get
|
|
69
|
+
}
|
|
70
|
+
public var frameLength: Swift.UInt32? {
|
|
71
|
+
get
|
|
72
|
+
}
|
|
73
|
+
public var sampleRate: Swift.UInt32? {
|
|
74
|
+
get
|
|
75
|
+
}
|
|
76
|
+
public var numFrameListeners: Swift.Int {
|
|
77
|
+
get
|
|
78
|
+
}
|
|
79
|
+
public func setSessionOptions(sessionOptions: AVFAudio.AVAudioSession.CategoryOptions)
|
|
80
|
+
public init()
|
|
81
|
+
public static var hasRecordAudioPermission: Swift.Bool {
|
|
82
|
+
get
|
|
83
|
+
}
|
|
84
|
+
public static func requestRecordAudioPermission(_ response: @escaping (Swift.Bool) -> Swift.Void)
|
|
85
|
+
public func addFrameListener(_ listener: KeyWordDetection.AVAudioWrapperFrameListener)
|
|
86
|
+
public func addFrameListeners(_ listeners: [KeyWordDetection.AVAudioWrapperFrameListener])
|
|
87
|
+
public func removeFrameListener(_ listener: KeyWordDetection.AVAudioWrapperFrameListener)
|
|
88
|
+
public func removeFrameListeners(_ listeners: [KeyWordDetection.AVAudioWrapperFrameListener])
|
|
89
|
+
public func clearFrameListeners()
|
|
90
|
+
public func startAfterUnDucking()
|
|
91
|
+
public func start(frameLength: Swift.UInt32, sampleRate: Swift.UInt32, setActive: Swift.Bool = true, duckOthers: Swift.Bool = false, mixWithOthers: Swift.Bool = true, defaultToSpeaker: Swift.Bool = true)
|
|
92
|
+
public func stop() throws
|
|
93
|
+
@objc deinit
|
|
94
|
+
}
|
|
95
|
+
@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objc public class GlobalVariables : ObjectiveC.NSObject {
|
|
96
|
+
@objc public static let shared: KeyWordDetection.GlobalVariables
|
|
97
|
+
@objc public var keyWordsDetectionInstance: KeyWordDetection.KeyWordsDetection?
|
|
98
|
+
@objc public var modelName: Swift.String?
|
|
99
|
+
@objc public var threshold: Swift.Float
|
|
100
|
+
@objc public var bufferCnt: Swift.Int
|
|
101
|
+
@objc deinit
|
|
102
|
+
}
|
|
103
|
+
@objc public protocol KeywordDetectionRNDelegate {
|
|
104
|
+
@objc func KeywordDetectionDidDetectEvent(_ eventInfo: [Swift.String : Any])
|
|
105
|
+
}
|
|
106
|
+
@objc public class KeyWordsDetection : ObjectiveC.NSObject {
|
|
107
|
+
@objc weak public var delegate: (any KeyWordDetection.KeywordDetectionRNDelegate)?
|
|
108
|
+
public var eventSink: (([Swift.String : Any]) -> Swift.Void)?
|
|
109
|
+
@objc convenience public init(modelPath: Swift.String, threshold: Swift.Float, bufferCnt: Swift.Int) throws
|
|
110
|
+
@objc convenience public init(modelPaths: [Swift.String], thresholds: [Foundation.NSNumber], bufferCnts: [Foundation.NSNumber], msBetweenCallback: [Foundation.NSNumber]) throws
|
|
111
|
+
@objc public init(modelPaths: [Swift.String], thresholds: [Swift.Float], bufferCnts: [Swift.Int], msBetweenCallback: [Swift.Int64], cancelEcho: Swift.Bool = false) throws
|
|
112
|
+
@objc public func replaceKeywordDetectionModel(modelPath: Swift.String, threshold: Swift.Float, bufferCnt: Swift.Int) throws
|
|
113
|
+
@objc public func replaceKeywordDetectionModels(modelPaths: [Swift.String], thresholds: [Swift.Float], bufferCnts: [Swift.Int], msBetweenCallback: [Swift.Int64]) throws
|
|
114
|
+
@objc public func getKeywordDetectionModel() -> Swift.String
|
|
115
|
+
@objc public func getRecordingWav() -> Swift.String
|
|
116
|
+
@objc public func setKeywordDetectionLicense(licenseKey: Swift.String) -> Swift.Bool
|
|
117
|
+
@objc public func setLicense(licenseKey: Swift.String) -> Swift.Bool
|
|
118
|
+
@objc public func callBack(frame: [Swift.Float])
|
|
119
|
+
@objc public func startListening(setActive: Swift.Bool = true, duckOthers: Swift.Bool = false, mixWithOthers: Swift.Bool = true, defaultToSpeaker: Swift.Bool = true) -> Swift.Bool
|
|
120
|
+
@objc public func stopListening()
|
|
121
|
+
@objc public func getVoiceProps() -> [Swift.String : Any]
|
|
122
|
+
@objc public func startSilentListening() -> Swift.Bool
|
|
123
|
+
@objc public func startVADListening() -> Swift.Bool
|
|
124
|
+
@objc public func setVADParams(threshold: Swift.Float, msWindow: Swift.Int) throws
|
|
125
|
+
@objc public func stopSilentListening()
|
|
126
|
+
@objc public func stopVADListening()
|
|
127
|
+
@objc deinit
|
|
128
|
+
}
|
|
129
|
+
public typealias EngineSchedule = (_ url: Foundation.URL, _ onDone: @escaping () -> Swift.Void) -> Swift.Bool
|
|
130
|
+
public enum AudioPlaybackHook {
|
|
131
|
+
public static var engineScheduleFile: KeyWordDetection.EngineSchedule?
|
|
132
|
+
}
|
|
133
|
+
@_inheritsConvenienceInitializers @objc public class AudioSessionAndDuckingManager : ObjectiveC.NSObject {
|
|
134
|
+
@objc public static let shared: KeyWordDetection.AudioSessionAndDuckingManager
|
|
135
|
+
@objc public func initAudioSessAndDuckManage()
|
|
136
|
+
@objc public func disableDucking()
|
|
137
|
+
@objc public func _disableDucking()
|
|
138
|
+
@objc public func enableAggressiveDucking()
|
|
139
|
+
@objc public func _enableAggressiveDucking()
|
|
140
|
+
@objc public func enableAggressiveDuckingWorksMaxSilencing()
|
|
141
|
+
@objc public func enableAggressiveDuckingWorksOnSecondTime()
|
|
142
|
+
@objc public func disableDuckingWorks()
|
|
143
|
+
@objc public func disableDuckingDidNotUnDuck()
|
|
144
|
+
@objc public func disableDuckingOrg()
|
|
145
|
+
@objc public func restartListeningAfterDucking()
|
|
146
|
+
@objc public func disableDuckingAndCleanup()
|
|
147
|
+
@objc public func activateSessionForDucking()
|
|
148
|
+
@objc public func playInstructionSound(_ soundURL: Foundation.URL)
|
|
149
|
+
@objc public func speakInstruction(_ text: Swift.String)
|
|
150
|
+
@objc public func deactivateSession()
|
|
151
|
+
@objc override dynamic public init()
|
|
152
|
+
@objc deinit
|
|
153
|
+
}
|
|
154
|
+
@_inheritsConvenienceInitializers @objc public class LicenseManager : ObjectiveC.NSObject {
|
|
155
|
+
@objc override dynamic public init()
|
|
156
|
+
@objc deinit
|
|
157
|
+
}
|