Code Monkey home page Code Monkey logo

twilio-realtime-tutorial's Introduction

AssemblyAI's JavaScript SDK & Twilio Real-Time Tutorial

This repo provided by AssemblyAI displays how to use our JavaScript SDK with Twilio to transcribe calls in real-time.

How To Install and Run the Project

❗Important❗

  • Before running this app, you need to upgrade your AssemblyAI account. The real-time API is only available to upgraded accounts at this time.
  • Running the app before upgrading will cause an error with a 402 status code. ⚠️
  • To upgrade your account you need to add a card. You can do that in your dashboard!
  • You will need to set up a Twilio account and then install the Twilio CLI.
  • You will also need to create an ngrok account and install it on your computer. Once you create an account there will be instructions to follow on your dashboard for installation.

Instructions

  1. Clone the repo to your local machine.
  2. Open a terminal in the main directory housing the project. In this case transcribe.js.
  3. Run npm install to ensure all dependencies are installed.
  4. Add a .env file. Add your AssemblyAI key to the .env file. You can find your API key on the "Account" page in your dashboard. Copy and paste it into the .env file replacing "YOUR-PERSONAL-API-KEY" with your key: ASSEMBLYAI_API_KEY=YOUR-PERSONAL-API-KEY
  5. In your terminal, run ngrok http 8080. You will then see a Forwarding url that points to your local host. You will need this in the next step.
  6. Leave ngrok running and open up a new terminal. To tell Twilio what the routing address for your Twilio number is, use the following code: twilio phone-numbers:update $TWILIO_NUMBER --voice-url $NGROK_HTTP_URL. Where $TWILIO_NUMBER has been replaced with your Twilio number that you can find in the Twilio console and $NGROK_HTTP_URL has been replaced with the ngrok forwarding URL that you got in the previous step.
  7. Start the app with the command node transcribe.js.
  8. Call the Twilio number and follow the verbal instructions. Once the stream begins, any spoken words will be transcribed in the terminal.

Additional Tutorials

Further Documentation

Contact Us

If you have any questions, please feel free to reach out to our Support team - [email protected]!

twilio-realtime-tutorial's People

Contributors

oconnoob avatar swimburger avatar a-dinoto avatar

Watchers

Mike avatar James Cloos avatar Dylan Fox avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.