How to do text to speech on Chrome using JavaScript without any use of extensions or plugins? For Firefox and IE it's working great. I don't know how to do it for Chrome. The hard part is to do it without any plugins and extensions in JavaScript?
You can use this jQuery function to do speech to text (but not text to speech).
$(document).find(':input[type=text]').attr('x-webkit-speech', "x-webkit-speech");
BTW: this only works in Chrome and not any other browsers
As far as I understand it, you can't simply embed Javascript into a page to provide this at the moment. You'll need to develop an extension, as chrome provides APIs but they require extension-level permissions: http://googlecode.blogspot.com/2011/10/new-text-to-speech-api-for-chrome.html
The only other alternative I see is completely writing your own library using the Google audio API (part of chromium) that converts text into speech using FFT synthesis, and that could take years. The documentation for that API is here: http://chromium.googlecode.com/svn/trunk/samples/audio/index.html
Related
I noticed this today in my Chrome.
Google Meet is showing a chart of CPU usage in their "Troubleshooting" panel. I'm wondering if there's an existing API for this or is it a clever trick I'm not aware of.
I was curious about this as well when I saw the CPU Usage graph on the Troubleshooting page on the Google Meet's page. So googled a lot and I couldn't find any proper answer as to how it is being achieved apart from this link: https://developer.chrome.com/extensions/system_cpu#method-getInfo.
So, I went through the minified source code of the Google Meet's site and it turns out Google Meet is using this but not on their webpage directly, because it is for chrome extensions only, but through the Google Hangouts Extension which is present in Chrome, Brave and the new Microsoft Edge (Chromium-based).
The chrome extension is calling the chrome.system.cpu API to get the information about the processor, core count, temperatures, etc., and these details are being passed to the Google Meets page via window.postMessage API and Message Passing between Chrome Extension and a Webpage.
This is a neat little way to achieve this if you are the creator of the browser :P.
Most probably, they are using Chrome specific API since this will not work on other browsers.
The closest thing that I've found is https://developer.chrome.com/extensions/system_cpu#method-getInfo
Below is a screenshot from Firefox stating that this will work only on Chrome.
I am implementing an web application that convert recorded audio to text that can run in chrome and Mozilla Firefox browsers. There are many api's that can be run only in chrome. I am not able to find such api or library that can be implemented in both. I am implementing my application in J2EE.
So can anybody tell me if this can be done using JavaScript or Java.
Im trying to develop an javascript based audio editor. It should be possible to record, play and edit an audio file with. Its especially important to visualize the recording audio (realtime) and the selected/uploaded audio file (both of them).
I red alot about the Web-Audio-API and saw a few examples as well, but there are some problems - it only works in chrome/safari so far, it should be run on firefox as well, but it doesnt. So what Im looking for is an crossbrowser API or javascript/jquery libary which provides the called features.
Here are some examples to show u what I mean:
http://plucked.de/ (great tool, but there are many bugs as well)
http://www.stud.fit.vutbr.cz/~xmyler00/audiee/ (as u can see web audio API doesnt work on firefox)
The Web-Audio-API is a fairly new standard and is steadily being adopted by the major browsers with varying levels of support. Currently Chrome and Safari have the best support and Firefox support is in it's draft stage. For the sort of application, with cross browser support, that you're wanting you will need to go to third party plugins/extensions/addons for the support you're after.
Welcome to the bleeding edge. :)
I'm trying both greasemonkey and Google's Chrome extensions. And found that Chrome seems to be using the same API names as GM. (I seem to be having the same bug...)
Just wondering whether greasemonkey is already a Google Chrome extension?
Yes, I believe you can just add Greasemonkey scripts and Chrome installs them as an 'extension' like all the other native extensions.
Checkout this article:
http://lifehacker.com/5461675/chrome-4-supports-greasemonkey-userscripts-without-an-extension
Note, however that some scripts seem to be supported on GreaseMonkey for Firefox only and can be a little buggy in Chrome. I'm not sure of the exact differences in implementation.
Simon.
#Simon pretty much hit it, but I wanted to make sure that this point is super-clear.
Google Chrome supports Greasemonkey scripts natively, using the same API so as to make existing scripts compatible. There's no Greasemonkey extension required.
Yes, Chrome supports userscripts but not fully as Greasemonkey. For example check out this userscript
Docs Online Viewer: http://userscripts.org/scripts/show/127774
It works well with Greasemonkey (in Firefox) but not with Chrome natively. There are many Greasemonkey functions that Chrome does not support yet.
I copy and paste a post from GreaseMonkey:
There is no greasemonkey extension for google chrome. What actually happened is chromium (the project which google chrome is based) developed it's own extension system and one component of that extension mechanism (probably inspired heavily by greasemonkey in the first place) works in almost exactly the same way (an external javascript interacting with a page purely through it's DOM) as greasemonkey. The chromium system uses a completely different api but effectively does the same thing. This large overlap in purpose and functionality combined with the popularity of greasemonkey on firefox meant they decided to implement the greasemonkey api (the majority of it anyway) natively within chromium. From there they went one step further and had the browser automatically wrap any greasemonkey scripts inside a chromium extension automatically and effectively made greasemonkey scripts a first class citizen.
I have to create a plug-in that will have to display information when user hovers over certain terms. Can anyone show me the direction how to do it?
I do not have much ideas about creating plug-ins. I know what i want to do can be done by java script. But can a java script file be installed as a browser plug in? any ideas on this will be appreciated! Thanks!
What you want to do is create a userscript. It's exactly what you're describing: a piece of javascript code installed in the browser as a plugin.
Userscripts are supported:
By Firefox using Greasemonkey
By IE with its own version of Greasemonkey
Natively (soon) by Google Chrome
Natively by Opera
And even by Safari
So support is on almost every major browser.
A userscript is the easiest solution for what you're trying to do.
Kango's Content Scripts are similar to userscripts, with perhaps better support for all browsers, and the extension (and thus also the user script) can be installed with one click if self-hosted instead of installing Greasemonkey separately.