Company
Date Published
Author
Ben Greenberg
Word count
4629
Language
English
Hacker News points
None

Summary

Vonage has released Automatic Speech Recognition (ASR) as a new feature on the Voice API, providing a great opportunity to build an entertaining voice application that leverages this capability. A Deno-based voice application will be built to receive a phone call, accept speech input from the caller, convert it into text using Vonage ASR, translate it into a random language using Microsoft Azure, and then speak back both the original English text and the newly translated text. The application uses Opine as its web framework for the server. It defines routes for incoming calls, converted speech to text, and call lifecycle event data. The application also includes helper functions such as token creation, translation, language picker, and voice picker. Environment variables need to be defined for Azure API key, endpoint, and Vonage ASR webhook. A Vonage virtual phone number needs to be provisioned using the CLI or dashboard. Once set up, the application can be run with ngrok to make it externally accessible. The application allows users to give their Vonage-provisioned phone number a call, say a message, and hear it converted into text and translated into a random language.