Symbl's APIs empower developers to enable:
- Real-time analysis of free-flowing discussions to automatically surface highly relevant summary discussion topics, contextual insights, suggestive action items, follow-ups, decisions, and questions.
- Voice APIs that makes it easy to add AI-powered conversational intelligence to either telephony or WebSocket interfaces.
- Conversation APIs that provide a REST interface for managing and processing your conversation data.
- Summary UI with a fully customizable and editable reference experience that indexes a searchable transcript and shows generated actionable insights, topics, timecodes, and speaker information.
This is a sample implementation of Symbl's Websocket API using Twilio Flex as an inbound adapter for streaming audio. These instructions use Twilio Media Streams configured in the Twilio Studio and ngrok to expose a local endpoint.
The first step to getting setup is to sign up.
Update the .env file with the following:
- Your App Id that you can get from Platform
- Your App Secret that you can get from Platform
- Your email address where the conversation summary and insights will be sent.
- Your name to be attached to conversation summary
In a new terminal, run ngrok http 3000
to create a http tunnel to allow Twilio to hit the websocket server. If you plan to deploy this server, then you don't need to use ngrok and instead just have to configure Twilio Media Streams endpoint to hit the deployed server.
Configure your Twilio Flex flow using Media Streams
- Follow the "Setting Up your Twilio Studio" with your ngrok or server endpoint from this blog post
Run the follwing npm commands:
npm install
to download all the node modulesnode index.js
to start the websocket server
- JS ES6+
- Node.js
- npm (or your favorite package manager)
- ngrok - free accounts at https://ngrok.com/ (or a deployed server)
- Twilio account w/ Flex and Studio features included - https://www.twilio.com/try-twilio
Function params passed to the Symbl Streaming API to open the websocket connection can be found beginning on line 71 of the index.js file.
client_connection.send(JSON.stringify({
"type": "start_request",
"insightTypes": ["question", "action_item"],
"config": {
"confidenceThreshold": 0.5,
"timezoneOffset": 480, // Your timezone offset from UTC in minutes
"languageCode": "en-US",
"speechRecognition": {
"encoding": "MULAW", // Codec required for Twilio Flex
"sampleRateHertz": 8000 // Make sure the correct sample rate is
},
"meetingTitle": "Customer Call"
},
"speaker": {
"userId": process.env.USER_EMAIL,
"name": process.env.USER_NAME
},
}));
"dependencies": {
"dotenv": "^8.2.0",
"express": "^4.17.1",
"http": "0.0.0",
"mic": "^2.1.2",
"path": "^0.12.7",
"request": "^2.88.2",
"websocket": "^1.0.31",
"ws": "^7.2.1"
}
Configured Twilio Studio flow
When implemented once a Twilio Flex agents answers a new call, the call will connect with Symbl and the the conversation + insights will be generated and sent via email when the call is closed.
If you have any questions, feel free to reach out to us at [email protected], through our Community Slack, or developer community
This guide is actively developed, and we love to hear from you! Please feel free to create an issue or open a pull request with your questions, comments, suggestions and feedback. If you liked our integration guide, please star our repo!
This library is released under the MIT License