Skip to content

A Git repository to follow along a tutorial for scaling Twilio Media Streams

Notifications You must be signed in to change notification settings

nokenwa/scalingTwilioStreams

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Live Transcribing Multiple Phone Calls Silmultaneously using Twilio Media Streams and Google Speech-to-Text

With Twilio Media Streams, you can extend the capabilities of your Twilio-powered voice application with real time access to the raw audio stream of phone calls.

This demo follows on from my previous demo showing you how to get started with Twilio Media Streams and live transcription. If you haven’t set up a live call transcription before, I recommend getting my other demo working first. In this demo, I have altered the application to be able to handle multiple phone calls at the same time. It is able to monitor the transcribed speech from multiple phone calls, live in the browser using Twilio and Google Speech-to-Text with Node.js.

Blog Post

If you prefer a step by step guide through building this yourself, this blog post will guide you through transcribing speech from a phone call into text, live in the browser using Twilio and Google Speech-to-Text using Node.js.

[Visit the Blog Post here](LINK TO BE ADDED)


Prerequisites

Before we can get started, you’ll need to make sure to have:


Setup

  1. Setup Google Project and retrieve service account key

    a. Install and initialize the Cloud SDK

    b. Setup a new GCP Project

    c. Enable the Google Speech-To-Text API for that project

    d. Create a service account.

    e. Download a private key as JSON.

  2. Modify the .env.sample file to include the path to your JSON service account key and save it as a .env file

  3. Run the following commands:

    Buy a Phone Number (I have used the GB country code to buy a mobile number, but feel free to change this for a number local to you.)

    $ twilio phone-numbers:buy:mobile --country-code GB

    Start ngrok:

    $ ngrok http 8080

    While this is running in a new window copy the forwarding HTTPS URL (https://xxxxx.ngrok.io) and set your Twilio number to this URL:

    $ twilio phone-numbers:update TWILIO_NUMBER --voice-url https://xxxxxxxx.ngrok.io

    Install dependencies and start your server:

    $ npm install

    $ npm start


Contact me

If you have any questions, feedback or just want to show me what you build, feel free to reach out to me:

About

A Git repository to follow along a tutorial for scaling Twilio Media Streams

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published