haudio: Difference between revisions

From Microformats Wiki
Jump to navigation Jump to search
(→‎Examples in the wild: my bad; sorry)
(audio (orphan))
Line 585: Line 585:
== Related Pages ==
== Related Pages ==
{{haudio-related-pages}}
{{haudio-related-pages}}
* [[audio]] (other pages about Audio on this wiki)

Revision as of 20:31, 28 January 2008

hAudio 0.8

604867362_da0921136a_o.png

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. This page and Microformat is in the public domain.

hAudio Microformat Draft Specification

Editor
Manu Sporny, Bitmunk - Digital Bazaar, Inc.
Contributors
Manu Sporny, Bitmunk - Digital Bazaar, Inc., Martin McEvoy , Alexandre Van De Sande , Michael Johnson, Dave Longley, Brian Suda, Ben Wiley Sittler, Scott Reynen, Frances Berriman, James Craig, David Janes, Andy Mabbett, Danny Ayers, Rudy Desjardins, Edward O'Connor, Ryan King, Chris Griego, Brad Hafichuk, Tantek Çelik, Colin Barrett, Joe Andrieu, Michael Smethurst, Chris Newell, Julian Stahnke, Justin Maxwell, Paul Wilkins

Microformats #Copyright and #Patents statements apply.

Introduction

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.

Scope

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.

Format

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.

Schema

The hAudio schema consists of the following:

  • hAudio (haudio)
    • fn and/or album required. text.
    • contributor. optional. using text or hCard.
    • duration. optional. ISO-8601 time duration using abbr-design-pattern (re-used from hcalendar).
    • item optional. using text or multiple properties from hAudio.
    • position optional. text.
    • category. optional. text.
    • published. optional. using datetime-design-pattern.
    • photo. optional. using any element containing a URL, such as IMG.
    • description optional. text.
    • sample (rel). optional. sample file/stream using rel-design-pattern with sample as the mf-rel-value.
    • enclosure (rel). optional. full download of file using rel-enclosure.
    • payment (rel). optional. link to purchase process using rel-payment.
    • price. optional. using text or currency-proposal.

Field details

The fields of the hAudio schema represent the following:

hAudio

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

  • an hAudio element is identified by class name haudio

Formatted Name

The title of a single audio recording is a short textual description used to identify the work among interested parties. This can be the title of a speech, song title, or short description regarding a sound effect.

  • The element is identified by the class name fn.
  • hAudio MUST have fn and/or album.

Album

The title of a collection of audio recordings, such as those that are represented as a CD, album or LP. The text should be a short textual description used to identify the work among interested parties.

  • The element is identified by the class name album.
  • hAudio MUST have either album or fn or both.

Item

A container for another hAudio item, which MUST be considered a part of the parent audio recording. An example of an item that is part of an hAudio would be a track in an audio album, a aria in an Opera, or a section of a podcast.

  • The element is identified by the class name item.
  • hAudio MAY have one or more items.
  • The element MUST be processed opaquely. No sub-elements should be read from any hAudio contained in a track element.
  • The contents of the element MUST be marked up using properties in hAudio.

Position

The position is used to describe the position of the hAudio item in a list. Examples of hAudio lists can include album track listings, music top 10 lists, playlists, and podcast chapters.

  • The element is identified by the class name position.
  • hAudio MAY include one position element.
  • The contents of the element MUST be a number or other sequential identifier.

Contributor

A Contributor is any entity that takes part in the creation and distribution of an audio recording. Examples include: artist, composer, 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 SHOULD include a valid hCard microformat.
    • The role attribute SHOULD be used to specify the contributor's responsibility related to the audio recording if hCard is utilized.
  • The contents of the element MAY be specified in plain-text.
  • If multiple contributors are specified, without role specifications, it MAY be assumed that the first role mentioned is the primary artist or creator. This applies to plain-text contributor markup as well.

Published

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.
  • hAudio MAY include one or more published elements.
  • The contents of the element MUST include a date format compliant with the datetime-design-pattern.

Sample

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

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

Full Download (Enclosure)

A Full Download URI specifies from where the full version of an audio recording may be retrieved. The URI MUST point to a direct link to a file retrieval process (FTP, HTTP, BitTorrent URI, etc).

  • The element is identified by a URI fitting the rel-design-pattern, the rel content being enclosure.
  • hAudio MAY include one or more enclosure URIs.
  • The type of the file MAY be specified by using the type specifier for a URI.

Purchase (Payment)

A Purchase URI specifies from where the full version of an audio recording may be purchased. The URI MUST point to the beginning of a purchase process for the hAudio.

  • The element is identified by a URI fitting the rel-design-pattern, the rel content being payment.
  • hAudio MAY include one or more payment URIs.
  • The type of the file MAY be specified by using the type specifier for a URI.

Photo

A photo specifies an image that should be used to summarize the audio recording. Examples include: the image of a speaker, an audio album cover image, or a picture from a concert.

  • The element is identified by the class name photo.
  • hAudio MAY include one or more photo elements.
  • The element SHOULD use an <img> element.
  • The element MAY use any other element that contains a URL, such as <a> or <object>, but it is not recommended.

Category

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 category.
  • hAudio MAY include one or more category elements.
  • This element MAY be expressed using the rel-tag elemental microformat. When a category is expressed using rel-tag, the content of the element is used as the text for the category. For example: <a class="category" rel="tag" href="/tags/symphony">Symphonic</a> would have "Symphonic" as the text for the category.

Duration

The Duration specifies the length in time of the audio recording. 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. An example of 3:23 (i.e 3 minutes 23 seconds) would be "PT3M23S" in ISO 8601 format.

Price

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.
  • The contents of the element MAY also use plain text with a currency symbol.

Description

An explanation of the contents of the hAudio item. This could explain the significance of a speech, the full-text description of a sound effect, or the meaning of a song or album.

  • The element is identified by the class name description.
  • hAudio MAY include one or more description elements. If more than one description element is defined, the full description for the hAudio is the concatenation, in order, of all description elements.

Parser Processing Notes

  • It is important to understand that ITEM is an opaque element. When processing the ITEM element, none of the properties of the child hAudio should be pulled into the parent hAudio. However, it is recommended that child hAudio SHOULD inherit the following parent hAudio properties, if they are not specified on the child:
    • album
    • contributor
    • category
    • published
    • photo

More Semantic Equivalents

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

  • For "photo", use <img class="photo" src="..." alt="" />
  • If only 'album' is specified, then the hAudio is an album.
  • If only 'fn' is specified, then the hAudio is a song, audio track, sound effect, speech, or other atomic/singular work.
  • If both 'album' and 'fn' are specified, then the hAudio is a atomic/singular work that is part of an album.
    • Example: <span class="haudio">Side two of <span class="album">Meddle</span> opens with <span class="fn">One of These Days</span></span>
  • If 'fn' and one or more 'items's are specified, the hAudio is an audio recording containing multiple sections. Each item is assumed to be an hAudio that is part of the parent hAudio. None of the 'item' properties should implicitly be added to the containing hAudio. In other words, the parser shouldn't parse the contents of the 'item' into the higher-level hAudio object.

Language

  • To explicitly convey the natural language that an hAudio is written in, use the standard (X)HTML 'lang' or 'xml:lang' attribute on the element with class="haudio"
    • e.g. <p>I like <span class="haudio" lang="de"><span class="fn">Das Lied von der Erde</span></span> best.</p>
  • If portions of an hAudio (e.g. the item name) are in a different language to the rest of the hAudio, use the 'lang' or 'xml:lang' attribute on those portions.
  • hAudio parsers which need to handle the native language of hAudio MUST process the standard (X)HTML 'lang' or 'xml:lang' attribute as specified.
  • hAudio parsers which need to handle native language MAY traverse up the DOM to discover the native language of the page and apply that to the hAudio if no other language is specified on the hAudio.

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.

If an <a> element is used for one or more properties, it MUST be treated as follows:

  1. For the 'photo' property and any other property that takes a URL as its value, the href="..." attribute provides the property value.
  2. For other properties, the element's content is the value of the property.

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

  1. For the 'photo' 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.

If an <object> element is used for one or more properties, it MUST be treated as follows:

  1. For the 'photo' property and any other property that takes a URL as its value, the data="..." attribute provides the property value.
  2. For other properties, the element's content is the value of the property.

Notes

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.

XMDP Profile

<dl class="profile">
 <dt>class</dt>
 <dd><p>
  <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>.
  <dl>
   <dt>haudio</dt>
   <dd>
    Used to identify and describe metadata associated with an individual audio recording.
   </dd>
   <dt>fn</dt>
   <dd>
    A short textual description used to identify an audio recording among interested parties.
   </dd>
   <dt>album</dt>
   <dd>
    A short textual description used to identify an audio recording that is an album among 
    interested parties.
   </dd>
   <dt>collaborator</dt>
   <dd>
    An entity that takes part in the creation and distribution of an audio recording.
   </dd>
   <dt>published</dt>
   <dd>
    The date that the audio recording was made available to the public.
   </dd>
   <dt>description</dt>
   <dd>
    A verbose description of the audio recording.
   </dd>
   <dt>photo</dt>
   <dd>
    An image that should be used to summarize the audio recording.
   </dd>
   <dt>item</dt>
   <dd>
    Contains a sub-part of the current audio recording, which is marked-up using any element available in hAudio.
   </dd>
   <dt>sample</dt>
   <dd>
    A URI specifying a method of sampling a section of the audio recording.
   </dd>
   <dt>enclosure</dt>
   <dd>
    A URI specifying a method of downloading the complete version of the audio recording.
   </dd>
   <dt>purchase</dt>
   <dd>
    A URI specifying a method of purchase resulting in the acquisition of a complete version of the audio recording.
   </dd>
   <dt>category</dt>
   <dd>
    The genre or style used to classify the audio recording.
   </dd>
   <dt>duration</dt>
   <dd>
    The length of the audio recording.
   </dd>
   <dt>price</dt>
   <dd>
    The amount of currency that must be exchanged for acquisition of a full specimen of the audio recording.
   </dd>
 </dd>
</dl>

Examples

This section is informative.

Here are a few examples of text about, and links to, audio content, from real web sites, showing how they could be easily enhanced to use hAudio.


Simple Song Example

Display:

(This is a live example, detectable in parsers)

Start Wearing Purple by Gogol Bordello

Microformatted XHTML:

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

Speech Example

(This is a live example, detectable in parsers)

Display:

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="contributor">
      <span class="vcard">
         <span class="fn n">
            <span class="given-name">Martin</span>
            <span class="additional-name">Luther</span>
            <span class="family-name">King</span>,
            <span class="honorific-suffix">Jr.</span>
         </span>
      </span>
   </span>
</div>	 

Note the use of hCard.

Song and Album Example

(This is a live example, detectable in parsers)

Display:

Start Wearing Purple by Gogol Bordello found on Underdog World Strike

Microformatted XHTML:

<div class="haudio">
   <span class="fn">Start Wearing Purple</span> by 
   <span class="contributor">
        <span class="vcard">
            <span class="fn org">Gogol Bordello</span>
        </span>
    </span>
   found on
   <span class="album">Underdog World Strike</span>
</div>

Note that for bands, hCard's Implied "organization-name" Optimization is used.

Complete Album Example

An example that uses every element of hAudio:

[Image] Live Phish, Volume 15 by Phish
Released: October 31, 2002
Acquire: Sample, Live Recording, Buy High Quality Track
Category: live
Duration: 145 minutes, 27 seconds
Price: $14.99

Tracks:
1. Sanity (5:48)
2. Highway To Hell (3:39)

Here is the hAudio Microformat markup:

<div class="haudio">
   <img class="photo" src="images/live_phish_vol_15.jpg" alt="" />
   <span class="album">Live Phish, Volume 15</span>
   <span class="contributor">
      <span class="vcard">
         <span class="fn org">Phish</span>
      </span>
   </span>
   <br/>
   Released on:
   <abbr class="published" title="2002-10-31">October 31, 2002</abbr>
   <br/>
   Acquire: 
   <a rel="sample" href="/samples/live_phish_vol_15_sample.mp3">Sample</a>, 
   <a rel="enclosure" href="/live/phish_live_phish_vol_15.mp3">Live Recording</a>,
   <a rel="payment" href="/buy/phish_live_phish_vol_15">Buy High Quality Track</a>
   Category: <a class="category" rel="tag" href="http://www.example.org/tags/live">live</a>
   Duration: <abbr class="duration" title="PT145M27S">145 minutes, 27 seconds</abbr>
   Price: <div class="price"><abbr class="currency" title="USD 14.99">$14.99</abbr></div>
   Tracks:
   <div class="item">
      <span class="position">1</span>.
      <span class="fn">Sanity</span>
      (<abbr class="duration" title="PT5M48S">5:48</abbr>)
    </div>
    <div class="item">
     <span class="position">2</span>.
     <span class="fn">Highway To Hell</span> 
     (<abbr class="duration" title="PT3M39S">3:39</abbr>)
  </div>
</div>

Multi-part Podcast Example

DigitalPlanet Podcast: 29 Oct 07

Forensic computing: is it really possible to delete data from your machine? Grand plans for getting broadband into Africa, checking out the sky at night via the internet and answering your emails to the programme.

Download MP3

<div class="haudio">
<p>
   <span class="fn">DigitalPlanet Podcast</span>
   :
   <abbr class="published" title="20071029">29 Oct 07</abbr>
</p>
<p>
   <div class="item">
      <span class="fn">Forensic computing: is it really possible to delete data from your machine?</span>
   </div>
   <div class="item">
      <span class="fn">Grand plans for getting broadband into Africa</span>
   </div>
   , 
   <div class="item">
      <span class="fn">checking out the sky at night via the internet</span>
   </div> 
   and 
   <div class="item">
      <span class="fn">answering your emails</span>
   </div>
   to the programme.
</p>
<p>
   <a rel="enclosure" href="/download/episode/DigitalPlanet-2007-10-29">Download MP3</a>
</p>
</div>

Opera Example

(This is a live example, detectable in parsers)

La Bohème is an opera in four acts by Giacomo Puccini to an Italian liberetto by Luigi Illica and Giuseppe Giacosais. I saw it performed last week and found Act III to be pretty interesting, especially the "Sa dirmi, scusi" and "O buon Marcello, aiuto!" arias.


<div class="haudio" lang="en">
   <span class="fn" lang="fr">La Bohème</span> 
   is an 
   <span class="category">opera</span> 
   in four acts by 
   <span class="contributor" lang="it">Giacomo Puccini</span>
   to an 
   <span class="category">Italian liberetto</span>
   by
   <span class="contributor" lang="it">Luigi Illica</span>
   and
   <span class="contributor" lang="it">Giuseppe Giacosais</span>.
   I saw it performed last week and found
   <span class="item">
      <span class="fn">Act III</span>
       to be pretty interesting, especially the
      <span class="item">
         "<span class="fn" lang="it">Sa dirmi, scusi</span>"
      </span>
      and
      <span class="item">
         "<span class="fn" lang="it">O buon Marcello, aiuto!</span>"
      </span>
      arias.
   </span>
</div>

Examples in the wild

This section is informative.

  • hAudio-RSS almost exclusively uses hAudio and XSLT to generate an RSS2 Playlist.

Implementations

This section is informative.

References

Normative References

Informative References

Similar Work

Copyright

This document and hAudio specification was placed into the public domain on 2007-07-25 by the authors. There are no usage, distribution, re-printing, or any other restrictions of any kind with regards to the text or content of this specification.

Patents

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).

Public Domain Release

The authors and editors of this page due hereby relinquish their copyright on the document and release the text of this page into the public domain.

Work in progress

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

Related Pages