简体   繁体   中英

Backup for HTML SpeechSynthesizer - Text to Speech

I'm currently using SpeechSynthesizer in my Javascript code to let the computer speak given messages out loud.

Support for SpeechSynthesizer is found here: http://caniuse.com/#feat=speech-synthesis

Some browsers are lacking support so I am trying to find a solution to support the other browsers too. I'm also not confident every browser provides decent quality of speech.

The Google Speech API used to be able to be called from JS, but they have added additional checks (tokens) nowadays and although there is support from Java ( https://github.com/lkuza2/java-speech-api ), I don't think it's possible to set the headers in JS.

My last option is to serve audio files from my server, but I rather not have that strain on my bill.

Installing applications for text to speech is not an option.

I've decided to settle with ResponsiveJS anyway. They have a free option as long as I don't go commercial and if I use it only as backup I hope I can go a while without going over their bandwidth limit.

There is no hacking required I found out. The bill for unlimited is quite modest too, at 50$ a month.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM