pihsi 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ext/pocket_sphinx/pocket_sphinx.c +7 -5
- data/lib/pihsi/version.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: d4f0e6120918c54fa462d6637a14fe68e50252d3
|
4
|
+
data.tar.gz: 7e65d7762c199fe1040fbb5bc58cf82d4620030b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a64f057c9b2349e18bcb8707d4f121e43c65286501e56d96dfb84bfdc7cb72faf2fe7a135958c8f643fec4cb7b1b09aecb077b5dd5f1b7b474122720b3affc3f
|
7
|
+
data.tar.gz: 6ee89879a47c8ce58dd12030bc6d999aaec353bec98260d601d4045427bd52661a6f6c84fb298db26a648564c6bf0aa9ef062396b2088c9273f3fcb485b5d2b6
|
@@ -5,6 +5,8 @@ typedef struct ps {
|
|
5
5
|
ps_decoder_t *decoder;
|
6
6
|
} PocketSphinx;
|
7
7
|
|
8
|
+
static VALUE rb_mPihsi;
|
9
|
+
static VALUE rb_cSpeechRecognizer;
|
8
10
|
static VALUE rb_eUtteranceError;
|
9
11
|
|
10
12
|
static VALUE decode(ps_decoder_t *ps, VALUE data) {
|
@@ -52,10 +54,9 @@ VALUE recognize(VALUE self, VALUE data) {
|
|
52
54
|
return decode(pocketSphinx -> decoder, string);
|
53
55
|
}
|
54
56
|
|
55
|
-
static void deallocate(
|
56
|
-
PocketSphinx *pocketSphinx = ps;
|
57
|
+
static void deallocate(PocketSphinx *pocketSphinx) {
|
57
58
|
ps_free(pocketSphinx -> decoder);
|
58
|
-
|
59
|
+
xfree(pocketSphinx);
|
59
60
|
}
|
60
61
|
|
61
62
|
static VALUE allocate(VALUE self) {
|
@@ -100,8 +101,9 @@ VALUE initialize(VALUE self, VALUE options_hash) {
|
|
100
101
|
}
|
101
102
|
|
102
103
|
void Init_pocket_sphinx() {
|
103
|
-
|
104
|
-
|
104
|
+
rb_mPihsi = rb_define_module("Pihsi");
|
105
|
+
|
106
|
+
rb_cSpeechRecognizer = rb_define_class_under(rb_mPihsi, "SpeechRecognizer", rb_cObject);
|
105
107
|
rb_define_alloc_func(rb_cSpeechRecognizer, allocate);
|
106
108
|
rb_define_method(rb_cSpeechRecognizer, "initialize", initialize, 1);
|
107
109
|
rb_define_method(rb_cSpeechRecognizer, "recognize", recognize, 1);
|
data/lib/pihsi/version.rb
CHANGED
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.2.
|
4
|
+
version: 0.2.1
|
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-09-
|
11
|
+
date: 2014-09-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|