Skip to content

Instantly share code, notes, and snippets.

@zlu
Created August 28, 2009 04:14
Show Gist options
  • Save zlu/176779 to your computer and use it in GitHub Desktop.
Save zlu/176779 to your computer and use it in GitHub Desktop.
transcribe(mp3source, { :transcriptionOutURI => resulturi })
require 'httparty'
class TropoTranscriber
include HTTParty
base_uri 'http://api.tropo.com/1.0/sessions'
def initialize(token)
@token = token
end
def request_transcription(file_location, results_location)
self.class.get("/action=create&token=#{@token}&mp3source=#{file_location}&resulturi=#{results_location}")
end
end
tropo = TropoTranscriber.new
# Hey, transcribe something!
tropo.request_transcription 'http://host/file_path', 'http://host/post_transcription'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment