ruby_speech 2.3.1 → 3.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +1 -0
- data/.hound.yml +2 -0
- data/.travis.yml +25 -9
- data/CHANGELOG.md +19 -1
- data/README.md +14 -15
- data/Rakefile +2 -0
- data/ext/ruby_speech/RubySpeechGRXMLMatcher.java +17 -12
- data/ext/ruby_speech/RubySpeechService.java +1 -1
- data/ext/ruby_speech/extconf.rb +1 -1
- data/lib/ruby_speech/generic_element.rb +2 -2
- data/lib/ruby_speech/grxml/builtins.rb +18 -11
- data/lib/ruby_speech/grxml/grammar.rb +26 -4
- data/lib/ruby_speech/grxml/matcher.rb +2 -2
- data/lib/ruby_speech/grxml.rb +2 -0
- data/lib/ruby_speech/nlsml/builder.rb +2 -1
- data/lib/ruby_speech/nlsml/document.rb +5 -0
- data/lib/ruby_speech/ssml/break.rb +1 -2
- data/lib/ruby_speech/ssml/element.rb +13 -1
- data/lib/ruby_speech/ssml/mark.rb +0 -1
- data/lib/ruby_speech/ssml/prosody.rb +8 -5
- data/lib/ruby_speech/version.rb +1 -1
- data/ruby_speech.gemspec +13 -8
- data/spec/ruby_speech/grxml/builtins_spec.rb +80 -71
- data/spec/ruby_speech/grxml/grammar_spec.rb +168 -34
- data/spec/ruby_speech/grxml/item_spec.rb +33 -33
- data/spec/ruby_speech/grxml/match_spec.rb +1 -1
- data/spec/ruby_speech/grxml/matcher_spec.rb +103 -59
- data/spec/ruby_speech/grxml/max_match_spec.rb +2 -2
- data/spec/ruby_speech/grxml/no_match_spec.rb +2 -2
- data/spec/ruby_speech/grxml/one_of_spec.rb +6 -6
- data/spec/ruby_speech/grxml/potential_match_spec.rb +2 -2
- data/spec/ruby_speech/grxml/rule_spec.rb +17 -17
- data/spec/ruby_speech/grxml/ruleref_spec.rb +10 -10
- data/spec/ruby_speech/grxml/tag_spec.rb +5 -5
- data/spec/ruby_speech/grxml/token_spec.rb +7 -7
- data/spec/ruby_speech/grxml_spec.rb +25 -25
- data/spec/ruby_speech/nlsml_spec.rb +58 -10
- data/spec/ruby_speech/ssml/audio_spec.rb +19 -19
- data/spec/ruby_speech/ssml/break_spec.rb +42 -22
- data/spec/ruby_speech/ssml/desc_spec.rb +7 -7
- data/spec/ruby_speech/ssml/emphasis_spec.rb +21 -21
- data/spec/ruby_speech/ssml/mark_spec.rb +5 -5
- data/spec/ruby_speech/ssml/p_spec.rb +17 -17
- data/spec/ruby_speech/ssml/phoneme_spec.rb +8 -8
- data/spec/ruby_speech/ssml/prosody_spec.rb +82 -64
- data/spec/ruby_speech/ssml/s_spec.rb +16 -16
- data/spec/ruby_speech/ssml/say_as_spec.rb +9 -9
- data/spec/ruby_speech/ssml/speak_spec.rb +29 -29
- data/spec/ruby_speech/ssml/sub_spec.rb +7 -7
- data/spec/ruby_speech/ssml/voice_spec.rb +31 -31
- data/spec/ruby_speech/ssml_spec.rb +41 -17
- data/spec/ruby_speech_spec.rb +3 -3
- data/spec/spec_helper.rb +8 -3
- data/spec/support/dtmf_helper.rb +14 -0
- data/spec/support/grammar_matchers.rb +6 -6
- data/spec/support/match_examples.rb +5 -5
- data/spec/support/matchers.rb +1 -1
- metadata +49 -20
@@ -6,7 +6,7 @@ RSpec::Matchers.define :not_match do |input|
|
|
6
6
|
@result.is_a?(RubySpeech::GRXML::NoMatch)
|
7
7
|
end
|
8
8
|
|
9
|
-
|
9
|
+
failure_message do |grammar|
|
10
10
|
"expected #{grammar} to not match #{input}, but received a #{@result.class}"
|
11
11
|
end
|
12
12
|
end
|
@@ -17,7 +17,7 @@ RSpec::Matchers.define :potentially_match do |input|
|
|
17
17
|
@result.is_a?(RubySpeech::GRXML::PotentialMatch)
|
18
18
|
end
|
19
19
|
|
20
|
-
|
20
|
+
failure_message do |grammar|
|
21
21
|
"expected #{grammar} to potentially match #{input}, but received a #{@result.class}"
|
22
22
|
end
|
23
23
|
end
|
@@ -33,10 +33,10 @@ RSpec::Matchers.define :match do |input|
|
|
33
33
|
end
|
34
34
|
|
35
35
|
description do
|
36
|
-
%{#{
|
36
|
+
%{#{super()} and interpret as "#{@interpretation}"}
|
37
37
|
end
|
38
38
|
|
39
|
-
|
39
|
+
failure_message do |grammar|
|
40
40
|
messages = []
|
41
41
|
unless @result.is_a?(RubySpeech::GRXML::Match)
|
42
42
|
messages << "expected #{grammar} to match, got a #{@result.class}"
|
@@ -61,10 +61,10 @@ RSpec::Matchers.define :max_match do |input|
|
|
61
61
|
end
|
62
62
|
|
63
63
|
description do
|
64
|
-
%{#{
|
64
|
+
%{#{super()} and interpret as "#{@interpretation}"}
|
65
65
|
end
|
66
66
|
|
67
|
-
|
67
|
+
failure_message do |grammar|
|
68
68
|
messages = []
|
69
69
|
unless @result.is_a?(RubySpeech::GRXML::MaxMatch)
|
70
70
|
messages << "expected #{grammar} to max-match, got a #{@result.class}"
|
@@ -13,30 +13,30 @@ shared_examples_for "match" do
|
|
13
13
|
|
14
14
|
describe "equality" do
|
15
15
|
it "should be equal when mode, confidence, utterance and interpretation are the same" do
|
16
|
-
described_class.new(:mode => :dtmf, :confidence => 1, :utterance => '6', :interpretation => 'foo').
|
16
|
+
expect(described_class.new(:mode => :dtmf, :confidence => 1, :utterance => '6', :interpretation => 'foo')).to eq(described_class.new(:mode => :dtmf, :confidence => 1, :utterance => '6', :interpretation => 'foo'))
|
17
17
|
end
|
18
18
|
|
19
19
|
describe "when the mode is different" do
|
20
20
|
it "should not be equal" do
|
21
|
-
described_class.new(:mode => :dtmf).
|
21
|
+
expect(described_class.new(:mode => :dtmf)).not_to eq(described_class.new(:mode => :speech))
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
25
25
|
describe "when the confidence is different" do
|
26
26
|
it "should not be equal" do
|
27
|
-
described_class.new(:confidence => 1).
|
27
|
+
expect(described_class.new(:confidence => 1)).not_to eq(described_class.new(:confidence => 0))
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
31
31
|
describe "when the utterance is different" do
|
32
32
|
it "should not be equal" do
|
33
|
-
described_class.new(:utterance => '6').
|
33
|
+
expect(described_class.new(:utterance => '6')).not_to eq(described_class.new(:utterance => 'foo'))
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
37
37
|
describe "when the interpretation is different" do
|
38
38
|
it "should not be equal" do
|
39
|
-
described_class.new(:interpretation => 'foo').
|
39
|
+
expect(described_class.new(:interpretation => 'foo')).not_to eq(described_class.new(:interpretation => 'bar'))
|
40
40
|
end
|
41
41
|
end
|
42
42
|
end
|
data/spec/support/matchers.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby_speech
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Langfeld
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-02-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -16,14 +16,20 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1.
|
19
|
+
version: '1.8'
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 1.8.3
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
27
|
- - "~>"
|
25
28
|
- !ruby/object:Gem::Version
|
26
|
-
version: '1.
|
29
|
+
version: '1.8'
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 1.8.3
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: activesupport
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -31,9 +37,6 @@ dependencies:
|
|
31
37
|
- - ">="
|
32
38
|
- !ruby/object:Gem::Version
|
33
39
|
version: 3.0.7
|
34
|
-
- - "<"
|
35
|
-
- !ruby/object:Gem::Version
|
36
|
-
version: 5.0.0
|
37
40
|
type: :runtime
|
38
41
|
prerelease: false
|
39
42
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -41,9 +44,6 @@ dependencies:
|
|
41
44
|
- - ">="
|
42
45
|
- !ruby/object:Gem::Version
|
43
46
|
version: 3.0.7
|
44
|
-
- - "<"
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version: 5.0.0
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: bundler
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -60,32 +60,46 @@ dependencies:
|
|
60
60
|
version: 1.0.0
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
62
|
name: rspec
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - "~>"
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '3.0'
|
68
|
+
type: :development
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - "~>"
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '3.0'
|
75
|
+
- !ruby/object:Gem::Dependency
|
76
|
+
name: rspec-its
|
63
77
|
requirement: !ruby/object:Gem::Requirement
|
64
78
|
requirements:
|
65
79
|
- - ">="
|
66
80
|
- !ruby/object:Gem::Version
|
67
|
-
version: '
|
81
|
+
version: '0'
|
68
82
|
type: :development
|
69
83
|
prerelease: false
|
70
84
|
version_requirements: !ruby/object:Gem::Requirement
|
71
85
|
requirements:
|
72
86
|
- - ">="
|
73
87
|
- !ruby/object:Gem::Version
|
74
|
-
version: '
|
88
|
+
version: '0'
|
75
89
|
- !ruby/object:Gem::Dependency
|
76
90
|
name: ci_reporter
|
77
91
|
requirement: !ruby/object:Gem::Requirement
|
78
92
|
requirements:
|
79
|
-
- - "
|
93
|
+
- - "~>"
|
80
94
|
- !ruby/object:Gem::Version
|
81
|
-
version: 1.6
|
95
|
+
version: '1.6'
|
82
96
|
type: :development
|
83
97
|
prerelease: false
|
84
98
|
version_requirements: !ruby/object:Gem::Requirement
|
85
99
|
requirements:
|
86
|
-
- - "
|
100
|
+
- - "~>"
|
87
101
|
- !ruby/object:Gem::Version
|
88
|
-
version: 1.6
|
102
|
+
version: '1.6'
|
89
103
|
- !ruby/object:Gem::Dependency
|
90
104
|
name: yard
|
91
105
|
requirement: !ruby/object:Gem::Requirement
|
@@ -142,6 +156,20 @@ dependencies:
|
|
142
156
|
- - ">="
|
143
157
|
- !ruby/object:Gem::Version
|
144
158
|
version: '0'
|
159
|
+
- !ruby/object:Gem::Dependency
|
160
|
+
name: listen
|
161
|
+
requirement: !ruby/object:Gem::Requirement
|
162
|
+
requirements:
|
163
|
+
- - "<"
|
164
|
+
- !ruby/object:Gem::Version
|
165
|
+
version: 3.1.0
|
166
|
+
type: :development
|
167
|
+
prerelease: false
|
168
|
+
version_requirements: !ruby/object:Gem::Requirement
|
169
|
+
requirements:
|
170
|
+
- - "<"
|
171
|
+
- !ruby/object:Gem::Version
|
172
|
+
version: 3.1.0
|
145
173
|
- !ruby/object:Gem::Dependency
|
146
174
|
name: ruby_gntp
|
147
175
|
requirement: !ruby/object:Gem::Requirement
|
@@ -207,6 +235,7 @@ extensions:
|
|
207
235
|
extra_rdoc_files: []
|
208
236
|
files:
|
209
237
|
- ".gitignore"
|
238
|
+
- ".hound.yml"
|
210
239
|
- ".rspec"
|
211
240
|
- ".travis.yml"
|
212
241
|
- CHANGELOG.md
|
@@ -293,10 +322,11 @@ files:
|
|
293
322
|
- spec/ruby_speech/ssml_spec.rb
|
294
323
|
- spec/ruby_speech_spec.rb
|
295
324
|
- spec/spec_helper.rb
|
325
|
+
- spec/support/dtmf_helper.rb
|
296
326
|
- spec/support/grammar_matchers.rb
|
297
327
|
- spec/support/match_examples.rb
|
298
328
|
- spec/support/matchers.rb
|
299
|
-
homepage: https://github.com/
|
329
|
+
homepage: https://github.com/adhearsion/ruby_speech
|
300
330
|
licenses:
|
301
331
|
- MIT
|
302
332
|
metadata: {}
|
@@ -315,8 +345,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
315
345
|
- !ruby/object:Gem::Version
|
316
346
|
version: '0'
|
317
347
|
requirements: []
|
318
|
-
|
319
|
-
rubygems_version: 2.2.0
|
348
|
+
rubygems_version: 3.2.31
|
320
349
|
signing_key:
|
321
350
|
specification_version: 4
|
322
351
|
summary: A Ruby library for TTS & ASR document preparation
|
@@ -352,7 +381,7 @@ test_files:
|
|
352
381
|
- spec/ruby_speech/ssml_spec.rb
|
353
382
|
- spec/ruby_speech_spec.rb
|
354
383
|
- spec/spec_helper.rb
|
384
|
+
- spec/support/dtmf_helper.rb
|
355
385
|
- spec/support/grammar_matchers.rb
|
356
386
|
- spec/support/match_examples.rb
|
357
387
|
- spec/support/matchers.rb
|
358
|
-
has_rdoc:
|