Skip to content

Commit

Permalink
add user agent string
Browse files Browse the repository at this point in the history
  • Loading branch information
taf2 committed Mar 25, 2011
1 parent da94995 commit 576fff6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/speech/audio_to_text.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def convert_chunk(easy, chunk, options={})
while retrying
#easy.verbose = true
easy.headers['Content-Type'] = "audio/x-flac; rate=#{chunk.flac_rate}"
easy.headers['User-Agent'] = "https://github.com/taf2/speech2text"
easy.post_body = "Content=#{chunk.to_flac_bytes}"
easy.on_progress {|dl_total, dl_now, ul_total, ul_now| printf("%.2f/%.2f\r", ul_now, ul_total); true }
easy.on_complete {|easy| puts }
Expand Down

0 comments on commit 576fff6

Please sign in to comment.