Twilio

Recording Add-Ons for C# (ASP.NET MVC)

This application should give you a ready-made starting point for writing your own voice transcription app with Twilio and IBM Watson.

Read the full tutorial here!

Local development

  1. To run this application with Twilio, you will need to make it publicly accessible. We recommend using ngrok for this. Install ngrok now, or install the ngrok Extensions for Visual Studio.

  2. First clone this repository and cd into its directory:

    git clone git@github.com:TwilioDevEd/recording-addons-watson-csharp.git
    
    cd recording-addons-watson-csharp
    
  3. After downloading the repo, copy the recording-addons-watson-csharp/Local.config.example to recording-addons-watson-csharp/Local.config file and edit the TwilioAccountSid and TwilioAutToken with your own data:

<appSettings>
	<add key="TwilioAccountSid" value="ACxxx" />
	<add key="TwilioAuthToken" value="xxx" />
</appSettings>
  1. Update those values in the config file to match your Twilio account. You can get your Account SID and auth token from your dashboard. You can buy a Twilio phone number right here (the one you are going to call to test the application).

  2. Build the solution in Visual Studio.

  3. Run the application. You'll see it start up at http://localhost:46230, but we aren't quite ready yet.

  4. Start ngrok now, to make the application publicly accessible. Either run this command:

    ngrok http 1229 -host-header="localhost:46230"
    

    Or, if you installed the ngrok Extensions for Visual Studio, choose "Start ngrok Tunnel" from the "Tools" menu in Visual Studio.

  5. Open the number management page and open a number's configuration by clicking on it.

    For this application, you must set the voice webhook of your number to something like this:

    http://<your-ngrok-subdomain>.ngrok.io/voice
    

    And in this case set the POST method on the configuration for this webhook.

  6. Latly, you need to setup the IBM Watson Speech to Text Add-On here.

    After installing it, mark the box Record Verb Recordings

    On the field CALLBACK URL, add something like this:

    http://<your-ngrok-subdomain>.ngrok.io/callback
    
  7. Now, just call your number! You should listen to your own recording and see the transcript text on the HTTP Response.

Meta

  • No warranty expressed or implied. Software is as is. Diggity.
  • MIT License
  • Lovingly crafted by Twilio Developer Education.