pihsi 0.0.3 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +15 -1
- data/Rakefile +3 -1
- data/lib/pihsi/speech_recognizer.rb +5 -1
- data/lib/pihsi/version.rb +1 -1
- data/spec/speech_recognizer_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1a6adab4ac73877425b169cfba97535972b4b7cd
|
4
|
+
data.tar.gz: a4c59e6f444ab4847488184e916525a9f44833e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a48cfd2701d562e9cacf3b8234a7476210a112f48eb50ce7f78d5d55809b51bd2ae1b46bba2f2e06e5b22fdd1d20daa1490eb7477ad35ca89b84a31799f3de13
|
7
|
+
data.tar.gz: f12d78ca7636e6fd6f431e246bc5c22c5147040c05bd34817734765ef17e3f65e47b463669baacdfb2365dbc8d0708e91aadb46250606705b1a02a8c91b9aed6
|
data/.travis.yml
CHANGED
@@ -6,4 +6,18 @@ rvm:
|
|
6
6
|
- rbx-2.2.7
|
7
7
|
before_install:
|
8
8
|
- sudo apt-get update
|
9
|
-
- sudo apt-get install
|
9
|
+
- sudo apt-get install build-essential bison
|
10
|
+
- wget http://downloads.sourceforge.net/project/cmusphinx/sphinxbase/0.8/sphinxbase-0.8.tar.gz
|
11
|
+
- tar -zxf sphinxbase-0.8.tar.gz
|
12
|
+
- cd sphinxbase-0.8
|
13
|
+
- ./configure
|
14
|
+
- make
|
15
|
+
- sudo make install
|
16
|
+
- cd ..
|
17
|
+
- wget http://downloads.sourceforge.net/project/cmusphinx/pocketsphinx/0.8/pocketsphinx-0.8.tar.gz
|
18
|
+
- tar -zxf pocketsphinx-0.8.tar.gz
|
19
|
+
- cd pocketsphinx-0.8
|
20
|
+
- ./configure
|
21
|
+
- make
|
22
|
+
- sudo make install
|
23
|
+
- cd ..
|
data/Rakefile
CHANGED
@@ -2,7 +2,9 @@ require "bundler/gem_tasks"
|
|
2
2
|
require 'rake/extensiontask'
|
3
3
|
require 'rspec/core/rake_task'
|
4
4
|
|
5
|
-
Rake::ExtensionTask.new('pocket_sphinx')
|
5
|
+
Rake::ExtensionTask.new('pocket_sphinx') do |ext|
|
6
|
+
ext.lib_dir = "lib/pocket_sphinx"
|
7
|
+
end
|
6
8
|
|
7
9
|
desc "Run the specs"
|
8
10
|
RSpec::Core::RakeTask.new do |t|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require "pocket_sphinx"
|
1
|
+
require "pocket_sphinx/pocket_sphinx"
|
2
2
|
|
3
3
|
module Pihsi
|
4
4
|
class SpeechRecognizer
|
@@ -8,5 +8,9 @@ module Pihsi
|
|
8
8
|
def initialize(hmm, lm, dict)
|
9
9
|
@hmm, @lm, @dict = hmm, lm, dict
|
10
10
|
end
|
11
|
+
|
12
|
+
def recognize(data)
|
13
|
+
super data.unpack('s*')
|
14
|
+
end
|
11
15
|
end
|
12
16
|
end
|
data/lib/pihsi/version.rb
CHANGED
@@ -5,7 +5,7 @@ RSpec.describe Pihsi::SpeechRecognizer do
|
|
5
5
|
subject { instance.recognize(data) }
|
6
6
|
|
7
7
|
context 'when data is the content of goforward.raw' do
|
8
|
-
let(:data) { File.read('spec/fixtures/goforward.raw')
|
8
|
+
let(:data) { File.read('spec/fixtures/goforward.raw') }
|
9
9
|
|
10
10
|
it { should eq "go forward ten meters" }
|
11
11
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pihsi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zhi-Qiang Lei
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-09-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|