November 21, 2008, Friday, 325

HAudio RDFa

From DBWiki

Jump to: navigation, search

hAudio RDFa Specification

This specification has been replaced by the Audio RDF Vocabulary. Please use the Audio RDF Vocabulary instead of this page. This document is provided purely for historical purposes.

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 document is a mapping of hAudio to RDFa.

hAudio RDFa Draft Specification

Editor
Manu Sporny, Bitmunk - Digital Bazaar, Inc.
Contributors (in order of contribution)
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, Ben Adida

Contents


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. Others include 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

Many thanks as well to Mike Kaply, Ben Adida, and Mike Linksvayer for guidance with regards to RDFa.

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 re-used from other RDFa name spaces.

Schema

The hAudio schema consists of the following:

  • hAudio (hmedia:Album and hmedia:Recording)
    • dc:title required. title of the audio recording. using xsd:string.
    • dc:creator. optional. creator of the audio recording. using xsd:string.
    • dc:contributor. optional. contributor to the audio recording. using xsd:string.
    • dc:date. optional. published date of audio recording. using xsd:date.
    • dc:description. optional. The description associated with the song or album.
    • hmedia:position. optional. The position of the recording in an album, playlist or top 10 list.
    • hmedia:sample. optional. link to sample file/stream of audio recording. using rel="haudio:sample".
    • hmedia:download. optional. link to full download of file. using rel="haudio:download".
    • commerce:payment. optional. link to purchase process. using rel="haudio:payment".
    • hmedia:depiction. optional. image summary of audio recording. using HTML and XHTML tag img.
    • dc:type. optional. type or genre of audio recording. using xsd:string.
    • dc:license. optional. the license under which the audio is licensed. using xsd:string.
    • hmedia:duration. optional. ISO-8601 time duration. using xsd:duration.
    • hmedia:contains. optional. Relationship for linking songs to albums, audio snippets to podcasts and singular recordings to collections of recordings.
    • commerce:costs. optional. The price for acquisition of the content. using type commerce:Price.
      • commerce:currency. optional. The ISO-4217 currency type, for example 'USD'.
      • commerce:amount. optional. The amount of currency.

Microformat Mapping

This section describes how hAudio maps from the Microformat world to the RDFa world.

Microformat RDFa
audio-title dc:title
contributor dc:creator
published-date dc:date
rel-sample hmedia:sample
rel-enclosure hmedia:download
rel-payment hcommerce:payment
image-summary hmedia:image-summary
category dc:type
duration hmedia:duration
price money:price

Field details

The fields of the hAudio schema represent the following:

hAudio

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

  • an hAudio Album is identified by the @instanceof attribute set to hmedia:Album
  • an single hAudio Recording is identified by the @instanceof attribute set to hmedia:Recording

Audio Title

The audio title of an 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 property name dc:title.
  • hAudio MUST have an audio title.

Creator

A Creator is the most commonly identified entity noted when speaking about an audio recording. Examples include: the band, the orchestra, the singer, or the musician.

  • The element is identified by the class name dc:creator.
  • hAudio MAY include one or more creators.
  • The contents of the element MAY include a valid VCARD RDFa.

Contributor

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

  • The element is identified by the class name dc:contributor.
  • hAudio MAY include one or more contributors.
  • The contents of the element MAY include a valid VCARD RDF.
  • The role field in the VCARD RDFa should be used to specify the Contributor's responsibility related to the audio recording.

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 dc:date.
  • hAudio MAY include one or more dc:dates.
  • The date text must be specified in a clearly recognizable manner and should contain a datatype attribute set to "xsd:date" and a content attribute set to the proper xsd:date value.

Sample

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

  • The element is identified by an anchor tag <A> with the rel attribute set to hmedia:sample.
  • hAudio MAY include one or more URL hmedia:samples.
  • The URL SHOULD point to a directly accessible stream or file.
  • The type of the sample MAY be specified by using the type attribute for the anchor tag.

Full Download

An Full Download URL specifies from where the full version of an audio recording may be retrieved. The URL MUST be a direct link to a file.

  • The element is identified by an anchor tag <A> with the rel attribute set to hmedia:download.
  • hAudio MAY include one or more hmedia:download URLs.
  • The type of the sample MAY be specified by using the type attribute for the anchor tag.

Payment

An Payment URL specifies from where the full version of an audio recording may be purchased. The URL MUST point to a page that contains a purchase process.

  • The element is identified by an anchor tag <A> with the rel attribute set to hcommerce:payment.
  • hAudio MAY include one or more hcommerce:payment URLs.

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, or a picture from a concert.

  • The element is identified by the class name hmedia:depiction.
  • hAudio MAY include one or more hmedia:depiction images.
  • The element must be an <img> element.

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 dc:type.
  • hAudio MAY include one or more dc:type elements.

Duration

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 hmedia:duration.
  • hAudio MAY include one hmedia:duration element.
  • The duration text must be specified in a clearly recognizable manner and should contain a datatype attribute set to "xsd:duration" and a content attribute set to the proper xsd:duration value.

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 money:price.
  • hAudio MAY include one or more money:price elements.
  • The contents of the element SHOULD use the money RDFa element.

Language

  • To explicitly convey the natural language that an hAudio is written in, use the standard (X)HTML 'lang' attribute on the element with instanceof="hmedia:Audio", e.g. <div class="hmedia:Audio" 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

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

  1. For the "hmedia: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.

Notes

This section is informative.

  • By marking up audio content with hAudio RDFa, 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 RDFa 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.

Examples

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

Simple Song Example

Display:

Start Wearing Purple by Gogol Bordello

hAudio RDFa XHTML:

<html xmlns:dc="http://purl.org/dc/elements/1.1/" 
          xmlns:hmedia="http://www.microformats.org/2007/12/hmedia/">

<div instanceof="hmedia:Recording" id="start_wearing_purple">
   <span property="dc:title">Start Wearing Purple</span> by 
   <span property="dc:creator">Gogol Bordello</span>
</div>

Speech Example

Display:

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

hAudio RDFa XHTML:

<html xmlns:dc="http://purl.org/dc/elements/1.1/"
          xmlns:hmedia="http://www.microformats.org/2007/12/hmedia/">

<div instanceof="hmedia:Recording" about="#i_have_a_dream">
   <span property="dc:title">I Have a Dream</span>, a 	 
   <span property="dc:type">speech</span> by 	 
   <span property="dc:creator">Martin Luther King, Jr.</span>
</div>	 

Complete Example

An example that uses every element of hAudio RDFa:

[Image] Sneaking Sally Thru The Alley by Phish
Label: Island Released: October 31, 2006
Acquire: Sample, Live Recording, Buy High Quality Track
Category: Live
Duration: 7 minutes, 27 seconds
Price: $0.99

Here is the hAudio RDFa markup:

<html xmlns:dc="http://purl.org/dc/elements/1.1/"
          xmlns:money="http://www.microformats.org/2007/10/money/"
          xmlns:hcommerce="http://www.microformats.org/2007/12/hcommerce/"
          xmlns:hmedia="http://www.microformats.org/2007/11/hmedia/"
          xmlns:vcard="http://www.w3.org/2001/vcard-rdf/3.0#>

<div instanceof="hmedia:Album" about="#sneaking_sally">
   <img rel="hmedia:depiction" src="images/sneaking_sally.jpg"/>
   <span property="dc:title">Sneaking Sally Thru The Alley</span> by
   <span property="dc:creator">Phish</span>
   <br/>
    Label: <span property="dc:contributor">Island</span>
   </span>
   <br/>
   Released on:
   <span property="dc:date" datatype="xsd:date" content="2006-10-31">October 31, 2006<abbr>
   <br/>
   Acquire: 
   <a rel="hmedia:sample" href="/samples/sneaking_sally.mp3">Sample</a>, 
   <a rel="hmedia:download" href="/live/sneaking_sally.mp3">Live Recording</a>,
   <a rel="commerce:payment" href="/buy/sneaking_sally">Buy High Quality Track</a>
   Category: <span property="dc:type">live</span>
   Duration: <span property="hmedia:duration" datatype="xsd:duration" content="447S">7 minutes, 27 seconds</span>
   Price: <div rel="hmedia:costs" instanceof="commerce:Price">
             <span property="commerce:currency" content="USD">$</span>
             <span property="commerce:amount">0.99</span>
          </div>
</div>

Examples in the wild

This section is informative.

Implementations

This section is informative.

See hAudio Implementations.

References

Normative References

Informative References

Similar Work

Copyright

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.

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

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

Template:Haudio-related-pages