kanari-voice-ai
v1.0.2
Published
kanari voice assistant package
Downloads
3
Readme
Kanari Web SDK
This package lets you to start kannari-assistant directly in your webapp.
Installation
You can install the package via npm:
npm install kanari-voice-ai
Usage
First, import the Kanari class from the package :
import Kanari from 'kanari-voice-ai'
Then, create a new instance of the Kanari class, passing your assistant-id as a parameter to the constructor :
const kassistant = new Kanari('your-assistant-id');
You can start the voice assistant by calling the start
method and passing an assistant
object :
kassistant.start(options);
The start
method will initiate the assistant.
kanari-assistant accepts an options object
options = {
model : "gpt-3.5-turbo",
voice :"Arabic-Abeer(Female)"
}
The following are the options that can be passed to start.
Key | Description
--- | ---
model
| Which model to be used
voice-options
| ("Arabic-Abeer(Female)", "Arabic-Rouaa(Expressive Female)", "Syrian(Male)", "Arabic-Hamza(Male)", "Egyptian(Male)" )
Events
kassistant.on('message', message => {
// will provide the transcription.
})
kassistant.on('audioBlob', audio => {
// get the blob.
})
You can stop the voice assistant by calling the stop
method :
kassistant.stop();
This will stop the assistant.