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:
- Take in speech input in a source language and convert it into text
- Take the text and feed it into a translation API which will convert the source text into a target text in a different language
- 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
There is no external dependency, except that you need to include the jQuery script .
The demo video is here: