A Speech Translation mashup in less than 5 hours

The Web Speech API is a little known framework, which has been developed by Google a couple of years back. It is a very good and accurate javascript based API which is able to take in speech from an audio source like a microphone and convert it into text on the fly. To see it in action, you can check my Youtube video here: https://www.youtube.com/watch?v=WNnNJSXHe6s&t=11s

Recently I did an experiment to take the usage of the Web Speech api further in the form of a single web page which can take in speech input in one language and give a translated speech output in another language.

The concept is very simple. The processing pipeline is as follows:

  1. Take in speech input in a source language and convert it into text
  2. Take the text and feed it into a translation API which will convert the source text into a target text in a different language
  3. Take the translated target text and feed it into a Text to speech engine to generate speech in the target language


Unfortunately Google Chrome is only browser which fully support Web Speech, so this cannot run in any other browser as of the moment.


I am using the following libraries/services:

  • Web Speech API for speech recognition
  • Free API from http://transltr.org/ to do the language translation
  • Free TTS service from http://responsivevoice.org/ to do text to speech conversion


You can find the demo page here: http://truelogic.org/speech.html . You can get the source code from the Page source. The code is pure html and javascript.

There is no external dependency, except that you need to include the jQuery script .

The demo video is here:






Be the first to comment

Leave a Reply

Your email address will not be published.