HTML audio: Difference between revisions
Tassedethe (talk | contribs) m WPCleaner v1.14 - Repaired 1 link to disambiguation page - (You can help) - Wired, 1 to be fixed - Speech to text |
|||
Line 4: | Line 4: | ||
==<Audio> element== |
==<Audio> element== |
||
Simple playback of an audio file: |
Simple playback of an audio file: |
||
<audio src="http://developer.mozilla.org/@api/deki/files/2926/=AudioTest_(1).ogg" autoplay/> |
|||
This table documents the current support for audio codecs by the <code><audio></code> element. |
This table documents the current support for audio codecs by the <code><audio></code> element. |
Revision as of 18:46, 26 August 2012
HTML |
---|
Comparisons |
HTML5 Audio is a subject of the HTML5 draft specification, investigating audio input, playback, synthesis, as well as speech to text in the browser.
<Audio> element
Simple playback of an audio file: <audio src="http://developer.mozilla.org/@api/deki/files/2926/=AudioTest_(1).ogg" autoplay/>
This table documents the current support for audio codecs by the <audio>
element.
Ogg Vorbis | WAV PCM | MP3 | AAC | Speex | |
---|---|---|---|---|---|
Trident (Internet Explorer) | No | No | 5.0[1] | 5.0[1] | No |
Gecko (Firefox) | 1.9.1 | 1.9.1 | No[2] | No | No[3] |
WebKit (Safari,Chrome) | Depends | 525 | 525 | 525 | Depends |
Presto (Opera) | 2.5 | 2.0 | Depends | Depends | No |
Web Audio APIs
The Web Audio API specification developed by Google describes a high-level JavaScript API for processing and synthesizing audio in web applications. The primary paradigm is of an audio routing graph, where a number of AudioNode objects are connected together to define the overall audio rendering. The actual processing will primarily take place in the underlying implementation (typically optimized Assembly / C / C++ code), but direct JavaScript processing and synthesis is also supported.[4] Google's Chrome browser implements this API since version 14, released in 2011.[5]
Mozilla's Firefox browser implements a similar Audio Data API extension since version 4, released in 2011, but Mozilla warns it is non-standard and deprecated.[6] Some JavaScript audio processing and synthesis libraries such as Audiolet support both APIs.
The W3C Audio Working Group is also considering the MediaStream Processing API specification developed by Mozilla.[7] In addition to audio mixing and processing, it covers more general media streaming, including synchronization with HTML elements, capture of audio and video streams, and peer-to-peer routing of such media streams.[8]
Speech API
The Speech API aims to provide an alternative input method for web applications (without using a keyboard). With this API, developers can give web apps the ability to transcribe your voice to text, from your computer's microphone. The recorded audio is sent to speech servers for transcription, after which the text is typed out for you. The API itself is agnostic of the underlying speech recognition implementation and can support both server based as well as embedded recognizers. [9] The HTML Speech Incubator group has proposed the implementation of audio-speech technology in browsers in the form of uniform, cross-platform APIs. The API contains both:[10]
- Speech Input API
- Text to Speech API
Google integrated this feature into Google Chrome on March 2011.[11] Letting its users search the web with their voice with code like:
<script type="text/javascript"> function startSearch(event) { event.target.form.submit(); } </script> <form action="http://www.google.com/search"> <input type="search" name="q" speech required onspeechchange="startSearch"> </form>
See also
References
- ^ a b Branscombe, Mary (2010-03-16), Microsoft previews Internet Explorer 9, TechRadar UK
- ^ Bug 562730 - Reproducing Mp3 files with html5, Mozilla
- ^ Bug 476752 - support the speex voice codec in <audio> and <video> elements, Mozilla
- ^ Chris Rogers (2012-03-15). "Web Audio API". W3C. Archived from the original on 2012-03-15. Retrieved 2012-07-04.
- ^ Scott Gilbertson (2011-09-19). "Chrome 14 Adds Better Audio, 'Native Client' Support". Webmonkey. Wired. Retrieved 2012-07-04.
- ^ "Introducing the Audio API extension". Mozilla Developer Network. Mozilla. 2012-03-05. Archived from the original on 2012-03-05. Retrieved 2012-07-04.
- ^ "Audio Processing API". W3C. 2011-12-15. Archived from the original on 2011-12-15. Retrieved 2012-07-04.
- ^ Robert O'Callahan (2012-05-31). "MediaStream Processing API". W3C. Retrieved 2012-07-04.
- ^ "API draft". Retrieved January 28, 2012.
- ^ "HTML5 Speech API". Retrieved January 28, 2012.
- ^ "Talking to your computer". Retrieved January 28, 2012.