flite 0.0.3.1-x64-mingw32 → 0.1.0-x64-mingw32

Sign up to get free protection for your applications and to get access to all the features.
data/flite.gemspec CHANGED
@@ -15,10 +15,10 @@ Gem::Specification.new do |spec|
15
15
  spec.version = Flite::VERSION
16
16
  spec.authors = ["Kubo Takehiro"]
17
17
  spec.email = ["kubo@jiubao.org"]
18
- spec.extensions = ["ext/flite/extconf.rb"] if gem_platform == Gem::Platform::RUBY
19
18
  spec.summary = %q{a small speech synthesis library}
20
19
  spec.description = <<EOS
21
- Ruby-flite is a small speech synthesis library using CMU flite[http://cmuflite.org].
20
+ Ruby-flite is a small speech synthesis library for ruby using
21
+ CMU flite[http://cmuflite.org].
22
22
 
23
23
  CMU Flite (festival-lite) is a small, fast run-time synthesis engine
24
24
  developed at CMU and primarily designed for small embedded machines
@@ -34,7 +34,11 @@ EOS
34
34
  files.delete('build.bat')
35
35
  files.delete('.gitignore')
36
36
  if gem_platform == 'current'
37
- files << 'lib/flite_200.so' << 'lib/flite_210.so'
37
+ files += Dir.glob('lib/flite_*.so')
38
+ files += Dir.glob('lib/flite*.dll')
39
+ files << 'lib/libmp3lame-0.dll'
40
+ else
41
+ spec.extensions = ["ext/flite/extconf.rb"]
38
42
  end
39
43
  spec.files = files
40
44
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
data/lib/flite.dll ADDED
Binary file
data/lib/flite.rb CHANGED
@@ -36,12 +36,22 @@ RUBY_VERSION =~ /(\d+).(\d+)/
36
36
  require "flite_#{$1}#{$2}0"
37
37
 
38
38
  module Flite
39
+ # @private
39
40
  @@default_voice = Flite::Voice.new
40
41
 
42
+ # Returns the voice used by {String#speak} and {String#to_speech}.
43
+ #
44
+ # @return [Flite::Voice]
41
45
  def self.default_voice
42
46
  @@default_voice
43
47
  end
44
48
 
49
+ # Set the voice used by {String#speak} and {String#to_speech}.
50
+ # When <code>name</code> is a {Flite::Voice}, use it.
51
+ # Otherwise, use a new voice created by <code>Flite::Voice.new(name)</code>.
52
+ #
53
+ # @param [Flite::Voice or String] name voice or voice name
54
+ # @see Flite::Voice#initialize
45
55
  def self.default_voice=(name)
46
56
  if name.is_a? Flite::Voice
47
57
  @@default_voice = name
@@ -49,10 +59,43 @@ module Flite
49
59
  @@default_voice = Flite::Voice.new(name)
50
60
  end
51
61
  end
62
+
63
+ if RUBY_PLATFORM =~ /mingw32|win32/
64
+ self.sleep_time_after_speaking = 0.3
65
+ end
52
66
  end
53
67
 
54
68
  class String
55
- def to_speech(out = nil)
56
- Flite.default_voice.speech(self, out)
69
+ # Speaks <code>self</code>
70
+ #
71
+ # @example
72
+ # "Hello Flite World!".speak
73
+ def speak
74
+ Flite.default_voice.speak(self)
75
+ end
76
+
77
+ # @overload to_speech(audio_type = :wave, opts = {})
78
+ #
79
+ # Converts <code>self</code> to audio data.
80
+ #
81
+ # @example
82
+ # # Save speech as wav
83
+ # File.binwrite('hello_flite_world.wav',
84
+ # 'Hello Flite World!'.to_speech())
85
+ #
86
+ # # Save speech as mp3
87
+ # File.binwrite('hello_flite_world.mp3',
88
+ # 'Hello Flite World!'to_speech(:mp3))
89
+ #
90
+ # # Save speech as mp3 whose bitrate is 128k.
91
+ # File.binwrite('hello_flite_world.mp3',
92
+ # 'Hello Flite World!'.to_speech(:mp3, :bitrate => 128))
93
+ #
94
+ # @param [Symbol] audo_type :wave or :mp3 (when mp3 support is enabled)
95
+ # @param [Hash] opts audio encoder options
96
+ # @return [String] audio data
97
+ # @see Flite.supported_audio_types
98
+ def to_speech(*args)
99
+ Flite.default_voice.to_speech(self, *args)
57
100
  end
58
101
  end
data/lib/flite/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Flite
2
- VERSION = "0.0.3.1"
2
+ VERSION = "0.1.0"
3
3
  end
data/lib/flite_200.so CHANGED
Binary file
data/lib/flite_210.so CHANGED
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3.1
4
+ version: 0.1.0
5
5
  platform: x64-mingw32
6
6
  authors:
7
7
  - Kubo Takehiro
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-13 00:00:00.000000000 Z
11
+ date: 2015-02-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -53,7 +53,8 @@ dependencies:
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  description: |
56
- Ruby-flite is a small speech synthesis library using CMU flite[http://cmuflite.org].
56
+ Ruby-flite is a small speech synthesis library for ruby using
57
+ CMU flite[http://cmuflite.org].
57
58
 
58
59
  CMU Flite (festival-lite) is a small, fast run-time synthesis engine
59
60
  developed at CMU and primarily designed for small embedded machines
@@ -63,7 +64,8 @@ description: |
63
64
  email:
64
65
  - kubo@jiubao.org
65
66
  executables:
66
- - saytime.rb
67
+ - saytime
68
+ - speaking-web-server
67
69
  extensions: []
68
70
  extra_rdoc_files: []
69
71
  files:
@@ -71,15 +73,31 @@ files:
71
73
  - LICENSE.txt
72
74
  - README.md
73
75
  - Rakefile
74
- - bin/saytime.rb
76
+ - bin/saytime
77
+ - bin/speaking-web-server
75
78
  - ext/flite/extconf.rb
76
79
  - ext/flite/rbflite.c
77
80
  - ext/flite/rbflite.h
81
+ - ext/flite/win32_binary_gem.c
78
82
  - flite.gemspec
79
83
  - lib/flite.rb
80
84
  - lib/flite/version.rb
81
85
  - lib/flite_200.so
82
86
  - lib/flite_210.so
87
+ - lib/flite_cmu_us_awb.dll
88
+ - lib/flite_cmu_indic_lang.dll
89
+ - lib/flite_usenglish.dll
90
+ - lib/flite.dll
91
+ - lib/flite_cmu_us_slt.dll
92
+ - lib/flite_cmu_us_kal16.dll
93
+ - lib/flite_cmu_us_kal.dll
94
+ - lib/flite_cmu_indic_lex.dll
95
+ - lib/flite_cmu_us_rms.dll
96
+ - lib/flite_cmulex.dll
97
+ - lib/flite_cmu_grapheme_lang.dll
98
+ - lib/flite_cmu_grapheme_lex.dll
99
+ - lib/flite_cmu_time_awb.dll
100
+ - lib/libmp3lame-0.dll
83
101
  homepage: https://github.com/kubo/ruby-flite/
84
102
  licenses:
85
103
  - 2-clause BSD-style license