Skip to content

Instantly share code, notes, and snippets.

@prem
Created October 4, 2008 01:21
Show Gist options
  • Save prem/14693 to your computer and use it in GitHub Desktop.
Save prem/14693 to your computer and use it in GitHub Desktop.
smm_url = 'http://irvsrddev2.flight.yellowpages.com:8080/smm/ypc?field=city_state_business&imei=353763.01541827.6&grammar=/data1/lm/test.lm'
audio = '/Users/pmani/projects/cicero/20080911/test/data/20080725/audio-220417.amr'
url = URI.parse( smm_url )
request = Net::HTTP::Post.new( url )
request.body = File.read( audio )
request.content_type = 'audio/amr'
response = nil
t = Benchmark.realtime do
response = Net::HTTP.new( url.host, url.port ).start { |http| http.request( request ) }
end
puts response.insepct
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment