HTML audio

This is an old revision of this page, as edited by Spencerk (talk | contribs) at 20:31, 28 January 2012 ((edited with ProveIt)). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

HTML5 Audio is a subject of the HTML5 draft specification, investigating the playing, generating and synthesising audio in the browser. It includes audio input, playback, audio synthesis, as well as speech to text.

<Audio> element

Simple playback of an audio file:

<audio src="http://developer.mozilla.org/@api/deki/files/2926/=AudioTest_(1).ogg" autoplay>
  Your browser does not support the audio element.
</audio>

This table documents the current support for audio codecs by the <audio> element.

Trident Gecko WebKit Presto
Ogg Vorbis No 1.9.1 Depends 2.5
WAV PCM 525 2.0
MP3 5.0[1] No[2] Depends
AAC No
Speex No No[3] Depends No

Audio Data API

The current HTML5 media API provides ways to play and get limited information about audio and video, but gives no way to programatically access or create such media. The Audio Data API allows web developers to read and write raw audio data.[4] It intends to allow real-time audio processing in javascript.

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. [5] 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:[6]

  • Speech Input API
  • Text to Speech API

Google integrated this feature into Google Chrome on March 2011.[7] Letting its users search the web with their voice by doing:

 <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

  1. ^ Branscombe, Mary (2010-03-16), Microsoft previews Internet Explorer 9, TechRadar UK
  2. ^ Bug 562730 - Reproducing Mp3 files with html5, Mozilla
  3. ^ Bug 476752 - support the speex voice codec in <audio> and <video> elements, Mozilla
  4. ^ "Audio Data API". Retrieved January 28, 2012.
  5. ^ "API draft". Retrieved January 28, 2012.
  6. ^ "HTML5 Spech API". Retrieved January 28, 2012.
  7. ^ "Talking to your computer". Retrieved January 28, 2012.