How to pass different audio codecs to Symbl endpoint

The code is available here:

Sometimes you need to pass different audio codecs when passing the audio. This example shows how to pass them. The ones currently supported are

- Supported Sample Rates -- 16000Hz, 24000Hz,48000Hz
- Both CBR (Constant Bitrate) and VBR (Variable Bitrate) are supported
- Support for in-band FEC
- Supported Sample Rates -- 16000Hz
- VBR is not supported
- Supported Sample Rates -- 44100Hz
- Supported Sample Rates -- 8000Hz

Getting started#

View on Github

Open .env file and add your APP_ID, APP_SECRET, SUMMARY_EMAIL. You can get APP_ID and APP_SECRET from

we will use symbl-node package.

const {sdk} = require('symbl-node')

Let's start by initialising symbl-node sdk

await sdk.init({
appId: process.env.APP_ID,
appSecret: process.env.APP_SECRET,
basePath: '',

Now after we initialised, we need to start the connection by running

const connection = await sdk.startEndpoint(endpointConfig)

So how do you pass custom codecs? It's as simple as passing custom audio config

endpoint: {
//*****************Custom Audio Config******************
audioConfig: {
encoding: 'OPUS',
sampleRate: 16000,
type: 'pstn',
phoneNumber: process.env.DEFAULT_PHONE_NUMBER,

If you have a requirement to use a codec not included in the ones above or have any other queries, please drop an e-mail to