rajgoel / reveal.js-plugins

Plugins for reveal.js
MIT License
740 stars 247 forks source link

[audio-slideshow] Use Web Speech API for TTS? #3

Open fghaas opened 8 years ago

fghaas commented 8 years ago

Would it make sense for the Audio slideshow plugin to use the Web Speech API, which by now is included in several popular browsers? https://developers.google.com/web/updates/2013/01/Voice-Driven-Web-Apps-Introduction-to-the-Web-Speech-API?hl=en

rajgoel commented 8 years ago

It would be nice to be able to use the Web Speech API. I haven't followed on this so far, because I couldn't figure out how to link the result to the audio player controls, so that the user can pause, seek, play the audio. If this can be done, this would be a great improvement of the plugin.

See: http://stackoverflow.com/questions/21514588/how-to-access-audio-result-from-speech-synthesis-api http://caniuse.com/#feat=speech-synthesis

jamjolu commented 7 years ago

I just posted a simple plugin for adding text to speech to reveal.js using the HTML5 speech API. It works on Widows using Chrome, Firefox, Opera and on Linux using Google Chrome.

To the demo: https://jamjolu.github.io/tts_basics_for_revealjs

To the github repo: https://github.com/jamjolu/tts_basics_for_revealjs

fghaas commented 7 years ago

@jamjolu This is really cool, and it works fine for me on Firefox (on Linux) and Chrome (Linux and Android). It just stays silent in Chromium (on Linux) though; have you managed to get that to work?

jamjolu commented 7 years ago

Hi Florian, No, I haven't. I'm not sure why it doesn't work and haven't looked too deeply into why. It may be that some flag or other setting/plugin that is needed:

http://askubuntu.com/questions/761975/chromium-is-not-generating-voice

https://bbs.archlinux.org/viewtopic.php?id=191836

In any event, Google Chrome works fine and it is my personal choice for a browser.

By the way, I was not able to get Firefox to "talk" on my Bunsen Labs Linux. I just assumed that I haven't installed a text-to-speech service to make it possible. Is there a plugin for Firefox you can recommend?

Jim Luther

On Sun, Mar 26, 2017 at 4:14 PM, Florian Haas notifications@github.com wrote:

@jamjolu https://github.com/jamjolu This is really cool, and it works fine for me on Firefox (on Linux) and Chrome (Linux and Android). It just stays silent in Chromium (on Linux) though; have you managed to get that to work?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/rajgoel/reveal.js-plugins/issues/3#issuecomment-289311528, or mute the thread https://github.com/notifications/unsubscribe-auth/AXg_ZjxvURkGF1-9NV6WDboi5VvgiRhFks5rpscqgaJpZM4G_co4 .

jamjolu commented 7 years ago

Hi Florian,

I just noticed something interesting on Windows. Google Chrome Canary (which is similar to the Chromium browser) supports text-to-speech. But, it uses the default Windows text-to-speech engine and voice instead of the Internet based voice that Google Chrome uses.

jl

On Sun, Mar 26, 2017 at 4:14 PM, Florian Haas notifications@github.com wrote:

@jamjolu https://github.com/jamjolu This is really cool, and it works fine for me on Firefox (on Linux) and Chrome (Linux and Android). It just stays silent in Chromium (on Linux) though; have you managed to get that to work?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/rajgoel/reveal.js-plugins/issues/3#issuecomment-289311528, or mute the thread https://github.com/notifications/unsubscribe-auth/AXg_ZjxvURkGF1-9NV6WDboi5VvgiRhFks5rpscqgaJpZM4G_co4 .

fghaas commented 7 years ago

I believe (though I may be wrong) that all you need for Firefox to do speech synthesis on Debian-based distros is have media.webspeech.synth.enabled set to true (the default), and have the speech-dispatcher package installed.

Which, as I understand it, should also be true for enabling speech synthesis in Chromium, but that doesn't appear to work (for whatever reason).