react-native-wakeword 1.1.46 → 1.1.47
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/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/ios/KeyWordRNBridge/KeyWordDetection.xcframework/Info.plist +5 -5
- package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64/KeyWordDetection.framework/Headers/KeyWordDetection-Swift.h +6 -19
- 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 +484 -303
- package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64/KeyWordDetection.framework/Modules/KeyWordDetection.swiftmodule/arm64-apple-ios.private.swiftinterface +30 -18
- 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 +30 -18
- package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/Headers/KeyWordDetection-Swift.h +12 -38
- 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 +484 -303
- package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/Modules/KeyWordDetection.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +30 -18
- 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 +30 -18
- package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/Modules/KeyWordDetection.swiftmodule/x86_64-apple-ios-simulator.abi.json +484 -303
- package/ios/KeyWordRNBridge/KeyWordDetection.xcframework/ios-arm64_x86_64-simulator/KeyWordDetection.framework/Modules/KeyWordDetection.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +30 -18
- 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 +30 -18
- 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.mm +24 -2
- package/package.json +1 -1
- package/wakewords/KeyWordRNBridge.d.ts +1 -0
- package/wakewords/KeyWordRNBridge.js +7 -0
- package/wakewords/audioRoutingConfig.d.ts +17 -0
- package/wakewords/audioRoutingConfig.ts +28 -0
- package/wakewords/index.d.ts +5 -1
- package/wakewords/index.js +2 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// swift-interface-format-version: 1.0
|
|
2
|
-
// swift-compiler-version: Apple Swift version 6.1
|
|
2
|
+
// swift-compiler-version: Apple Swift version 6.2.1 effective-5.10 (swiftlang-6.2.1.4.8 clang-1700.4.4.1)
|
|
3
3
|
// swift-module-flags: -target x86_64-apple-ios13.5-simulator -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
|
|
4
|
+
// swift-module-flags-ignorable: -no-verify-emitted-module-interface -formal-cxx-interoperability-mode=off -interface-compiler-version 6.2.1
|
|
5
5
|
import AVFAudio
|
|
6
6
|
import AVFoundation
|
|
7
7
|
import Accelerate
|
|
@@ -10,6 +10,7 @@ import CommonCrypto
|
|
|
10
10
|
import Foundation
|
|
11
11
|
@_exported import KeyWordDetection
|
|
12
12
|
import Swift
|
|
13
|
+
import UIKit
|
|
13
14
|
import _Concurrency
|
|
14
15
|
import _StringProcessing
|
|
15
16
|
import _SwiftConcurrencyShims
|
|
@@ -34,12 +35,16 @@ public class AVAudioWrapperFrameListener {
|
|
|
34
35
|
public var isRecording: Swift.Bool {
|
|
35
36
|
get
|
|
36
37
|
}
|
|
38
|
+
#if compiler(>=5.3) && $NonescapableTypes
|
|
37
39
|
public var frameLength: Swift.UInt32? {
|
|
38
40
|
get
|
|
39
41
|
}
|
|
42
|
+
#endif
|
|
43
|
+
#if compiler(>=5.3) && $NonescapableTypes
|
|
40
44
|
public var sampleRate: Swift.UInt32? {
|
|
41
45
|
get
|
|
42
46
|
}
|
|
47
|
+
#endif
|
|
43
48
|
public var numFrameListeners: Swift.Int {
|
|
44
49
|
get
|
|
45
50
|
}
|
|
@@ -51,10 +56,17 @@ public class AVAudioWrapperFrameListener {
|
|
|
51
56
|
public func removeFrameListener(_ listener: KeyWordDetection.AVAudioWrapperFrameListener)
|
|
52
57
|
public func clearFrameListeners()
|
|
53
58
|
public func setSessionOptions(sessionOptions: AVFAudio.AVAudioSession.CategoryOptions)
|
|
54
|
-
public func start(frameLength: Swift.UInt32, sampleRate: Swift.UInt32,
|
|
59
|
+
public func start(frameLength: Swift.UInt32, sampleRate: Swift.UInt32, noExternalActivation: Swift.Bool = true, duckOthers: Swift.Bool = false, mixWithOthers: Swift.Bool = true, defaultToSpeaker: Swift.Bool = true)
|
|
55
60
|
public func stop() throws
|
|
56
61
|
@objc deinit
|
|
57
62
|
}
|
|
63
|
+
@_hasMissingDesignatedInitializers final public class AppStateTracker {
|
|
64
|
+
public static let shared: KeyWordDetection.AppStateTracker
|
|
65
|
+
final public var isInBackground: Swift.Bool {
|
|
66
|
+
get
|
|
67
|
+
}
|
|
68
|
+
@objc deinit
|
|
69
|
+
}
|
|
58
70
|
public class AVAudioWrapperBuffer {
|
|
59
71
|
public init(size: Swift.Int)
|
|
60
72
|
public func write(samples: [Swift.Float]) -> Swift.Int16
|
|
@@ -64,20 +76,26 @@ public class AVAudioWrapperBuffer {
|
|
|
64
76
|
}
|
|
65
77
|
public class AVAudioWrapper {
|
|
66
78
|
public static let instance: KeyWordDetection.AVAudioWrapper
|
|
79
|
+
public var preferOnDeviceMicInCarPlay: Swift.Bool
|
|
67
80
|
public var isRecording: Swift.Bool {
|
|
68
81
|
get
|
|
69
82
|
}
|
|
83
|
+
#if compiler(>=5.3) && $NonescapableTypes
|
|
70
84
|
public var frameLength: Swift.UInt32? {
|
|
71
85
|
get
|
|
72
86
|
}
|
|
87
|
+
#endif
|
|
88
|
+
#if compiler(>=5.3) && $NonescapableTypes
|
|
73
89
|
public var sampleRate: Swift.UInt32? {
|
|
74
90
|
get
|
|
75
91
|
}
|
|
92
|
+
#endif
|
|
76
93
|
public var numFrameListeners: Swift.Int {
|
|
77
94
|
get
|
|
78
95
|
}
|
|
79
96
|
public func setSessionOptions(sessionOptions: AVFAudio.AVAudioSession.CategoryOptions)
|
|
80
97
|
public init()
|
|
98
|
+
@objc deinit
|
|
81
99
|
public static var hasRecordAudioPermission: Swift.Bool {
|
|
82
100
|
get
|
|
83
101
|
}
|
|
@@ -88,9 +106,9 @@ public class AVAudioWrapper {
|
|
|
88
106
|
public func removeFrameListeners(_ listeners: [KeyWordDetection.AVAudioWrapperFrameListener])
|
|
89
107
|
public func clearFrameListeners()
|
|
90
108
|
public func startAfterUnDucking()
|
|
91
|
-
public func start(frameLength: Swift.UInt32, sampleRate: Swift.UInt32,
|
|
109
|
+
public func start(frameLength: Swift.UInt32, sampleRate: Swift.UInt32, noExternalActivation: Swift.Bool = true, duckOthers: Swift.Bool = false, mixWithOthers: Swift.Bool = true, defaultToSpeaker: Swift.Bool = true)
|
|
110
|
+
public func start_org(frameLength: Swift.UInt32, sampleRate: Swift.UInt32, noExternalActivation: Swift.Bool = true, duckOthers: Swift.Bool = false, mixWithOthers: Swift.Bool = true, defaultToSpeaker: Swift.Bool = true)
|
|
92
111
|
public func stop() throws
|
|
93
|
-
@objc deinit
|
|
94
112
|
}
|
|
95
113
|
@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objc public class GlobalVariables : ObjectiveC.NSObject {
|
|
96
114
|
@objc public static let shared: KeyWordDetection.GlobalVariables
|
|
@@ -116,7 +134,7 @@ public class AVAudioWrapper {
|
|
|
116
134
|
@objc public func setKeywordDetectionLicense(licenseKey: Swift.String) -> Swift.Bool
|
|
117
135
|
@objc public func setLicense(licenseKey: Swift.String) -> Swift.Bool
|
|
118
136
|
@objc public func callBack(frame: [Swift.Float])
|
|
119
|
-
@objc public func startListening(
|
|
137
|
+
@objc public func startListening(noExternalActivation: Swift.Bool = true, duckOthers: Swift.Bool = false, mixWithOthers: Swift.Bool = true, defaultToSpeaker: Swift.Bool = true) -> Swift.Bool
|
|
120
138
|
@objc public func stopListening()
|
|
121
139
|
@objc public func getVoiceProps() -> [Swift.String : Any]
|
|
122
140
|
@objc public func startSilentListening() -> Swift.Bool
|
|
@@ -132,22 +150,16 @@ public enum AudioPlaybackHook {
|
|
|
132
150
|
}
|
|
133
151
|
@_inheritsConvenienceInitializers @objc public class AudioSessionAndDuckingManager : ObjectiveC.NSObject {
|
|
134
152
|
@objc public static let shared: KeyWordDetection.AudioSessionAndDuckingManager
|
|
153
|
+
#if compiler(>=5.3) && $NonescapableTypes
|
|
154
|
+
@objc public func getWakewordAudioRoutingConfigJSONString() -> Swift.String?
|
|
155
|
+
#endif
|
|
156
|
+
@objc public func setWakewordAudioRoutingConfigFromJSONString(_ jsonConfig: Swift.String)
|
|
135
157
|
@objc public func initAudioSessAndDuckManage()
|
|
136
|
-
@objc public func
|
|
137
|
-
@objc public func _disableDucking()
|
|
158
|
+
@objc public func enableRadioInCar()
|
|
138
159
|
@objc public func enableAggressiveDucking()
|
|
139
|
-
@objc public func
|
|
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()
|
|
160
|
+
@objc public func disableDucking()
|
|
145
161
|
@objc public func restartListeningAfterDucking()
|
|
146
162
|
@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
163
|
@objc override dynamic public init()
|
|
152
164
|
@objc deinit
|
|
153
165
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// swift-interface-format-version: 1.0
|
|
2
|
-
// swift-compiler-version: Apple Swift version 6.1
|
|
2
|
+
// swift-compiler-version: Apple Swift version 6.2.1 effective-5.10 (swiftlang-6.2.1.4.8 clang-1700.4.4.1)
|
|
3
3
|
// swift-module-flags: -target x86_64-apple-ios13.5-simulator -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
|
|
4
|
+
// swift-module-flags-ignorable: -no-verify-emitted-module-interface -formal-cxx-interoperability-mode=off -interface-compiler-version 6.2.1
|
|
5
5
|
import AVFAudio
|
|
6
6
|
import AVFoundation
|
|
7
7
|
import Accelerate
|
|
@@ -10,6 +10,7 @@ import CommonCrypto
|
|
|
10
10
|
import Foundation
|
|
11
11
|
@_exported import KeyWordDetection
|
|
12
12
|
import Swift
|
|
13
|
+
import UIKit
|
|
13
14
|
import _Concurrency
|
|
14
15
|
import _StringProcessing
|
|
15
16
|
import _SwiftConcurrencyShims
|
|
@@ -34,12 +35,16 @@ public class AVAudioWrapperFrameListener {
|
|
|
34
35
|
public var isRecording: Swift.Bool {
|
|
35
36
|
get
|
|
36
37
|
}
|
|
38
|
+
#if compiler(>=5.3) && $NonescapableTypes
|
|
37
39
|
public var frameLength: Swift.UInt32? {
|
|
38
40
|
get
|
|
39
41
|
}
|
|
42
|
+
#endif
|
|
43
|
+
#if compiler(>=5.3) && $NonescapableTypes
|
|
40
44
|
public var sampleRate: Swift.UInt32? {
|
|
41
45
|
get
|
|
42
46
|
}
|
|
47
|
+
#endif
|
|
43
48
|
public var numFrameListeners: Swift.Int {
|
|
44
49
|
get
|
|
45
50
|
}
|
|
@@ -51,10 +56,17 @@ public class AVAudioWrapperFrameListener {
|
|
|
51
56
|
public func removeFrameListener(_ listener: KeyWordDetection.AVAudioWrapperFrameListener)
|
|
52
57
|
public func clearFrameListeners()
|
|
53
58
|
public func setSessionOptions(sessionOptions: AVFAudio.AVAudioSession.CategoryOptions)
|
|
54
|
-
public func start(frameLength: Swift.UInt32, sampleRate: Swift.UInt32,
|
|
59
|
+
public func start(frameLength: Swift.UInt32, sampleRate: Swift.UInt32, noExternalActivation: Swift.Bool = true, duckOthers: Swift.Bool = false, mixWithOthers: Swift.Bool = true, defaultToSpeaker: Swift.Bool = true)
|
|
55
60
|
public func stop() throws
|
|
56
61
|
@objc deinit
|
|
57
62
|
}
|
|
63
|
+
@_hasMissingDesignatedInitializers final public class AppStateTracker {
|
|
64
|
+
public static let shared: KeyWordDetection.AppStateTracker
|
|
65
|
+
final public var isInBackground: Swift.Bool {
|
|
66
|
+
get
|
|
67
|
+
}
|
|
68
|
+
@objc deinit
|
|
69
|
+
}
|
|
58
70
|
public class AVAudioWrapperBuffer {
|
|
59
71
|
public init(size: Swift.Int)
|
|
60
72
|
public func write(samples: [Swift.Float]) -> Swift.Int16
|
|
@@ -64,20 +76,26 @@ public class AVAudioWrapperBuffer {
|
|
|
64
76
|
}
|
|
65
77
|
public class AVAudioWrapper {
|
|
66
78
|
public static let instance: KeyWordDetection.AVAudioWrapper
|
|
79
|
+
public var preferOnDeviceMicInCarPlay: Swift.Bool
|
|
67
80
|
public var isRecording: Swift.Bool {
|
|
68
81
|
get
|
|
69
82
|
}
|
|
83
|
+
#if compiler(>=5.3) && $NonescapableTypes
|
|
70
84
|
public var frameLength: Swift.UInt32? {
|
|
71
85
|
get
|
|
72
86
|
}
|
|
87
|
+
#endif
|
|
88
|
+
#if compiler(>=5.3) && $NonescapableTypes
|
|
73
89
|
public var sampleRate: Swift.UInt32? {
|
|
74
90
|
get
|
|
75
91
|
}
|
|
92
|
+
#endif
|
|
76
93
|
public var numFrameListeners: Swift.Int {
|
|
77
94
|
get
|
|
78
95
|
}
|
|
79
96
|
public func setSessionOptions(sessionOptions: AVFAudio.AVAudioSession.CategoryOptions)
|
|
80
97
|
public init()
|
|
98
|
+
@objc deinit
|
|
81
99
|
public static var hasRecordAudioPermission: Swift.Bool {
|
|
82
100
|
get
|
|
83
101
|
}
|
|
@@ -88,9 +106,9 @@ public class AVAudioWrapper {
|
|
|
88
106
|
public func removeFrameListeners(_ listeners: [KeyWordDetection.AVAudioWrapperFrameListener])
|
|
89
107
|
public func clearFrameListeners()
|
|
90
108
|
public func startAfterUnDucking()
|
|
91
|
-
public func start(frameLength: Swift.UInt32, sampleRate: Swift.UInt32,
|
|
109
|
+
public func start(frameLength: Swift.UInt32, sampleRate: Swift.UInt32, noExternalActivation: Swift.Bool = true, duckOthers: Swift.Bool = false, mixWithOthers: Swift.Bool = true, defaultToSpeaker: Swift.Bool = true)
|
|
110
|
+
public func start_org(frameLength: Swift.UInt32, sampleRate: Swift.UInt32, noExternalActivation: Swift.Bool = true, duckOthers: Swift.Bool = false, mixWithOthers: Swift.Bool = true, defaultToSpeaker: Swift.Bool = true)
|
|
92
111
|
public func stop() throws
|
|
93
|
-
@objc deinit
|
|
94
112
|
}
|
|
95
113
|
@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objc public class GlobalVariables : ObjectiveC.NSObject {
|
|
96
114
|
@objc public static let shared: KeyWordDetection.GlobalVariables
|
|
@@ -116,7 +134,7 @@ public class AVAudioWrapper {
|
|
|
116
134
|
@objc public func setKeywordDetectionLicense(licenseKey: Swift.String) -> Swift.Bool
|
|
117
135
|
@objc public func setLicense(licenseKey: Swift.String) -> Swift.Bool
|
|
118
136
|
@objc public func callBack(frame: [Swift.Float])
|
|
119
|
-
@objc public func startListening(
|
|
137
|
+
@objc public func startListening(noExternalActivation: Swift.Bool = true, duckOthers: Swift.Bool = false, mixWithOthers: Swift.Bool = true, defaultToSpeaker: Swift.Bool = true) -> Swift.Bool
|
|
120
138
|
@objc public func stopListening()
|
|
121
139
|
@objc public func getVoiceProps() -> [Swift.String : Any]
|
|
122
140
|
@objc public func startSilentListening() -> Swift.Bool
|
|
@@ -132,22 +150,16 @@ public enum AudioPlaybackHook {
|
|
|
132
150
|
}
|
|
133
151
|
@_inheritsConvenienceInitializers @objc public class AudioSessionAndDuckingManager : ObjectiveC.NSObject {
|
|
134
152
|
@objc public static let shared: KeyWordDetection.AudioSessionAndDuckingManager
|
|
153
|
+
#if compiler(>=5.3) && $NonescapableTypes
|
|
154
|
+
@objc public func getWakewordAudioRoutingConfigJSONString() -> Swift.String?
|
|
155
|
+
#endif
|
|
156
|
+
@objc public func setWakewordAudioRoutingConfigFromJSONString(_ jsonConfig: Swift.String)
|
|
135
157
|
@objc public func initAudioSessAndDuckManage()
|
|
136
|
-
@objc public func
|
|
137
|
-
@objc public func _disableDucking()
|
|
158
|
+
@objc public func enableRadioInCar()
|
|
138
159
|
@objc public func enableAggressiveDucking()
|
|
139
|
-
@objc public func
|
|
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()
|
|
160
|
+
@objc public func disableDucking()
|
|
145
161
|
@objc public func restartListeningAfterDucking()
|
|
146
162
|
@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
163
|
@objc override dynamic public init()
|
|
152
164
|
@objc deinit
|
|
153
165
|
}
|
|
Binary file
|
|
Binary file
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<dict>
|
|
7
7
|
<key>Headers/KeyWordDetection-Swift.h</key>
|
|
8
8
|
<data>
|
|
9
|
-
|
|
9
|
+
Oa3KcGWRUbncdE0wCtB35vhkqMo=
|
|
10
10
|
</data>
|
|
11
11
|
<key>Headers/KeyWordDetection.h</key>
|
|
12
12
|
<data>
|
|
@@ -14,47 +14,47 @@
|
|
|
14
14
|
</data>
|
|
15
15
|
<key>Info.plist</key>
|
|
16
16
|
<data>
|
|
17
|
-
|
|
17
|
+
VSFBryOpczZuR/EStQ8IP/6syuI=
|
|
18
18
|
</data>
|
|
19
19
|
<key>Modules/KeyWordDetection.swiftmodule/arm64-apple-ios-simulator.abi.json</key>
|
|
20
20
|
<data>
|
|
21
|
-
|
|
21
|
+
FqvQSfizgqTnsQgprBaRFHe3ku8=
|
|
22
22
|
</data>
|
|
23
23
|
<key>Modules/KeyWordDetection.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
|
|
24
24
|
<data>
|
|
25
|
-
|
|
25
|
+
Yom13ABKbOdgzOYV0iJxA2Ya+2M=
|
|
26
26
|
</data>
|
|
27
27
|
<key>Modules/KeyWordDetection.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
|
|
28
28
|
<data>
|
|
29
|
-
|
|
29
|
+
8Z1jSyircaHDnUT2EQNKzwHnu8g=
|
|
30
30
|
</data>
|
|
31
31
|
<key>Modules/KeyWordDetection.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
|
|
32
32
|
<data>
|
|
33
|
-
|
|
33
|
+
Yom13ABKbOdgzOYV0iJxA2Ya+2M=
|
|
34
34
|
</data>
|
|
35
35
|
<key>Modules/KeyWordDetection.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key>
|
|
36
36
|
<data>
|
|
37
|
-
|
|
37
|
+
45LmXDGantaR13+l9xkQcwAU+g4=
|
|
38
38
|
</data>
|
|
39
39
|
<key>Modules/KeyWordDetection.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
|
|
40
40
|
<data>
|
|
41
|
-
|
|
41
|
+
FqvQSfizgqTnsQgprBaRFHe3ku8=
|
|
42
42
|
</data>
|
|
43
43
|
<key>Modules/KeyWordDetection.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
|
|
44
44
|
<data>
|
|
45
|
-
|
|
45
|
+
yzPNafythHDK2wrCQaIlmXZkqQs=
|
|
46
46
|
</data>
|
|
47
47
|
<key>Modules/KeyWordDetection.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
|
|
48
48
|
<data>
|
|
49
|
-
|
|
49
|
+
yVOL5u0KyODlDuQHZnG5sTEWOMk=
|
|
50
50
|
</data>
|
|
51
51
|
<key>Modules/KeyWordDetection.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key>
|
|
52
52
|
<data>
|
|
53
|
-
|
|
53
|
+
yzPNafythHDK2wrCQaIlmXZkqQs=
|
|
54
54
|
</data>
|
|
55
55
|
<key>Modules/KeyWordDetection.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key>
|
|
56
56
|
<data>
|
|
57
|
-
|
|
57
|
+
g6ov3CbXr38CDsq/yoXXvOzrHkk=
|
|
58
58
|
</data>
|
|
59
59
|
<key>Modules/module.modulemap</key>
|
|
60
60
|
<data>
|
|
@@ -67,11 +67,11 @@
|
|
|
67
67
|
<dict>
|
|
68
68
|
<key>hash</key>
|
|
69
69
|
<data>
|
|
70
|
-
|
|
70
|
+
Oa3KcGWRUbncdE0wCtB35vhkqMo=
|
|
71
71
|
</data>
|
|
72
72
|
<key>hash2</key>
|
|
73
73
|
<data>
|
|
74
|
-
|
|
74
|
+
sVhrRlQGYMK4Nn2EzPHHF0xB2QzhoSUl6wIqs9Zr1bM=
|
|
75
75
|
</data>
|
|
76
76
|
</dict>
|
|
77
77
|
<key>Headers/KeyWordDetection.h</key>
|
|
@@ -89,110 +89,110 @@
|
|
|
89
89
|
<dict>
|
|
90
90
|
<key>hash</key>
|
|
91
91
|
<data>
|
|
92
|
-
|
|
92
|
+
FqvQSfizgqTnsQgprBaRFHe3ku8=
|
|
93
93
|
</data>
|
|
94
94
|
<key>hash2</key>
|
|
95
95
|
<data>
|
|
96
|
-
|
|
96
|
+
QVngl2u/OaP2fT3KELGAd22TZqLzNm/Vayutm6WvNM0=
|
|
97
97
|
</data>
|
|
98
98
|
</dict>
|
|
99
99
|
<key>Modules/KeyWordDetection.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
|
|
100
100
|
<dict>
|
|
101
101
|
<key>hash</key>
|
|
102
102
|
<data>
|
|
103
|
-
|
|
103
|
+
Yom13ABKbOdgzOYV0iJxA2Ya+2M=
|
|
104
104
|
</data>
|
|
105
105
|
<key>hash2</key>
|
|
106
106
|
<data>
|
|
107
|
-
|
|
107
|
+
eIu6O8IlLlI+glpDoltqJn2wH6qmbOBDXTxcNspfZHg=
|
|
108
108
|
</data>
|
|
109
109
|
</dict>
|
|
110
110
|
<key>Modules/KeyWordDetection.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
|
|
111
111
|
<dict>
|
|
112
112
|
<key>hash</key>
|
|
113
113
|
<data>
|
|
114
|
-
|
|
114
|
+
8Z1jSyircaHDnUT2EQNKzwHnu8g=
|
|
115
115
|
</data>
|
|
116
116
|
<key>hash2</key>
|
|
117
117
|
<data>
|
|
118
|
-
|
|
118
|
+
6S8GouNGgqd97HnOPkLBetwOIeVw9IyAzYPmu6Gjcsw=
|
|
119
119
|
</data>
|
|
120
120
|
</dict>
|
|
121
121
|
<key>Modules/KeyWordDetection.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
|
|
122
122
|
<dict>
|
|
123
123
|
<key>hash</key>
|
|
124
124
|
<data>
|
|
125
|
-
|
|
125
|
+
Yom13ABKbOdgzOYV0iJxA2Ya+2M=
|
|
126
126
|
</data>
|
|
127
127
|
<key>hash2</key>
|
|
128
128
|
<data>
|
|
129
|
-
|
|
129
|
+
eIu6O8IlLlI+glpDoltqJn2wH6qmbOBDXTxcNspfZHg=
|
|
130
130
|
</data>
|
|
131
131
|
</dict>
|
|
132
132
|
<key>Modules/KeyWordDetection.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key>
|
|
133
133
|
<dict>
|
|
134
134
|
<key>hash</key>
|
|
135
135
|
<data>
|
|
136
|
-
|
|
136
|
+
45LmXDGantaR13+l9xkQcwAU+g4=
|
|
137
137
|
</data>
|
|
138
138
|
<key>hash2</key>
|
|
139
139
|
<data>
|
|
140
|
-
|
|
140
|
+
uFto0vvdLuXiMYKaDCeDb8FzG8tDz3DkPvRAoJu107c=
|
|
141
141
|
</data>
|
|
142
142
|
</dict>
|
|
143
143
|
<key>Modules/KeyWordDetection.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
|
|
144
144
|
<dict>
|
|
145
145
|
<key>hash</key>
|
|
146
146
|
<data>
|
|
147
|
-
|
|
147
|
+
FqvQSfizgqTnsQgprBaRFHe3ku8=
|
|
148
148
|
</data>
|
|
149
149
|
<key>hash2</key>
|
|
150
150
|
<data>
|
|
151
|
-
|
|
151
|
+
QVngl2u/OaP2fT3KELGAd22TZqLzNm/Vayutm6WvNM0=
|
|
152
152
|
</data>
|
|
153
153
|
</dict>
|
|
154
154
|
<key>Modules/KeyWordDetection.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
|
|
155
155
|
<dict>
|
|
156
156
|
<key>hash</key>
|
|
157
157
|
<data>
|
|
158
|
-
|
|
158
|
+
yzPNafythHDK2wrCQaIlmXZkqQs=
|
|
159
159
|
</data>
|
|
160
160
|
<key>hash2</key>
|
|
161
161
|
<data>
|
|
162
|
-
|
|
162
|
+
f2/AiPpFuILUyZa6Ac23IxvGjK5zMczwVidVngTrCMc=
|
|
163
163
|
</data>
|
|
164
164
|
</dict>
|
|
165
165
|
<key>Modules/KeyWordDetection.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
|
|
166
166
|
<dict>
|
|
167
167
|
<key>hash</key>
|
|
168
168
|
<data>
|
|
169
|
-
|
|
169
|
+
yVOL5u0KyODlDuQHZnG5sTEWOMk=
|
|
170
170
|
</data>
|
|
171
171
|
<key>hash2</key>
|
|
172
172
|
<data>
|
|
173
|
-
|
|
173
|
+
wgwpV7nJoFthbgJeE1KWQZ6ecIsQltTJiIEMoqrj17I=
|
|
174
174
|
</data>
|
|
175
175
|
</dict>
|
|
176
176
|
<key>Modules/KeyWordDetection.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key>
|
|
177
177
|
<dict>
|
|
178
178
|
<key>hash</key>
|
|
179
179
|
<data>
|
|
180
|
-
|
|
180
|
+
yzPNafythHDK2wrCQaIlmXZkqQs=
|
|
181
181
|
</data>
|
|
182
182
|
<key>hash2</key>
|
|
183
183
|
<data>
|
|
184
|
-
|
|
184
|
+
f2/AiPpFuILUyZa6Ac23IxvGjK5zMczwVidVngTrCMc=
|
|
185
185
|
</data>
|
|
186
186
|
</dict>
|
|
187
187
|
<key>Modules/KeyWordDetection.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key>
|
|
188
188
|
<dict>
|
|
189
189
|
<key>hash</key>
|
|
190
190
|
<data>
|
|
191
|
-
|
|
191
|
+
g6ov3CbXr38CDsq/yoXXvOzrHkk=
|
|
192
192
|
</data>
|
|
193
193
|
<key>hash2</key>
|
|
194
194
|
<data>
|
|
195
|
-
|
|
195
|
+
K6m3A+RPtTv7VGj68fATXLiaO9eGIW3czlucH4/dNqY=
|
|
196
196
|
</data>
|
|
197
197
|
</dict>
|
|
198
198
|
<key>Modules/module.modulemap</key>
|
|
@@ -161,6 +161,28 @@ RCT_EXPORT_METHOD(createInstance:(NSString *)instanceId modelName:(NSString *)mo
|
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
163
|
|
|
164
|
+
// NEW: receive global wakeword audio routing config from JS
|
|
165
|
+
RCT_EXPORT_METHOD(setAudioRoutingConfig:(NSString *)jsonConfig
|
|
166
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
|
167
|
+
rejecter:(RCTPromiseRejectBlock)reject)
|
|
168
|
+
{
|
|
169
|
+
@try {
|
|
170
|
+
// Hand off to your audio/session manager (you implement this)
|
|
171
|
+
// e.g. in AudioSessionAndDuckingManager:
|
|
172
|
+
// - (void)setWakewordAudioRoutingConfigFromJSONString:(NSString *)jsonConfig;
|
|
173
|
+
[AudioSessionAndDuckingManager.shared setWakewordAudioRoutingConfigFromJSONString:jsonConfig];
|
|
174
|
+
|
|
175
|
+
NSLog(@"[KeyWordRNBridge] setAudioRoutingConfig JSON = %@", jsonConfig);
|
|
176
|
+
resolve(@"ok");
|
|
177
|
+
}
|
|
178
|
+
@catch (NSException *e) {
|
|
179
|
+
reject(@"AudioRoutingConfigError",
|
|
180
|
+
[NSString stringWithFormat:@"Failed to set audio routing config: %@", e.reason],
|
|
181
|
+
nil);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
|
|
164
186
|
RCT_EXPORT_METHOD(disableDucking:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)
|
|
165
187
|
{
|
|
166
188
|
[AudioSessionAndDuckingManager.shared disableDucking];
|
|
@@ -224,7 +246,7 @@ RCT_EXPORT_METHOD(replaceKeywordDetectionModel:(NSString *)instanceId modelName:
|
|
|
224
246
|
|
|
225
247
|
RCT_EXPORT_METHOD(startKeywordDetection:(NSString *)instanceId
|
|
226
248
|
threshold:(float)threshold
|
|
227
|
-
|
|
249
|
+
noExternalActivation:(BOOL)noExternalActivation
|
|
228
250
|
duckOthers:(BOOL)duckOthers
|
|
229
251
|
mixWithOthers:(BOOL)mixWithOthers
|
|
230
252
|
defaultToSpeaker:(BOOL)defaultToSpeaker
|
|
@@ -234,7 +256,7 @@ RCT_EXPORT_METHOD(startKeywordDetection:(NSString *)instanceId
|
|
|
234
256
|
KeyWordsDetectionWrapper *wrapper = self.instances[instanceId];
|
|
235
257
|
KeyWordsDetection *instance = wrapper.keyWordsDetection;
|
|
236
258
|
if (instance) {
|
|
237
|
-
BOOL success = [instance
|
|
259
|
+
BOOL success = [instance startListeningWithNoExternalActivation:noExternalActivation
|
|
238
260
|
duckOthers:duckOthers
|
|
239
261
|
mixWithOthers:mixWithOthers
|
|
240
262
|
defaultToSpeaker:defaultToSpeaker];
|
package/package.json
CHANGED
|
@@ -35,3 +35,4 @@ export function disableDucking(): Promise<void>;
|
|
|
35
35
|
export function restartListeningAfterDucking(): Promise<void>;
|
|
36
36
|
export function initAudioSessAndDuckManage(): Promise<void>;
|
|
37
37
|
export function disableDuckingAndCleanup(): Promise<void>;
|
|
38
|
+
export function setWakewordAudioRoutingConfig(config: any): Promise<any>;
|
|
@@ -219,3 +219,10 @@ export const disableDuckingAndCleanup = async () => {
|
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
221
|
|
|
222
|
+
// NEW: global audio routing config setter (per package, not per instance)
|
|
223
|
+
export const setWakewordAudioRoutingConfig = async (config) => {
|
|
224
|
+
if (Platform.OS === 'ios') {
|
|
225
|
+
// Native: implement KeyWordRNBridge.setAudioRoutingConfig(jsonString)
|
|
226
|
+
return KeyWordRNBridge.setAudioRoutingConfig(JSON.stringify(config));
|
|
227
|
+
}
|
|
228
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type RouteConfigEntry = {
|
|
2
|
+
category: 'playAndRecord' | 'record' | 'soloAmbient' | 'ambient' | 'playback';
|
|
3
|
+
mode: 'default' | 'measurement' | 'voiceChat' | 'videoRecording' | 'gameChat';
|
|
4
|
+
options: ('mixWithOthers' | 'duckOthers' | 'allowBluetooth' | 'allowBluetoothA2DP' | 'allowAirPlay' | 'defaultToSpeaker' | 'overrideMutedMicrophoneInterruption')[];
|
|
5
|
+
preferredInput: 'none' | 'builtInMic';
|
|
6
|
+
};
|
|
7
|
+
export type AudioRoutingConfig = {
|
|
8
|
+
default: RouteConfigEntry;
|
|
9
|
+
byOutputPort: {
|
|
10
|
+
carAudio?: RouteConfigEntry;
|
|
11
|
+
builtInReceiver?: RouteConfigEntry;
|
|
12
|
+
builtInSpeaker?: RouteConfigEntry;
|
|
13
|
+
bluetoothA2DP?: RouteConfigEntry;
|
|
14
|
+
bluetoothHFP?: RouteConfigEntry;
|
|
15
|
+
headphones?: RouteConfigEntry;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// wakewords/audioRoutingConfig.ts
|
|
2
|
+
export type RouteConfigEntry = {
|
|
3
|
+
category: 'playAndRecord' | 'record' | 'soloAmbient' | 'ambient' | 'playback';
|
|
4
|
+
mode: 'default' | 'measurement' | 'voiceChat' | 'videoRecording' | 'gameChat';
|
|
5
|
+
options: (
|
|
6
|
+
| 'mixWithOthers'
|
|
7
|
+
| 'duckOthers'
|
|
8
|
+
| 'allowBluetooth'
|
|
9
|
+
| 'allowBluetoothA2DP'
|
|
10
|
+
| 'allowAirPlay'
|
|
11
|
+
| 'defaultToSpeaker'
|
|
12
|
+
| 'overrideMutedMicrophoneInterruption'
|
|
13
|
+
)[];
|
|
14
|
+
preferredInput: 'none' | 'builtInMic'; // nil vs phone mic
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export type AudioRoutingConfig = {
|
|
18
|
+
default: RouteConfigEntry;
|
|
19
|
+
byOutputPort: {
|
|
20
|
+
carAudio?: RouteConfigEntry; // .carAudio (CarPlay)
|
|
21
|
+
builtInReceiver?: RouteConfigEntry; // .builtInReceiver (earpiece)
|
|
22
|
+
builtInSpeaker?: RouteConfigEntry; // .builtInSpeaker
|
|
23
|
+
bluetoothA2DP?: RouteConfigEntry; // .bluetoothA2DP
|
|
24
|
+
bluetoothHFP?: RouteConfigEntry; // .bluetoothHFP
|
|
25
|
+
headphones?: RouteConfigEntry; // .headphones
|
|
26
|
+
// add more as needed
|
|
27
|
+
};
|
|
28
|
+
};
|
package/wakewords/index.d.ts
CHANGED
|
@@ -6,5 +6,9 @@ import { restartListeningAfterDucking } from './KeyWordRNBridge';
|
|
|
6
6
|
import { removeAllRNBridgeListeners } from './KeyWordRNBridge';
|
|
7
7
|
import { createKeyWordRNBridgeInstance } from './KeyWordRNBridge';
|
|
8
8
|
import { KeyWordRNBridgeInstance } from './KeyWordRNBridge';
|
|
9
|
+
import { setWakewordAudioRoutingConfig } from './KeyWordRNBridge';
|
|
9
10
|
import useModel from './useModel';
|
|
10
|
-
export { enableDucking, disableDucking, initAudioSessAndDuckManage, restartListeningAfterDucking, removeAllRNBridgeListeners, createKeyWordRNBridgeInstance, KeyWordRNBridgeInstance, useModel };
|
|
11
|
+
export { enableDucking, disableDucking, initAudioSessAndDuckManage, restartListeningAfterDucking, removeAllRNBridgeListeners, createKeyWordRNBridgeInstance, KeyWordRNBridgeInstance, setWakewordAudioRoutingConfig, useModel };
|
|
12
|
+
|
|
13
|
+
// Re-export routing types for consumers:
|
|
14
|
+
export type { AudioRoutingConfig, RouteConfigEntry } from './audioRoutingConfig';
|
package/wakewords/index.js
CHANGED
|
@@ -7,9 +7,9 @@ import {
|
|
|
7
7
|
disableDucking,
|
|
8
8
|
initAudioSessAndDuckManage,
|
|
9
9
|
restartListeningAfterDucking,
|
|
10
|
+
setWakewordAudioRoutingConfig, // ← NEW
|
|
10
11
|
} from './KeyWordRNBridge';
|
|
11
12
|
|
|
12
|
-
|
|
13
13
|
export { enableDucking }
|
|
14
14
|
export { disableDucking }
|
|
15
15
|
export { initAudioSessAndDuckManage }
|
|
@@ -17,5 +17,6 @@ export { restartListeningAfterDucking }
|
|
|
17
17
|
export { removeAllRNBridgeListeners }
|
|
18
18
|
export { createKeyWordRNBridgeInstance }
|
|
19
19
|
export { KeyWordRNBridgeInstance }
|
|
20
|
+
export { setWakewordAudioRoutingConfig } // ← NEW
|
|
20
21
|
export { useModel }; // Export only useModel
|
|
21
22
|
export default useModel; // Allow default import
|