win32-sapi 0.1.6 → 0.1.7

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: ec79a35ce4c2c37c3d663f67089b6cb156d2e7a7
4
+ data.tar.gz: 31955273b45593ec263d0adc35d181d0e144379e
5
+ SHA512:
6
+ metadata.gz: c6d1be4bf199f5c7d9b698598578467beb06dba2f0a0398f6e2d0ff1c48a35aa86b531c376bffffec8bdb85db0709e2e534efc10f98c59027116d0420c032fde
7
+ data.tar.gz: 399af012dbafa6a8cada1f3d266d57be0364a50e362ee1e09a349bb40e92c8823804770372bf33c1eba9dad4aa4581d8a91fc953372b084ac9aa982b26ee35bd
data/CHANGES CHANGED
@@ -1,3 +1,9 @@
1
+ == 0.1.7 - 23-Aug-2013
2
+ * Removed windows-pr as a development dependency. Added rake and
3
+ test-unit as development dependencies.
4
+ * Updates to the README and gemspec files.
5
+ * Updated gem:create task for Rubygems 2.x.
6
+
1
7
  == 0.1.6 - 17-Jan-2011
2
8
  * Some Rakefile and gemspec updates.
3
9
  * Two tests now skipped on Windows XP.
data/README CHANGED
@@ -8,12 +8,8 @@
8
8
  Ruby 1.8.2 or later.
9
9
 
10
10
  == Installation
11
- === Gem Installation
12
11
  gem install win32-sapi
13
12
 
14
- === Local Installation
15
- rake install
16
-
17
13
  == Synopsis
18
14
  require 'win32/sapi5'
19
15
  include Win32
@@ -21,10 +17,6 @@
21
17
  v = SpVoice.new
22
18
  v.Speak("Shall we play a game?")
23
19
 
24
- == Constants
25
- SAPI5::VERSION
26
- The current version of this library.
27
-
28
20
  == Notes
29
21
  This module is a simple interface to the Microsoft Speech API 5.x. There
30
22
  are interfaces to all of the Automation classes that this API consists of.
@@ -38,7 +30,7 @@ SAPI5::VERSION
38
30
 
39
31
  == Known Bugs
40
32
  None known. Any bugs should be reported on the project page at
41
- http://rubyforge.org/projects/win32utils.
33
+ http://github.com/djberg96/win32-sapi
42
34
 
43
35
  == Acknowledgements
44
36
  Thanks go to Jouke Visser for his Win32::SAPI5 Perl module, on which this
@@ -54,7 +46,7 @@ SAPI5::VERSION
54
46
  Artistic 2.0
55
47
 
56
48
  == Copyright
57
- (C) 2003-2009 Daniel J. Berger
49
+ (C) 2003-2013 Daniel J. Berger
58
50
  All Rights Reserved
59
51
 
60
52
  == Warranty
@@ -64,4 +56,4 @@ SAPI5::VERSION
64
56
 
65
57
  == Author(s)
66
58
  Daniel J. Berger
67
- Park Heesob
59
+ Park Heesob
data/Rakefile CHANGED
@@ -8,7 +8,12 @@ namespace :gem do
8
8
  desc "Create the win32-sapi gem"
9
9
  task :create => [:clean] do
10
10
  spec = eval(IO.read('win32-sapi.gemspec'))
11
- Gem::Builder.new(spec).build
11
+ if Gem::VERSION.to_f < 2.0
12
+ Gem::Builder.new(spec).build
13
+ else
14
+ require 'rubygems/package'
15
+ Gem::Package.build(spec)
16
+ end
12
17
  end
13
18
 
14
19
  desc "Install the win32-sapi gem"
@@ -13,9 +13,9 @@ module Win32
13
13
  #
14
14
  class SAPI5 < WIN32OLE
15
15
  # The version of the win32-sapi library.
16
- VERSION = '0.1.6'
16
+ VERSION = '0.1.7'
17
17
  end
18
-
18
+
19
19
  # The SpAudioFormat automation object represents an audio format.
20
20
  #
21
21
  class SpAudioFormat < SAPI5
@@ -23,7 +23,7 @@ module Win32
23
23
  super("{9EF96870-E160-4792-820D-48CF0649E4EC}")
24
24
  end
25
25
  end
26
-
26
+
27
27
  # The SpCustomStream automation object supports the use of existing IStream
28
28
  # objects in SAPI.
29
29
  #
@@ -41,7 +41,7 @@ module Win32
41
41
  super("{947812B3-2AE1-4644-BA86-9E90DED7EC91}")
42
42
  end
43
43
  end
44
-
44
+
45
45
  # The SpInProcRecoContext automation object defines a recognition context.
46
46
  # A recognition context is the primary means by which an application
47
47
  # interacts with SAPI for speech recognition.
@@ -51,7 +51,7 @@ module Win32
51
51
  super("{73AD6842-ACE0-45E8-A4DD-8795881A2C2A}")
52
52
  end
53
53
  end
54
-
54
+
55
55
  # The SpInProcRecognizer automation object represents a speech recognition
56
56
  # engine.
57
57
  #
@@ -60,7 +60,7 @@ module Win32
60
60
  super("{41B89B6B-9399-11D2-9623-00C04F8EE628}")
61
61
  end
62
62
  end
63
-
63
+
64
64
  # The SpLexicon automation object provides access to lexicons. Lexicons
65
65
  # contain information about words that can be recognized or spoken.
66
66
  #
@@ -69,7 +69,7 @@ module Win32
69
69
  super("{0655E396-25D0-11D3-9C26-00C04F8EF87C}")
70
70
  end
71
71
  end
72
-
72
+
73
73
  # The SpMemoryStream automation object supports audio stream operations in
74
74
  # memory.
75
75
  #
@@ -78,7 +78,7 @@ module Win32
78
78
  super("{5FB7EF7D-DFF4-468a-B6B7-2FCBD188F994}")
79
79
  end
80
80
  end
81
-
81
+
82
82
  # The SpMMAudioIn automation object supports audio implementation for
83
83
  # the standard Windows wave-in multimedia layer.
84
84
  #
@@ -87,7 +87,7 @@ module Win32
87
87
  super("{CF3D2E50-53F2-11D2-960C-00C04F8EE628}")
88
88
  end
89
89
  end
90
-
90
+
91
91
  # The SpMMAudioIn automation object supports audio implementation for
92
92
  # the standard Windows wave-out multimedia layer.
93
93
  #
@@ -96,7 +96,7 @@ module Win32
96
96
  super("{A8C680EB-3D32-11D2-9EE7-00C04F797396}")
97
97
  end
98
98
  end
99
-
99
+
100
100
  # The SpObjectToken automation object represents an available resource
101
101
  # of a type used by SAPI.
102
102
  #
@@ -105,7 +105,7 @@ module Win32
105
105
  super("{EF411752-3736-4CB4-9C8C-8EF4CCB58EFE}")
106
106
  end
107
107
  end
108
-
108
+
109
109
  # The SpObjectTokenCategory automation object represents a class of object
110
110
  # tokens. Object tokens are associated with specific folders in the Speech
111
111
  # configuration database, and these folders are organized into categories,
@@ -118,7 +118,7 @@ module Win32
118
118
  super("{A910187F-0C7A-45AC-92CC-59EDAFB77B53}")
119
119
  end
120
120
  end
121
-
121
+
122
122
  # The SpPhoneConverter automation object supports conversion between
123
123
  # phoneme symbols and phoneme IDs.
124
124
  #
@@ -127,7 +127,7 @@ module Win32
127
127
  super("{9185F743-1143-4C28-86B5-BFF14F20E5C8}")
128
128
  end
129
129
  end
130
-
130
+
131
131
  # The SpPhraseInfoBuilder automation object provides the ability to
132
132
  # rebuild phrase information from audio data saved to memory.
133
133
  #
@@ -136,7 +136,7 @@ module Win32
136
136
  super("{C23FC28D-C55F-4720-8B32-91F73C2BD5D1}")
137
137
  end
138
138
  end
139
-
139
+
140
140
  # The SpSharedRecoContext automation object defines a recognition context.
141
141
  #
142
142
  class SpSharedRecoContext < SAPI5
@@ -144,7 +144,7 @@ module Win32
144
144
  super("{47206204-5ECA-11D2-960F-00C04F8EE628}")
145
145
  end
146
146
  end
147
-
147
+
148
148
  # The SpSharedRecognizer automation object represents a speech recognition
149
149
  # engine.
150
150
  #
@@ -153,7 +153,7 @@ module Win32
153
153
  super("{3BEE4890-4FE9-4A37-8C1E-5E7E12791C1F}")
154
154
  end
155
155
  end
156
-
156
+
157
157
  # The SpTextSelectionInformation automation object provides access to the
158
158
  # text selection information pertaining to a word sequence buffer.
159
159
  #
@@ -162,7 +162,7 @@ module Win32
162
162
  super("{0F92030A-CBFD-4AB8-A164-FF5985547FF6}")
163
163
  end
164
164
  end
165
-
165
+
166
166
  # The SpUnCompressedLexicon automation object provides access to lexicons,
167
167
  # which contain information about words that can be recognized or spoken.
168
168
  #
@@ -171,7 +171,7 @@ module Win32
171
171
  super("{C9E37C15-DF92-4727-85D6-72E5EEB6995A}")
172
172
  end
173
173
  end
174
-
174
+
175
175
  # The SpVoice object brings the text-to-speech (TTS) engine capabilities
176
176
  # to applications using SAPI automation. An application can create numerous
177
177
  # SpVoice objects, each independent of and capable of interacting with the
@@ -184,7 +184,7 @@ module Win32
184
184
  super("{96749377-3391-11D2-9EE3-00C04F797396}")
185
185
  end
186
186
  end
187
-
187
+
188
188
  # The SpWaveFormatEx automation object represents the format of
189
189
  # waveform-audio data.
190
190
  #
@@ -1,105 +1,106 @@
1
1
  #############################################################################
2
2
  # test_win32_sapi5.rb
3
3
  #
4
- # Test suite for the sapi5 class. For now, we're simply going to test that
5
- # the constructors work without incident. There are simply too many methods
6
- # for me to test. If the constructor works, the methods should be
7
- # available.
4
+ # Test suite for the sapi5 class. For now, we're simply going to test that
5
+ # the constructors work without incident. There are simply too many methods
6
+ # for me to test. If the constructor works, the methods should be available.
8
7
  #
9
8
  # I may eventually split each class into its own test file.
10
9
  #
11
10
  # You should run this test case via the 'rake test' Rake task.
12
11
  #############################################################################
13
- require 'rubygems'
14
- gem 'test-unit'
15
-
12
+ require 'test-unit'
16
13
  require 'win32/sapi5'
17
- require 'windows/system_info'
18
- require 'test/unit'
19
14
  include Win32
20
15
 
21
16
  class TC_Win32_SAPI5 < Test::Unit::TestCase
22
- include Windows::SystemInfo
17
+ def self.startup
18
+ @@xp = ["5.1", "5.2"].include?(`ver`.strip[/\d\.\d/])
19
+ end
23
20
 
24
21
  def test_version
25
- assert_equal('0.1.6', SAPI5::VERSION)
22
+ assert_equal('0.1.7', SAPI5::VERSION)
26
23
  end
27
-
24
+
28
25
  def test_SpAudioFormat
29
26
  assert_nothing_raised{ SpAudioFormat.new }
30
27
  end
31
-
28
+
32
29
  def test_SpCustomStream
33
30
  assert_nothing_raised{ SpCustomStream.new }
34
31
  end
35
-
32
+
36
33
  def test_SpFileStream
37
34
  assert_nothing_raised{ SpFileStream.new }
38
35
  end
39
-
36
+
40
37
  def test_SpInProcRecoContext
41
- omit_if(windows_xp?, "SpInProcRecoContext skipped on Windows XP")
38
+ omit_if(@@xp, "SpInProcRecoContext skipped on Windows XP")
42
39
  assert_nothing_raised{ SpInProcRecoContext.new }
43
40
  end
44
-
41
+
45
42
  def test_SpInProcRecognizer
46
43
  assert_nothing_raised{ SpInProcRecognizer.new }
47
44
  end
48
-
45
+
49
46
  def test_SpLexicon
50
47
  assert_nothing_raised{ SpLexicon.new }
51
48
  end
52
-
49
+
53
50
  def test_SpMemoryStream
54
51
  assert_nothing_raised{ SpMemoryStream.new }
55
52
  end
56
-
53
+
57
54
  def test_SpMMAudioIn
58
55
  assert_nothing_raised{ SpMMAudioIn.new }
59
56
  end
60
-
57
+
61
58
  def test_SpMMAudioOut
62
59
  assert_nothing_raised{ SpMMAudioOut.new }
63
60
  end
64
-
61
+
65
62
  def test_SpObjectToken
66
63
  assert_nothing_raised{ SpObjectToken.new }
67
64
  end
68
-
65
+
69
66
  def test_SpObjectTokenCategory
70
67
  assert_nothing_raised{ SpObjectTokenCategory.new }
71
68
  end
72
-
69
+
73
70
  def test_SpPhoneConverter
74
71
  assert_nothing_raised{ SpPhoneConverter.new }
75
72
  end
76
-
73
+
77
74
  def test_SpPhraseInfoBuilder
78
75
  assert_nothing_raised{ SpPhraseInfoBuilder.new }
79
76
  end
80
-
77
+
81
78
  def test_SpSharedRecoContext
82
- omit_if(windows_xp?, "SpSharedRecoContext skipped on Windows XP")
79
+ omit_if(@@xp, "SpSharedRecoContext skipped on Windows XP")
83
80
  assert_nothing_raised{ SpSharedRecoContext.new }
84
81
  end
85
-
82
+
86
83
  def test_SpSharedRecognizer
87
84
  assert_nothing_raised{ SpSharedRecognizer.new }
88
85
  end
89
-
86
+
90
87
  def test_SpTextSelectionInformation
91
88
  assert_nothing_raised{ SpTextSelectionInformation.new }
92
89
  end
93
-
90
+
94
91
  def test_SpUnCompressedLexicon
95
92
  assert_nothing_raised{ SpUnCompressedLexicon.new }
96
93
  end
97
-
94
+
98
95
  def test_SpVoice
99
96
  assert_nothing_raised{ SpVoice.new }
100
97
  end
101
-
98
+
102
99
  def test_SpWaveFormatEx
103
100
  assert_nothing_raised{ SpWaveFormatEx.new }
104
101
  end
102
+
103
+ def self.shutdown
104
+ @@xp = nil
105
+ end
105
106
  end
@@ -1,25 +1,24 @@
1
- require 'rubygems'
2
-
3
- Gem::Specification.new do |spec|
4
- spec.name = 'win32-sapi'
5
- spec.version = '0.1.6'
6
- spec.author = 'Daniel J. Berger'
7
- spec.license = 'Artistic 2.0'
8
- spec.email = 'djberg96@gmail.com'
9
- spec.homepage = 'http://www.rubyforge.org/projects/win32utils'
10
- spec.platform = Gem::Platform::RUBY
11
- spec.summary = 'An interface to the MS SAPI (Sound API) library.'
12
- spec.test_file = 'test/test_win32_sapi5.rb'
13
- spec.has_rdoc = true
14
- spec.files = Dir['**/*'].reject{ |f| f.include?('git') }
15
-
16
- spec.rubyforge_project = 'win32utils'
17
- spec.extra_rdoc_files = ['README', 'CHANGES', 'MANIFEST']
18
-
19
- spec.add_development_dependency('windows-pr')
20
-
21
- spec.description = <<-EOF
22
- The win32-sapi library provides an interface to the MS Windows sound
23
- interface, otherwise known as SAPI, using OLE.
24
- EOF
25
- end
1
+ require 'rubygems'
2
+
3
+ Gem::Specification.new do |spec|
4
+ spec.name = 'win32-sapi'
5
+ spec.version = '0.1.7'
6
+ spec.author = 'Daniel J. Berger'
7
+ spec.license = 'Artistic 2.0'
8
+ spec.email = 'djberg96@gmail.com'
9
+ spec.homepage = 'http://github.com/djberg96/win32-sapi'
10
+ spec.summary = 'An interface to the MS SAPI (Sound API) library.'
11
+ spec.test_file = 'test/test_win32_sapi5.rb'
12
+ spec.files = Dir['**/*'].reject{ |f| f.include?('git') }
13
+
14
+ spec.rubyforge_project = 'win32utils'
15
+ spec.extra_rdoc_files = ['README', 'CHANGES', 'MANIFEST']
16
+
17
+ spec.add_development_dependency('test-unit')
18
+ spec.add_development_dependency('rake')
19
+
20
+ spec.description = <<-EOF
21
+ The win32-sapi library provides an interface to the MS Windows sound
22
+ interface, otherwise known as SAPI, using OLE.
23
+ EOF
24
+ end
metadata CHANGED
@@ -1,48 +1,54 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: win32-sapi
3
- version: !ruby/object:Gem::Version
4
- hash: 23
5
- prerelease: false
6
- segments:
7
- - 0
8
- - 1
9
- - 6
10
- version: 0.1.6
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.7
11
5
  platform: ruby
12
- authors:
6
+ authors:
13
7
  - Daniel J. Berger
14
8
  autorequire:
15
9
  bindir: bin
16
10
  cert_chain: []
17
-
18
- date: 2011-01-17 00:00:00 -07:00
19
- default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
22
- name: windows-pr
11
+ date: 2013-08-24 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: test-unit
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
23
21
  prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- hash: 3
30
- segments:
31
- - 0
32
- version: "0"
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
33
34
  type: :development
34
- version_requirements: *id001
35
- description: " The win32-sapi library provides an interface to the MS Windows sound\n interface, otherwise known as SAPI, using OLE.\n"
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ description: |2
42
+ The win32-sapi library provides an interface to the MS Windows sound
43
+ interface, otherwise known as SAPI, using OLE.
36
44
  email: djberg96@gmail.com
37
45
  executables: []
38
-
39
46
  extensions: []
40
-
41
- extra_rdoc_files:
47
+ extra_rdoc_files:
42
48
  - README
43
49
  - CHANGES
44
50
  - MANIFEST
45
- files:
51
+ files:
46
52
  - CHANGES
47
53
  - examples/example_sapi5.rb
48
54
  - lib/win32/sapi5.rb
@@ -51,39 +57,29 @@ files:
51
57
  - README
52
58
  - test/test_win32_sapi5.rb
53
59
  - win32-sapi.gemspec
54
- has_rdoc: true
55
- homepage: http://www.rubyforge.org/projects/win32utils
56
- licenses:
60
+ homepage: http://github.com/djberg96/win32-sapi
61
+ licenses:
57
62
  - Artistic 2.0
63
+ metadata: {}
58
64
  post_install_message:
59
65
  rdoc_options: []
60
-
61
- require_paths:
66
+ require_paths:
62
67
  - lib
63
- required_ruby_version: !ruby/object:Gem::Requirement
64
- none: false
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- hash: 3
69
- segments:
70
- - 0
71
- version: "0"
72
- required_rubygems_version: !ruby/object:Gem::Requirement
73
- none: false
74
- requirements:
75
- - - ">="
76
- - !ruby/object:Gem::Version
77
- hash: 3
78
- segments:
79
- - 0
80
- version: "0"
68
+ required_ruby_version: !ruby/object:Gem::Requirement
69
+ requirements:
70
+ - - '>='
71
+ - !ruby/object:Gem::Version
72
+ version: '0'
73
+ required_rubygems_version: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
81
78
  requirements: []
82
-
83
79
  rubyforge_project: win32utils
84
- rubygems_version: 1.3.7
80
+ rubygems_version: 2.0.3
85
81
  signing_key:
86
- specification_version: 3
82
+ specification_version: 4
87
83
  summary: An interface to the MS SAPI (Sound API) library.
88
- test_files:
84
+ test_files:
89
85
  - test/test_win32_sapi5.rb