New York Senate Telecom Committee Is on the Phone

Earlier this month, I glued together two neat apps using parts supplied by two different VoiceXML unified communications companies. The first lets me call in to a VoXMLPHP script hosted by Tropo, which then interprets my voice commands and reads news articles using their API wrappers.  The  second sends SMS headlines (using Twilio’s APIs) from my favorite news sources to my not-so-smart-phone (it’s an ancient model).

Both have their place in my work schedule.  Another idea that’s been taking root in this blog is crowdsourcing of public policy  and moving government documents to the Internet, accessible using open-standards protocols (RSS, et. al.)

Hold these thoughts.

While hitting the virtual pavement last week to learn about eComm,  I serendipitously came across  Mark Head’s Vox Populi blog and an open government project across the Hudson in New York State.

It all came together for me: I now  have the means to craft a VoXML PHP script using Tropo’s UC APIs to bring the New York Senate Committee’s Energy and Telecommunications Committee  bill workflow to my cell phone.

Back in June, the New York Senate rolled out new Web  software for tracking ongoing legislation and searching NYS government documents.

Part of their initiative included a set of REST-ful APIs for pulling legislative information into all the usual formats (RSS, XML, JSON).

Why look at legislation from a state-level committee on telecommunications?

New York State Capitol viewed from the south, ...
Image via Wikipedia

While the FCC has much power in setting rules regarding  cable franchising— there’s has been  battling between the states and Washington over what are fair obligations to ask of carriers—the states and local governments still have ultimate control over who gets a franchise.

Which it to say, it is worthwhile to keep up with relevant committee meetings in our  state capitols.

I don’t have an Albany bureau to cover telecommunications matters, but with New York’s Open Senate project and software gadgetry I already built earlier in the month, I roughed out a prototype that I think is up to the task of following relevant bills flowing through New York’s State’s Energy and Telecommunications Committee.

Now some of the details.

For those who followed my previous Tropo project, you know that I have a preference for using Yahoo Pipes to do front-end processing of RSS feeds. (I develop allergic reactions to excessive PHP coding.)

As before, I’ve made this Pipe public. The  goal was to pull out essential fields —the bill title, the bill number, and some of the bill contents, especially recent bill actions—into separate fields.  I also added the ability to filter bills on keywords I’m interested in.

Tech aside: Pipes supports PHP serialization, so I can pull the pre-processed Pipe’s stream into my Tropo app in a single  statement without having to deal with Curl.

function RSS_Retrieve($url)
{
	global $RSS_Content;

        $output=unserialize(file_get_contents($url));
	foreach( $output['value']['items'] as $item) {
		 array_push($RSS_Content,$item);
	}
}

While this app is a variation to what I did the last time, I learned a few more VoiceXML tricks.

First, when you text-to-speech bill numbers, which are  in the form of letter-series of numbers-letter, I discovered you don’t want the speech processor to treat this as an English word.

For intelligibility, I parsed out the bill number, and the beginning and ending letters ( thanks preg_replace). And then used the VoXML say-as tag with attributes interpret-as=”digits” (to treat my bill number as a series of digits) and type=”acronym” ( to render letters as individual sounds).

public function bill() {
     $s=strip_tags( $this->articles[$this->[ar_ix]['title'] );
     $s=preg_replace('/^([A-Z])(\d+)([A-Z]).*$/','$1 $2 $3',$s);
      return $s." ";
   }

That made quite a difference in how my sentences flowed. I also became fond of the <break > tag, which lets me add meaningful pauses to some of my longer verbiage.

All in all, I’m pleased with the results.  I now just need to add an SMS notifier, similar to what I did with my headlines project, and I’ll have a complete Gov 2.0 solution.

I’ll save that for later, for now I’m turning off my MacBook to enjoy the fleeting Spring weather.

Reblog this post [with Zemanta]

3 Comments

  1. What a great project. Thanks for writing it up. For your SMS notifier, have you noticed that you can send a text message to your Tropo number and have it respond using the code you’ve already written for voice? Making this an outbound notifier would be a simple matter of keeping track of which items you’ve already been notified of using some sort of periodic process like a cron job to ping our API for anything that’s new.

    Drop me a line if you want some help setting that up.

  2. Pingback: Tweets that mention The Technoverse | New York Senate Telecom Committee Is on the Phone | -- Topsy.com

Comments are closed.