- Real-Time Transcription
- Real-Time Insights
- Real-Time Messages
- Real-Time Intents
The below example shows how to achieve this.
Add the above lines to import and initialize the SDK. Replace the
appSecret in the code.
You can find the them by signing up on Symbl Developer Platform
The above snippet makes a phone call, by calling the
startEndpoint with type set to
pstn and a valid US/Canada Phone Number phoneNumber.
You can also call in via type
sip as well and the steps below will still remain the same.
The above snippet calls the
subscribeToConnection which requires the
connectionId of the call and a callback function to be passed as the second argument which will be invoked when any of the above events are available to be consumed.
data received will contain
type of the event. It can be one of
Lets go over them one by one.
transcript_response: This contains the real-time transcription data which is availabe as soon as its detected.
message_response: This will contain the array of the transcripts of all the speakers which will be logically separated by punctuations or the speakers if Active Speaker Events are pushed.
insight_response: This will contain the array of all the insights detected in real-time. These can be action-items or questions.
There is also a 4th type of event which is
intent_response covered in a separate example.
To end the call gracefully, we call the
stopEndpoint call to stop the call.
The code snippet above simply stops the call after 60 seconds.
The complete code for the example above can be found here