Skip to content

Instantly share code, notes, and snippets.

@zlu
Created September 10, 2009 00:16
Show Gist options
  • Save zlu/184194 to your computer and use it in GitHub Desktop.
Save zlu/184194 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'curb'
curl = Curl::Easy.new 'http://sandite.orl.voxeo.net/transcribe'
curl.userpwd = 'username:password'
#voxeon:orlandorox
curl.multipart_form_post = true
curl.http_post Curl::PostField.file('filename', ARGV[0]),
Curl::PostField.content('transcriptionOutFormat', 'json'),
Curl::PostField.content('transcriptionID', '123456'),
Curl::PostField.content('trascriptionOutURI', 'http://tropo-transcriptions.appspot.com/receive_transcription')
p "Result: " + curl.response_code.to_s + " " + curl.body_str
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment