In this tutorial you’ll leverage  Twilio Programmable Voice to receive phone calls at your Twilio phone number, and transcribe any voice messages left by the caller. This guide can be used as a foundation to build your own voicemail system.

Prerequisites

To get started with this tutorial, you’ll need the following:

  • A free Twilio account ( sign up with this link and get $10 in free credit when you upgrade to a paid account)
  • A  Twilio phone number

Create a new Twilio Functions Service

Through Twilio, you can configure a webhook that will handle any incoming calls to your Twilio phone number.

You’ll need a place to host the code for the webhook - this could be your own server, or locally running application, but for this tutorial you’ll use  Twilio Functions. Twilio Functions is a serverless environment that lets you deploy backend services without the overhead of setting up a server.

To set up a new Functions service,  visit the Functions section of the Twilio Console. Once there, click the button that says Create Service. A Functions Service is a unique container for related functions, assets, and environments.

Clicking the Create Service button will prompt you to enter a friendly name. For this field, enter “transcription-service”. After entering the friendly name, click the Next button. This will take you to the editor for your new Service.

Towards the top of the page click the blue Add + button and select Add Function. Give the function the name /transcribe-call.

You’ll be able to edit your function in the text editor to the right.

#code #node #nodejs

Transcribe A Voice Message in Node.js with Twilio Functions
1.20 GEEK