I'm creating HTML5 Speech Synthesis application like below link.
http://updates.html5rocks.com/2014/01/Web-apps-that-talk---Introduction-to-the-Speech-Synthesis-API
Windows7 and Android Chrome33beta or Mac's safari works fine.
but Windows7-Firefox 27 seems support Speech-Synthesis-API,but not work because return empty voice list.
Is there any solution?
Check if Speech Synthesis API is supported your browser
http://caniuse.com/#feat=speech-synthesis
You can check it with modernizr
http://v3.modernizr.com/download/#-speechsynthesis
If browser not support it, you can use meSpek.js
http://www.masswerk.at/mespeak/
Unfortunately, it looks like only Firefox OS (and perhaps also, Firefox for Android, I have not checked) bundles and supports a speech synthesis library.
There is an open bug regarding desktop support.
As of release 44, the Speech Synthesis half of the api is available on Firefox Desktop.
But weirdly still requires that the flag be set. Under "Browser Compatibility":
Can be enabled via the media.webspeech.synth.enabled and media.webspeech.recognition.enable flags in about:config. Note that currently only the speech synthesis part is available in Firefox Desktop — the speech recognition part will be available soon, once the required internal permissions are sorted out.
I wonder why. MDN has even gone to the trouble of whipping up some nice working examples, why not have the functionality enabled be default?
If you just want to add a button to your webpage to read the page out loud, add this code to your website:
<script src='https://code.responsivevoice.org/responsivevoice.js'></script>
<script type="text/javascript">
<!-- //
var speechpause=0;
function toggleSpeech(){
if(speechpause!=1){
responsiveVoice.pause();
speechpause=1;
}else{
responsiveVoice.resume();
speechpause=0;
}
}
//-->
</script>
<div style="float:right">
<input onclick="responsiveVoice.speak($('#some_div_with_content').text(), 'Deutsch Female', {pitch: .7});" type="button" value="🔊 Play" />
<input onclick="toggleSpeech()" type="button" value="||" />
</div>
This uses jquery to get the text of the content, but that could be easily changed.
Related
CanIUse and MDN doesn;t seems to be agree on the support for service worker. In the midst of Chrome going to remove support for appcach, we are trying to ascertain the impact of moving to Service Worker. Are we reading the above two pages incorrectly?
We tried Google's own samples against device/browser combinations and results wore not encouraging. For example the 'custom offline page' demo failed in iOS Chrome (v80) where it worked in iOS Safari (12.4.5).
The 'Selective caching' and 'Read through caching' pages clearly show "service worker is not supported in the current browser" in Chrome 80. It is checking the if ('serviceWorker' in navigator) {, but other samples doesn't show such a message.
All and all it is confusing on the browser support for the Service worker. Is there there a universally tested sample which we can use as a benchmark for different device/browser combination.
I asked Jake Archibald of Google on this and he replied with the following SO post which must be still valid.
Chrome Service Worker iOS Support
Therefore apparently Safari is the only option at the moment. I am still wondering what Google is recommending developers to use once they remove support for AppCache.
Jake continued saying there is no way they can add support as Apple is not giving them full rights on iOS. But he mentioned appcache will continue to work as usual. His exact words are
"However, since Chrome on iOS is just a skin over Safari, appcache will continue to work while it works in Safari webview."
on iOS only Safari supports service workers. You can test browsers if it supports with this code
if ('serviceWorker' in navigator) { /*supported*/ }
I am working on a project that is targeted for browsers on smart phones. And I can't seem to find any way to do a client-side speech recognition, as the mobile version of chrome doesn't even support their own Web Speech API. Does anybody know how to have speech recognition working on a mobile browser like Chrome or Firefox? Or is there a work around that can be used? like a 3rd-party service that provide APIs to be called.
Potential duplicate: Safari Speech Recognition
NOPE: https://caniuse.com/#feat=speech-recognition
NOPE: https://developer.mozilla.org/en-US/docs/Web/API/Web_Speech_API
Not client side but might be of some assistance: https://cloud.google.com/speech-to-text/docs/streaming-recognize
Also this: https://github.com/Kitt-AI/snowboy (seems like need to set up your RasPi)
And this: https://github.com/tensorflow/tfjs I can totally imagine doing all the machine learning in the browser, just like you can run Windows 95 and what not.
for example, growl flashes a message in the upper right corner regardless of which application is running. Skype makes the icon in the dock have a little red dot with a number of new messages. Is there anyway to write a chrome extension to have this type of functionality? that is, I want to write a chat system that works in the browser but also notifies users when they have closed my site's tab, or even when chrome is not running.
I could write a native client in addition to my browser based client, but that's double the work. (Tripple the work if you bother with a native window's client vs. just OSX but who would do that?)
Chrome can create "Desktop Notifications" See the Documentation
It's also possible to have the notifications visible when chrome is closed providing you create a "background process". this question/answer might point you in the right direction.
Chrome supports the text-only version of the W3C desktop notification standard. Chrome deprecated the HTML version about a year ago and will stop supporting it very soon. Any webpage viewed in Chrome and any Chrome extension can use this API.
The Rich Notifications API is available to Chrome extensions and packaged apps. As of today, it's dev-channel only and is iterating rapidly. It has implementations on ChromeOS and Windows, with Mac on the way. Linux currently delegates to the W3C implementation. The API is not a 1:1 replacement of W3C HTML desktop notifications, but it does provide many layout options for common use cases.
i would like to run .exe files on my computer from my website,
example:
<script type="text/javascript" language="javascript">
function RunFile() {
WshShell = new ActiveXObject("WScript.Shell");
WshShell.Run("c:/windows/system32/notepad.exe", 1, false);
}
</script>
<input type="button" value="Run Notepad" onclick="RunFile();"/>
I googled this and its seems its only possible in IE so i wonder if its possible to do this in all browsers with some sort of application like BF3 or something, a handler of some sort .dll or whatever they use.
I will not abuse this, i can assure you i will only use it for my personal usage and with some friends. I want a html file that can open desktop icons.
The ActiveXObject is not part of HTML DOM nor JavaScript/ECMAScript standard. It is only available for Microsoft Internet Explorer (MSIE). MSIE for Mac might also lack support of ActiveXObject since ActiveX is Window platform originated.
There is no way to launch local applications from web pages. As you've no doubt surmised, it's far too easy to abuse.
I'm wondering how
<input type="text" x-webkit-speech speech />
Is there a speech recognition enging built into Chrome or is it accessing an underlying speech recognition facility in the operating system?
Yup, Chrome does speech recognition via Google's servers. But there's no reason that other browsers couldn't choose to implement it differently (for example using some speech recognition facility in the OS).
Balu, your link is actually a bit out of date. The latest Google proposal can be found here: http://www.w3.org/2005/Incubator/htmlspeech/2010/10/google-api-draft.html
Although speech recognition has been available in the Chrome dev channel for some time, it has not shipped yet and we're not yet sure when it will ship. We definitely want people to play with the API and offer feedback on it, but we don't think it's quite ready for prime time yet.
According to the code it sends the audio data as a POST request to:
https://www.google.com/speech-api/v1/recognize?client=chromium&lang=??&lm=??&xhw=??&maxresults=3
lm is grammar in the code, xhw is hardware_info which is optional according to a comment. The audio appears to be speex, x-speex-with-header-byte:
// Encode the frame and place the size of the frame as the first byte. This
// is the packet format for MIME type x-speex-with-header-byte.
It looks like it would be pretty trivial to modify the chrome code to use in your own app.
Update:
You also need to get a speech recognition API key and they are limited to 50 requests per day. There is no way to increase that limit - not even by paying.
There is an experimental fork of speexenc that can encode x-speex-with-header-byte MIME binary format, its referenced on the QXIP Wiki and is available on GitHub. Does the job fine by placing the size of the frame as the first byte of packets.
They are using their own API for speech recognition. Ex: sending a post request to there servers.
Speech recognition is a proposal by Google. https://docs.google.com/View?id=dcfg79pz_5dhnp23f5
The feature ships with Chrome 8+ and it looks like it sends the data to google servers to perform the actual recognition.
This feature now works on chrome 11 beta.
check this out..
http://slides.html5rocks.com/#speech-input
This might be of interest https://github.com/taf2/speech2text ruby bindings for the google speech to text API
Yes, Chrome does have built-in speech support through WebKit; just look at the Google homepage (which now has a microphone to the right of the search box). I wonder, however, if the Chrome team is working on Omnibox speech support. After all, Chrome is a WebKit-based browser!
I just confirmed this on my Chrome Cr-48, it works.
There is also a working group that produced http://www.w3.org/TR/xhtml+voice/ but I don't believe this is implemented in any browser except Opera.