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.
Local development
-
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.
-
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
-
After downloading the repo, copy the
recording-addons-watson-csharp/Local.config.example
torecording-addons-watson-csharp/Local.config
file and edit theTwilioAccountSid
andTwilioAutToken
with your own data:
<appSettings>
<add key="TwilioAccountSid" value="ACxxx" />
<add key="TwilioAuthToken" value="xxx" />
</appSettings>
-
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).
-
Build the solution in Visual Studio.
-
Run the application. You'll see it start up at
http://localhost:46230
, but we aren't quite ready yet. -
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.
-
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. -
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
-
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.