google_speech 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -28,8 +28,9 @@ module GoogleSpeech
28
28
  chunk_factory.each{ |chunk|
29
29
  result = chunk.to_hash
30
30
  transcript = transcribe_data(chunk.data)
31
- result[:text] = transcript['hypotheses'].first['utterance']
32
- result[:confidence] = transcript['hypotheses'].first['confidence']
31
+ hypothesis = transcript['hypotheses'].first || Hash.new("")
32
+ result[:text] = hypothesis['utterance']
33
+ result[:confidence] = hypothesis['confidence']
33
34
  @results << result
34
35
 
35
36
  # puts "\n#{result[:start_time]} - #{result[:start_time].to_i + result[:duration].to_i}: #{(result[:confidence].to_f * 100).to_i}%: #{result[:text]}"
@@ -1,5 +1,5 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
 
3
3
  module GoogleSpeech
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google_speech
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-19 00:00:00.000000000 Z
12
+ date: 2013-03-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: excon
@@ -97,7 +97,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
97
97
  version: '0'
98
98
  segments:
99
99
  - 0
100
- hash: -4359616001262529271
100
+ hash: 4464618755073906790
101
101
  required_rubygems_version: !ruby/object:Gem::Requirement
102
102
  none: false
103
103
  requirements:
@@ -106,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
106
106
  version: '0'
107
107
  segments:
108
108
  - 0
109
- hash: -4359616001262529271
109
+ hash: 4464618755073906790
110
110
  requirements: []
111
111
  rubyforge_project:
112
112
  rubygems_version: 1.8.23