From Microformats Wiki
haudio /
Revision as of 20:28, 8 May 2007 by Wojciech (talk | contribs) (Work Title)
Jump to navigation Jump to search

hAudio 0.3

hAudio is a simple, open, distributed format, suitable for embedding information about audio recordings in (X)HTML, Atom, RSS, and arbitrary XML. hAudio is one of several microformats open standards.

hAudio Microformat Draft Specification

Manu Sporny, Bitmunk - Digital Bazaar, Inc.
Manu Sporny, Bitmunk - Digital Bazaar, Inc.
Martin McEvoy
Alexandre Van De Sande
Michael Johnson
Dave Longley

Microformats #Copyright and #Patents statements apply.


It is difficult for a browser to extract semantic information about an audio recording described on a web page. Metadata such as speaker, musician, publisher, label, title of the work, release date, acquisition link, related image artwork and tags provide relevant context for the audio recording.

Having such information marked up can provide a number of benefits to the viewer. If a web browser understands that a particular web page contains a song performed by an artist, it can produce richer interactions. For example, specific searches may be performed for artists and songs via general search services such as Google and Wikipedia. Specific search services may also be queried such as MusicBrainz, The Internet Archive, FreeDB, or Bitmunk. Additionally, classification by crawlers can become more accurate. If there are 20 tracks found on a page done by the same artist, and that content consumes a significant portion of the page, it can be assumed that the page is not only about music, but also about a particular artist.

In order to enable and encourage the sharing, distribution, syndication, and aggregation of audio content, the authors propose the hAudio microformat, an open standard for distributed audio metadata. The authors have researched both numerous audio-info-examples in the wild and earlier attempts at audio-info-formats, and have designed hAudio around a simple minimal schema for audio content. Feedback is encouraged on the hAudio feedback page.

Inspiration and Acknowledgments

Many thanks to the various individuals that did research and proposed ideas and discussion related to media info and audio info in general. Among the many participants are RodBegbie, Dean Hudson, Tantek Çelik, Mary Hodder, Joshua Kinberg, ChrisMessina, and Lisa Rein.


Audio content consistently share several common fields. Where possible hAudio has been based on this minimal common subset.

Out of scope

Fields that are type-specific have been omitted from hAudio. It is important that hAudio be kept simple and minimal from the start. Additional features can be added as deemed necessary by practical implementation experience.

The concept of a universal audio identifier, that is, how to identify the same audio album, song, speech, or podcast across different music and audio sites, though something very useful to have, is outside the scope of this format.

Semantic XHTML Design Principles

Note: the Semantic XHTML Design Principles were written primarily within the context of developing hCard and hCalendar, thus it may be easier to understand these principles in the context of the hCard design methodology (i.e. read that first). Tantek

XHTML is built on XML, and thus XHTML based formats can be used not only for convenient display presentation, but also for general purpose data exchange. In many ways, XHTML based formats exemplify the best of both HTML and XML worlds. However, when building XHTML based formats, it helps to have a guiding set of principles.

  1. Reuse the schema (names, objects, properties, values, types, hierarchies, constraints) as much as possible from pre-existing, established, well-supported standards by reference. Avoid restating constraints expressed in the source standard. Informative mentions are ok.
    1. For types with multiple components, use nested elements with class names equivalent to the names of the components.
    2. Plural components are made singular, and thus multiple nested elements are used to represent multiple text values that are comma-delimited.
  2. Use the most accurately precise semantic XHTML building block for each object etc.
  3. Otherwise use a generic structural element (e.g. <span> or <div>), or the appropriate contextual element (e.g. an <li> inside a <ul> or <ol>).
  4. Use class names based on names from the original schema, unless the semantic XHTML building block precisely represents that part of the original schema. If names in the source schema are case-insensitive, then use an all lowercase equivalent. Components names implicit in prose (rather than explicit in the defined schema) should also use lowercase equivalents for ease of use. Spaces in component names become dash '-' characters.
  5. Finally, if the format of the data according to the original schema is too long and/or not human-friendly, use <abbr> instead of a generic structural element, and place the literal data into the 'title' attribute (where abbr expansions go), and the more brief and human readable equivalent into the element itself. Further informative explanation of this use of <abbr>: Human vs. ISO8601 dates problem solved


In General

The hAudio format is based on a set of fields common to numerous audio content sites and formats in use today on the web. Where possible field names have been chosen based on those defined by the related hCard standards.


The hAudio schema consists of the following:

tracks, songs, and parts in general are specified by embedding hAudio's inside of hAudios and using the ideas put forth in grouping-brainstorming and grouping-proposal. Defining parts of an hAudio will not be complete without a complete grouping draft/specification.

Field details

The fields of the hAudio schema represent the following:


An hAudio is used to identify and describe metadata associated with a particular audio recording.

  • an hAudio element is identified by class name haudio
  • hAudio content may contain other hAudios. This is most prevalent when describing Audio Albums. The outermost container is an hAudio describing an album, while the inner hAudios are the tracks in the album.

Formatted Name

The Formatted Name of an audio recording is a short textual description used to identify the work among interested parties. This is also referred to as the title of the work. This can be the title of a speech, album title, song title, or short description regarding a sound effect.

  • The element is identified by the class name fn.
  • hAudio MUST have a Formatted Name.


A Contributor is any entity that takes part in the creation and distribution of an audio recording. Examples include: artist, publisher, guitarist, vocalist, violinist, lead singer, backup singer, bassist, drummer, manager, and roadie.

  • The element is identified by the class name contributor.
  • hAudio MAY include one or more contributors.
  • The contents of the element must include a valid hCard 1.0 Microformat.
  • The role field should be used to specify the Contributor's responsibility related to the audio recording.
  • If multiple Contributors are specified without role specifications, it may be assumed that the first role mentioned is the creator.

Published Date

The Published Date specifies the date that the audio recording was made available to the public. Examples include: The airing date of a radio broadcast, the day a speech was given, or the day a music album was made available for sale.

  • The element is identified by the class name published-date.
  • hAudio MAY include one or more published-dates.
  • The contents of the element must include a date format compliant with the Datetime Design Pattern.


A Sample URL specifies from where an excerpt of the audio recording may be retrieved.

  • The element is identified by a URL fitting the rel-design-pattern, the rel content being sample.
  • hAudio MAY include one or more URL samples.
  • The URL SHOULD point to a directly accessible stream or file.
  • The type of the sample MAY be specified by using the type specifier for a URL.


An Acquire URL specifies from where the full version of an audio recording may be retrieved. The URL can point to a process required (such as purchasing) that must be completed to acquire the audio recording.

  • The element is identified by a URL with the class name as acquire.
  • hAudio MAY include one or more acquire URLs.
  • The type of the file MAY be specified by using the type specifier for a URL.

Image Summary

An Image Summary specifies an image that should be used to summarize the audio recording. Examples include: the image of a speaker, an audio album cover image, and a picture from a concert.

  • The element is identified by the class name image-summary.
  • hAudio MAY include one or more image-summary images.
  • The contents of the element must be wrapped in the <img> tag.


The Category specifies the genre or style used to classify the audio recording. Examples include: blues, rock, motivational, spoken word, or sound effect.

  • The element is identified by the class name genre.
  • hAudio MAY include one or more genres.


The Duration specifies the length in time of the audio recording in seconds. Examples include: 104 seconds, 3:23, and 4 minutes.

  • The element is identified by the class name duration.
  • hAudio MAY include one duration element.
  • The contents of the element SHOULD use the abbr design pattern whose title attribute contains an ISO-8601 formatted duration, specifically in seconds. This allows us to expand into specifying time slices and other time markup in the future, but keep parsing simple for now. An example of 3:23 (203 seconds) would be "P203S" in ISO 8601 format. Currently, all abbr attributes specifying duration SHOULD be in seconds.


The Price specifies the amount of currency that must be exchanged for acquisition of a full specimen of the audio recording. Examples include: One Dollar, $2, and £4.

  • The element is identified by the class name price.
  • hAudio MAY include one or more price elements.
  • The contents of the element SHOULD use the currency-proposal.

Grouping (Albums, Songs, and Tracks)

hAudio defines a method to specify albums, songs and tracks. The grouping and xoxo Microformats are used to provide the concept of sets, collections, groups and lists. Use of these two Microformats allow for the creation of Albums, Podcasts, Multi-part speeches, and relationships between audio recordings.

  • A group is identified by using the grouping Microformat with the hAudio class.
  • hAudio MAY encapsulate one or more haudio class tags.
  • Grouping information between hAudio is specified using the grouping Microformat (and only the grouping Microformat).
  • Sets that require a particular order (aka: Lists) must use the xoxo Microformat to define that order.

More Semantic Equivalents

For some properties there is a more semantic equivalent, and therefore they get special treatment, e.g.:

  • For any "url", use <a class="url" href="...">...</a> inside the element with the class name 'haudio' in hAudio.
  • And for "image-summary", use <img class="image-summary" src="..." alt="Photo of ..." />


  • To explicitly convey the natural language that an hAudio is written in, use the standard (X)HTML 'lang' attribute on the element with class="haudio", e.g. <div class="haudio" lang="en"> ... </div> If portions of an hAudio (e.g. the item name) are in a different language, use the 'lang' attribute on those portions.
  • hAudio processors which need to handle the language of reviews MUST process the standard (X)HTML 'lang' attribute as specified.

Human vs. Machine Readable

If an <abbr> element is used for a property, then its 'title' attribute is used for the value of the property, instead of the contents of the element, which can then be used to provide a user-friendly alternate presentation of the value.

Similarly, if an <img /> element is used for one or more properties, it MUST be treated as follows:

  1. For the "image-summary" property and any other property that takes a URL as its value, the src="..." attribute provides the property value.
  2. For other properties, the <img /> element's 'alt' attribute is the value of the property.


This section is informative.

  • By marking up audio content with the hAudio microformat, the expectation is communicated that information about the content MAY be indexed. This has no impact on the copyright of the content itself which the publisher may explicitly specify using rel="license" as specified above.
  • The enumerated list of item types is under development and may be extended.
  • Each type may have custom hAudio fields that follow the common set.
  • Additional details about a particular item should be specified with the rest of the item's info at the URL provided for the item.

XMDP Profile

<dl class="profile">
  <a rel="help" href="http://www.w3.org/TR/html401/struct/global.html#adef-class">
   HTML4 definition of the 'class' attribute.</a>
  This meta data profile defines some 'class' attribute values (class names) 
  and their meanings as suggested by a 
  <a href="http://www.w3.org/TR/WD-htmllink-970328#profile">
   draft of "Hypertext Links in HTML"</a>.
    Used to identify and describe metadata associated with a particular audio recording.
    A short textual description used to identify an audio recording among interested parties.
    An entity that takes part in the creation and distribution of an audio recording.
    The date that the audio recording was made available to the public.
    An image that should be used to summarize the audio recording.
    The genre or style used to classify the audio recording.
    The length of the audio recording.
    The amount of currency that must be exchanged for acquisition of a full specimen of the audio recording.


Here are a few examples of audio content from current web sites, and how they could be easily enhanced to support the hAudio audio metadata microformat.

Want to write valid hAudio? Use the hAudio creator (not implemented yet) to write about audio content and publish it on your blog.

Simple Song Example


Start Wearing Purple by Gogol Bordello

Microformatted XHTML:

<div class="haudio">
   <span class="fn">Start Wearing Purple</span> by 
   <span class="collaborator hcard fn">Gogol Bordello</span>

Speech Example


I Have a Dream, a speech by Martin Luther King Jr.

Microformatted XHTML:

<div class="haudio">
   <span class="fn">I Have a Dream</span>, a 
   <span class="category">speech</span> by 
   <span class="collaborator hcard fn">Martin Luther King Jr.</span>

Audio Album Example


Black Horse and The Cherry Tree by KT Tunstall

  1. Black Horse & The Cherry Tree
  2. One Day [Live]

Microformatted XHTML:

<div class="haudio grouping.ktsampler">
 <span class="title">Black Horse and The Cherry Tree</span> by
 <span class="collaborator hcard fn">KT Tunstall</span>
 <ol class="xoxo">
   <div class="haudio grouping.ktsampler.bh">
    <span class="fn">Black Horse & The Cherry Tree</span>
  <div class="haudio grouping.ktsampler.od">
   <span class="fn">One Day [Live]</span>

Podcast Example


BBC Today Podcasts for Saturday, 28 April 2007.

Microformatted XHTML:

<div class="haudio grouping.today-podcast">
 <span class="fn">BBC Today Podcasts</span> for 
 <abbr class="published-date" title="20070428">Saturday, 28 April 2007</span>.

  <div class="haudio grouping.today-podcast.810-interview">
   <span class="fn">8.10 Interview</span> - 
   Nottingham has become pivotal in the local elections.
    <li><a class="acquire" href="http://downloads.bbc...-0810_40_st.mp3">Download 8.10 Interview</a></li>
    <li><a href="http://downloads.bbc...today/rss.xml">Add to RSS</a>
  <div class="haudio grouping.today-podcast.the-today-lead-interviews">
   <span class="fn">The Today Lead Interviews</span> - 
   The Today Programme morning briefing, ten to eight and half past eight interviews.
    <li><a class="acquire" href="http://downloads.bbc...-0900_40_st.mp3">Download the Today Lead Interviews</a></li>
    <li><a href="http://downloads.bbc...today/rss.xml">Add to RSS</a>
  <div class="haudio grouping.today-podcast.bbc-radio-newspod">
   <span class="fn">BBC Radio NewsPod</span> - 
   Daily programme highlights from across BBC Radio News.
    <li><a class="acquire" href="http://downloads.bbc...-1800_40_st.mp3">Download BBC Radio NewsPod</a></li>
    <li><a href="http://downloads.bbc...today/rss.xml">Add to RSS</a>

Complex hAudio Example


Examples in the wild

This section is informative.


This section is informative.

See hAudio Implementations.


Normative References

Informative References

Similar Work


This document and specification is distributed under a Creative Commons Attribution 3.0 license. It is licensed and can be used royalty-free for any purpose.

The authors intend to submit this specification to a standards body with a liberal copyright/licensing policy such as the GMPG (http://gmpg.org/), IETF (http://ietf.org/), and/or W3C (http://w3.org). Anyone wishing to contribute should read each organizations copyright principles, policies and licenses (e.g. the GMPG Principles (http://gmpg.org/principles)) and agree to them, including licensing of all contributions under all required licenses (e.g. CC-by 1.0 (http://creativecommons.org/licenses/by/1.0/) and later), before contributing.


The authors of this Microformat have not and will not apply for patents covering any invention covering this Microformat in part or as a whole. There are no claims to any patent in this document. Each author is required to report any known patent issues immediately under this section.

This document and specification is distributed under a royalty free patent policy, e.g. per the W3C Patent Policy (http://www.w3.org/Consortium/Patent-Policy-20040205/), and IETF RFC3667 (http://www.ietf.org/rfc/rfc3667.txt) & RFC3668 (http://www.ietf.org/rfc/rfc3668.txt).

Work in progress

This specification is a work in progress. As additional aspects are discussed, understood, and written, they will be added.

Further Reading

Mailing List Discussion

See also

Related Pages