The new JavaScript Web Speech API makes it easy to add speech recognition to your web pages. This API allows fine control and flexibility over the speech recognition capabilities in Chrome version 25 and later. Here's an example with the recognized text appearing almost immediately while speaking. Let’s take a look under the hood. First, we check to see if the browser supports the Web Speech API by checking if the webkitSpeechRecognition object exists. If not, we suggest the user upgrades their browser. Lastly, we create the webkitSpeechRecognition object which provides the speech interface, and set some of its attributes and event handlers. The default value for continuous is false, meaning that when the user stops talking, speech recognition will end. This mode is great for simple text like short input fields. In this demo, we set it to true, so that recognition will continue even if the user pauses while speaking.
The default value for interimResults is false, meaning that the only results returned by the recognizer are final and will not change. The demo sets it to true so we get early, interim results that may change. Watch the demo carefully, the grey text is the text that is interim and does sometimes change, whereas the black text are responses from the recognizer that are marked final and will not change. We set the spoken language for the speech recognizer "lang" to the BCP-47 value that the user has selected via the selection drop-down list, for example “en-US” for English-United States. If this is not set, it defaults to the lang of the HTML document root element and hierarchy. Chrome speech recognition supports numerous languages (see the “langs” table in the demo source), as well as some right-to-left languages that are not included in this demo, such as he-IL and ar-EG. After setting the language, we call recognition.start() to activate the speech recognizer.
Once it begins capturing audio, it calls the onstart event handler, and then for each new set of results, it calls the onresult event handler. ’s possible that all interim results have changed since the last onresult event. Index and only append any new final text. That’s it! The rest of the code is there just to make everything look pretty. It maintains state, shows the user some informative messages, and swaps the GIF image on the microphone button between the static microphone, the mic-slash image, and mic-animate with the pulsating red dot. The mic-slash image is shown when recognition.start() is called, and then replaced with mic-animate when onstart fires. Typically this happens so quickly that the slash is not noticeable, but the first time speech recognition is used, Chrome needs to ask the user for permission to use the microphone, in which case onstart only fires when and if the user allows permission. Pages hosted on HTTPS do not need to ask repeatedly for permission, whereas HTTP hosted pages do.
Globalization is a hot buzzword in the media right now, and for good reason. Many corporations are have operations worldwide. A large company might have offices on multiple continents. And some large companies are making unprecedented alliances with competitors. While face-to-face interactions still play an important role in conducting business, it's just not possible to limit all collaborative projects to personal meetings. That's why many companies are looking into online collaboration. Online collaboration uses the Internet as a common meeting and work space. Instead of sitting in a physical conference room, employees access virtual work environments. That work space might be a shared database in which employees can store and access data in a collaborative way, or it might be as complex as a full-fledged virtual environment. They save their work in a shared database, and everyone works from the same files and data. Not only are there technical challenges that companies must address when investing in online collaboration, but there are also social concerns.
The way people collaborate in an online environment may be very different from how that same group of people would work together if they were in the same room. The situation is even more complicated if two different companies wish to collaborate on a project together. Both companies must work to get beyond the competitive mentality. Some corporate executives view business deals with the perspective that their own company must benefit as much as possible, while the other company shouldn't benefit much at all. That attitude doesn't bode well for collaborative projects. When applied correctly, online collaboration can streamline complicated situations. Whether companies purchase off-the-shelf project management software or commission their own unique applications, they can use these tools to simplify teamwork and increase productivity. What are the benefits of online collaboration? Keep reading to find out. At its most basic level, collaboration is when two or more people combine efforts to accomplish a task for their mutual benefit.
|