<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>techno.blog(&#34;Dion&#34;) &#187; audio</title>
	<atom:link href="http://almaer.com/blog/tag/audio/feed" rel="self" type="application/rss+xml" />
	<link>http://almaer.com/blog</link>
	<description>blogging about life, the universe, and everything tech</description>
	<lastBuildDate>Tue, 03 Jan 2012 19:27:51 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>iPhone Web applications and the Record API</title>
		<link>http://almaer.com/blog/iphone-web-applications-and-the-record-api</link>
		<comments>http://almaer.com/blog/iphone-web-applications-and-the-record-api#comments</comments>
		<pubDate>Mon, 17 Nov 2008 00:28:20 +0000</pubDate>
		<dc:creator>dion</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Web Browsing]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[audio]]></category>

		<guid isPermaLink="false">http://almaer.com/blog/iphone-web-applications-and-the-record-api</guid>
		<description><![CDATA[As we watch and wait for the update to the Google Mobile iPhone application we are once again aware of the gatekeeper situation on that platform.
Google doesn&#8217;t know when it will launch, Apple does. Google had great PR into the launch (which they were told would be Friday&#8230; at least at some point). I had [...]]]></description>
			<content:encoded><![CDATA[<p>As we watch and wait for the <a href="http://www.techmeme.com/081116/p6#a081116p6">update to the Google Mobile iPhone application</a> we are once again aware of the gatekeeper situation on that platform.</p>
<p>Google doesn&#8217;t know when it will launch, Apple does. Google had great PR into the launch (which they were told would be Friday&#8230; at least at some point). I had the pleasure to see the voice feature and was actually kinda gobsmacked with it when I saw it at work. It isn&#8217;t like we haven&#8217;t seen voice recognition apps for years. However, this one seemed to actually work, and not just for simple words but for complex queries. Random place names were picked up. Wow. Maybe the work behind GOOG-411 is paying off :)</p>
<p>But, the iPhone app isn&#8217;t out there, yet. If this was a Web application, the Google engineers could cut a release and be on their way. But, how would you read in the audio? You could go for Flash or a custom plugin, but it reminded me of the <a href="http://code.google.com/p/gears/wiki/AudioAPI">audio API support and Gears</a>. When you think Audio API you think of the HTML 5 audio tag and the API that goes with it&#8230; specifically the &#8220;play&#8221; support. What interested me from the first design doc in Gears was the other side of things and the support for &#8220;record&#8221;:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">// an object of this class can be got from </span>
<span style="color: #006600; font-style: italic;">// google.gears.factory.create('beta.audiorecorder')</span>
AudioRecorder <span style="color: #003366; font-weight: bold;">class</span>
<span style="color: #009900;">&#123;</span>
  <span style="color: #006600; font-style: italic;">// ---- error state ----</span>
  readonly attribute AudioRecorderError error<span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #006600; font-style: italic;">// ---- recording state ----</span>
  <span style="color: #006600; font-style: italic;">// says whether recorder is currently recording or not</span>
  readonly attribute boolean recording<span style="color: #339933;">;</span>
  <span style="color: #006600; font-style: italic;">// says whether recorder is paused or not</span>
  readonly attribute boolean paused<span style="color: #339933;">;</span>
  <span style="color: #006600; font-style: italic;">// the amount of sound detected by the microphone</span>
  <span style="color: #006600; font-style: italic;">// 0 - no sound detected to 100 - maximum sound detected</span>
  readonly attribute int activityLevel<span style="color: #339933;">;</span>
  <span style="color: #006600; font-style: italic;">// specifies the length (in milli seconds) of the audio recorded</span>
  readonly attribute float duration<span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #006600; font-style: italic;">// number of channels, currently can be 1 (mono) or 2 (stereo)</span>
           attribute int numberOfChannels<span style="color: #339933;">;</span>
  <span style="color: #006600; font-style: italic;">// sample rate for the recording</span>
           attribute float sampleRate<span style="color: #339933;">;</span>
  <span style="color: #006600; font-style: italic;">// sample type for the recording, possible values need to be defined</span>
  <span style="color: #006600; font-style: italic;">// signed 16 bit little endian linear PCM</span>
  <span style="color: #003366; font-weight: bold;">const</span> unsigned short S16_LE <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
           attribute short sampleFormat<span style="color: #339933;">;</span>
  <span style="color: #006600; font-style: italic;">// audio file type (container and codec), possible values need to be defined</span>
           attribute string type<span style="color: #339933;">;</span> 
&nbsp;
  <span style="color: #000066; font-weight: bold;">void</span> record<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000066; font-weight: bold;">void</span> pause<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000066; font-weight: bold;">void</span> unpause<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000066; font-weight: bold;">void</span> <span style="color: #000066;">stop</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #006600; font-style: italic;">// ---- controls ----</span>
  <span style="color: #006600; font-style: italic;">// 0.0 - silent to 1.0 - loudest</span>
           attribute float volume<span style="color: #339933;">;</span>
           attribute boolean muted<span style="color: #339933;">;</span>
  <span style="color: #006600; font-style: italic;">// the amount of sound required to activate the microphone</span>
  <span style="color: #006600; font-style: italic;">// 0 - capture even minutest sound to 100 - capture only loudest sound</span>
           attribute int silenceLevel<span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #006600; font-style: italic;">// ---- cue ranges ----</span>
  <span style="color: #006600; font-style: italic;">// provides ability to set callbacks at specific points in playback time.</span>
  <span style="color: #006600; font-style: italic;">// similar to API in Audio class. Look at HTML5 spec for explanation.</span>
  <span style="color: #000066; font-weight: bold;">void</span> addCueRange<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">in</span> DOMString className<span style="color: #339933;">,</span> <span style="color: #000066; font-weight: bold;">in</span> float start<span style="color: #339933;">,</span> <span style="color: #000066; font-weight: bold;">in</span> float end<span style="color: #339933;">,</span> 
                  <span style="color: #000066; font-weight: bold;">in</span> boolean pauseOnExit<span style="color: #339933;">,</span>
                  <span style="color: #000066; font-weight: bold;">in</span> VoidCallback enterCallback<span style="color: #339933;">,</span> <span style="color: #000066; font-weight: bold;">in</span> VoidCallback exitCallback<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000066; font-weight: bold;">void</span> removeCueRanges<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">in</span> DOMString className<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #006600; font-style: italic;">// ---- access blob ----</span>
  <span style="color: #006600; font-style: italic;">// returns handle to the blob object containing the audio data</span>
  Blob getBlob<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></pre></div></div>

<p>I can&#8217;t wait to get full audio support available in the Open Web itself. Yet another barrier knocked down. Of course, the publicity around the Google Mobile app is nothing but good in many ways :)</p>
]]></content:encoded>
			<wfw:commentRss>http://almaer.com/blog/iphone-web-applications-and-the-record-api/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

