Create a jQuery plugin to make your web as a speaker

I there anyway to make your web text content spoken?

There are a lot of APIs we can use, but it is not easy to choose a suitable one.  I tried with google translate speech api (e.g:http://translate.google.com/translate_tts?ie=UTF-8&q=what+are+you+doing&tl=en-us), but there is a limitation that the length of sentence can not be longer than 100 characters for one time call. Anyway we can split our large content into array of sentences and every item is one sentence which shorter than 100 characters.  Then loop the array to call google’s API, but another problem raises up, google will cancel our call because the frequency is too high.

At last, I found a better one http://www.yakitome.com, in order to use it’s API, we need to register as an account and get a free API Key, and there is very detailed document(https://www.yakitome.com/documentation/tts_api) for reference.

Below is the example that I created a simple demo:

See the Pen jQuery plugin web text content to speech by Wang Weiqiang (@WangWeiqiang) on CodePen.

Tagged with: ,
Posted in Digital Multiple Media, Javascript

Categories

Related Posts