Welcome to the iOS Framework for KeyWordDetection by DaVoice.io.
This framework provides robust keyword detection capabilities on iOS, and can be used natively or within React Native projects.
You can use it as Native or use it with our React Native support (https://github.com/frymanofer/ReactNative_WakeWordDetection)
Installation Native iOS Integration To integrate the framework natively into your iOS project, follow these steps:
Download the Framework: Manually add the KeyWordDetection framework to your Xcode project.
Modify Your Podfile: Add the necessary dependencies and configurations.
# DAVOICE REQUIRED CONFIGURATION use_frameworks! :linkage => :static
# Required Pods
pod 'onnxruntime-objc', '> 1.18.0'
pod 'ios-voice-processor', '> 1.1.0'
end
<\body>
Note: We are working on supporting various linkage types; currently, linkage must be static.
React Native Integration To use this framework in a React Native project, visit our React Native setup page: (https://github.com/frymanofer/ReactNative_WakeWordDetection)
Quick Start:
-
Go through the native instruction - Download and install KeyWordDetection IOS framework in xcode and make changes to the Podfile as in the above instructions.
-
npm install react-native
-
Set Up Keyword Detection:
Below is an example of how to use the framework with React Native:
Import the main class:
// import KeyWordRNBridge from 'react-native-davoice-keywordsdetection'; Not yet available import KeyWordRNBridge from './rnbrigedspotter/KeyWordRNBridge';
Setup your callback on keyword / wakeword detected:
const onKeyWordDetected = async (keywordIndex: any) => { // Do whatever you need on callback // Stop searching for Keywords if it makes sense - KeyWordRNBridge.stopKeyWord(); };
Setup and activate keywords detection:
try {
let modelParams = {modelName:"my_key_word.onnx", /* replace with your model */
threshold: 0.9999, /* false positive sensitivity */
falsePositiveChecks: 2} /* How many checks for false positives */
Initialize the detection:
const result = await KeyWordRNBridge.initKeyWord(modelParams.modelName, modelParams.threshold, modelParams.falsePositiveChecks);
Setup the callback:
KeyWordRNBridge.onKeyWordEvent((event) => {
onKeyWordDetected(event);
});
Now we are set - you can start listening and detect key words:
KeyWordRNBridge.startKeyWord();
} catch (e) {
console.log("ERROR loadDavoice", e);
}
Support For any questions or support, please contact us at:
Email: info@davoice.io Website: DaVoice.io
-
Here are wakeword detection github links per platform:
- For react Native got to: https://github.com/frymanofer/ReactNative_WakeWordDetection
- For Android: https://github.com/frymanofer/KeywordsDetectionAndroidLibrary
- For IOS framework: With React Native bridge: https://github.com/frymanofer/ReactNative_WakeWordDetection
Sole Framework: https://github.com/frymanofer/KeyWordDetectionIOSFramework