{"id":2704,"date":"2017-02-18T05:34:43","date_gmt":"2017-02-18T05:34:43","guid":{"rendered":"http:\/\/truelogic.org\/wordpress\/?p=2704"},"modified":"2017-02-18T05:44:13","modified_gmt":"2017-02-18T05:44:13","slug":"a-speech-translation-mashup-in-less-than-5-hours","status":"publish","type":"post","link":"https:\/\/truelogic.org\/wordpress\/2017\/02\/18\/a-speech-translation-mashup-in-less-than-5-hours\/","title":{"rendered":"A Speech Translation mashup in less than 5 hours"},"content":{"rendered":"<p>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&amp;t=11s<\/p>\n<p>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.<\/p>\n<p>The concept is very simple. The processing pipeline is as follows:<\/p>\n<ol>\n<li>Take in speech input in a source language and convert it into text<\/li>\n<li>Take the text and feed it into a translation API which will convert the source text into a target text in a different language<\/li>\n<li>Take the translated target text and feed it into a Text to speech engine to generate speech in the target language<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p>Unfortunately Google Chrome is only browser which fully support Web Speech, so this cannot run in any other browser as of the moment.<\/p>\n<p>&nbsp;<\/p>\n<p>I am using the following libraries\/services:<\/p>\n<ul>\n<li>Web Speech API for speech recognition<\/li>\n<li>Free API from http:\/\/transltr.org\/ to do the language translation<\/li>\n<li>Free TTS service from http:\/\/responsivevoice.org\/ to do text to speech conversion<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>You can find the demo page here:<a href=\"http:\/\/truelogic.org\/speech.html\"> http:\/\/truelogic.org\/speech.html<\/a> . You can get the source code from the Page source. The code is pure html and javascript.<\/p>\n<p>There is no external dependency, except that you need to include the jQuery script .<\/p>\n<p>The demo video is here:<\/p>\n<p><a href=\"https:\/\/www.youtube.com\/watch?v=tJEVea-1jWo\">https:\/\/www.youtube.com\/watch?v=tJEVea-1jWo<\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>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 <a class=\"mh-excerpt-more\" href=\"https:\/\/truelogic.org\/wordpress\/2017\/02\/18\/a-speech-translation-mashup-in-less-than-5-hours\/\" title=\"A Speech Translation mashup in less than 5 hours\">[&#8230;]<\/a><\/p>\n<\/div>","protected":false},"author":1,"featured_media":2591,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[301,18,10],"tags":[],"class_list":["post-2704","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-audio","category-javascript","category-programming"],"_links":{"self":[{"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/posts\/2704","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/comments?post=2704"}],"version-history":[{"count":3,"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/posts\/2704\/revisions"}],"predecessor-version":[{"id":2708,"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/posts\/2704\/revisions\/2708"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/media\/2591"}],"wp:attachment":[{"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/media?parent=2704"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/categories?post=2704"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/tags?post=2704"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}