This example runs on node server, so we will use
.env file and add your APP_ID, APP_SECRET, SUMMARY_EMAIL. You can get
APP_ID and APP_SECRET from https://platform.symbl.ai
For demo purposes, we're using
mic to simply get audio from microphone and pass
it on to websocket connection
mic module so make sure you check that all requirements for the package
are met. For instance we need
sox package or
ALSA tools to be installed.
mic installation instructions: https://www.npmjs.com/package/mic#installation
on Mac it can be as simple as running
brew install sox
We will also need a unique id to associate to our Symbl request. We will create
this Id using
const id = uuid();
Now we can start the connection using
sdk.startRealtimeRequest. We need to
provide several important options to our realtime request.
insightTypes- we need to provide which insights will be detected. Supported ones are
configobject with meeting title, confidence treshold and the sampleRate
speakerobject to define who is the speaker. To distinguish between different speakers we also need to provide
userIdwith valid email, so after meeting will end, we will receive summary email
handlers- these handlers are used to detect speach, messages and insights.
onSpeechDetected- This will return live transcription of the call
onMessageResponse- When processed messages are available, this callback will be called
onInsightResponse- When Symbl detects an insight, this callback will be called.
So our complete code will look like this: