espeak-ruby 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of espeak-ruby might be problematic. Click here for more details.

Files changed (5) hide show
  1. data/README.rdoc +25 -6
  2. data/Rakefile +10 -0
  3. data/lib/espeak-ruby.rb +5 -4
  4. metadata +22 -11
  5. data/VERSION.yml +0 -5
data/README.rdoc CHANGED
@@ -7,7 +7,7 @@ espeak-ruby is small Ruby API for utilizing 'espeak' and 'lame' to create Text-T
7
7
 
8
8
  == Install
9
9
 
10
- sudo gem install dejan-espeak-ruby --source http://gems.github.com
10
+ gem install espeak-ruby
11
11
 
12
12
  == Example
13
13
 
@@ -28,16 +28,16 @@ Currently only subset of espeak features is supported.
28
28
 
29
29
  :voice => 'en', # use voice file of this name from espeak-data/voices
30
30
  :pitch => 50, # pitch adjustment, 0 to 99
31
- :speed => 170 # speed in words per minute, 80 to 370
31
+ :speed => 170, # speed in words per minute, 80 to 370
32
+ :quiet => true # prevent espeak-ruby from printing to stdout. (default false)
32
33
 
33
34
 
34
- This can be easily overriden:
35
+ These are default values, and they can be easily overridden:
35
36
 
36
37
  espeak("zdravo.mp3", :text => "Zdravo svete", :voice => "sr", :pitch => 90, :speed => 200)
37
38
 
38
39
  == Requirements
39
40
 
40
- * Linux or Windows (I failed in trying to compile espeak on Mac)
41
41
  * http://espeak.sourceforge.net
42
42
  * http://lame.sourceforge.net/index.php
43
43
 
@@ -45,6 +45,25 @@ This can be easily overriden:
45
45
 
46
46
  * {espeak-http}[http://github.com/dejan/espeak-http] - Micro web app for Text-To-Speech conversion via HTTP powered by Ruby, Sinatra, lame, espeak and espeak-ruby
47
47
 
48
- == Credits
48
+ == Licence
49
49
 
50
- Author: {Dejan Simic}[http://github.com/dejan]
50
+ Copyright (c) 2008 Dejan Simic
51
+
52
+ Permission is hereby granted, free of charge, to any person obtaining
53
+ a copy of this software and associated documentation files (the
54
+ "Software"), to deal in the Software without restriction, including
55
+ without limitation the rights to use, copy, modify, merge, publish,
56
+ distribute, sublicense, and/or sell copies of the Software, and to
57
+ permit persons to whom the Software is furnished to do so, subject to
58
+ the following conditions:
59
+
60
+ The above copyright notice and this permission notice shall be
61
+ included in all copies or substantial portions of the Software.
62
+
63
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
64
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
65
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
66
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
67
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
68
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
69
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile ADDED
@@ -0,0 +1,10 @@
1
+ require 'rake'
2
+
3
+ desc 'Run all specs'
4
+ task :spec do
5
+ system('spec spec')
6
+ end
7
+
8
+ desc 'Default: run specs.'
9
+ task :default => :spec
10
+
data/lib/espeak-ruby.rb CHANGED
@@ -11,6 +11,7 @@ module ESpeak
11
11
  # :voice - use voice file of this name from espeak-data/voices. ie 'en', 'de', ...
12
12
  # :pitch - pitch adjustment, 0 to 99
13
13
  # :speed - speed in words per minute, 80 to 370
14
+ # :quiet - remove printing to stdout. Affects only lame (default false)
14
15
  #
15
16
  def espeak(filename, options)
16
17
  if execute_system_command(filename, prepare_options(options))
@@ -47,14 +48,14 @@ private
47
48
  end
48
49
 
49
50
  def execute_system_command(filename, options)
50
- system([espeak_command(options), lame_command(filename)] * " | ")
51
+ system([espeak_command(options), lame_command(filename, options)] * " | ")
51
52
  end
52
53
 
53
54
  def espeak_command(options)
54
55
  %|espeak "#{options[:text]}" --stdout -v#{options[:voice]} -p#{options[:pitch]} -s#{options[:speed]}|
55
56
  end
56
57
 
57
- def lame_command(filename)
58
- "lame -V2 - #{filename}"
58
+ def lame_command(filename, options)
59
+ "lame -V2 - #{filename} #{'--quiet' if options[:quiet] == true}"
59
60
  end
60
- end
61
+ end
metadata CHANGED
@@ -1,7 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: espeak-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ hash: 15
5
+ prerelease:
6
+ segments:
7
+ - 0
8
+ - 4
9
+ - 0
10
+ version: 0.4.0
5
11
  platform: ruby
6
12
  authors:
7
13
  - Dejan Simic
@@ -9,7 +15,7 @@ autorequire:
9
15
  bindir: bin
10
16
  cert_chain: []
11
17
 
12
- date: 2009-02-21 00:00:00 +01:00
18
+ date: 2012-04-17 00:00:00 +02:00
13
19
  default_executable:
14
20
  dependencies: []
15
21
 
@@ -22,41 +28,46 @@ extensions: []
22
28
  extra_rdoc_files: []
23
29
 
24
30
  files:
25
- - README.rdoc
26
- - VERSION.yml
31
+ - Rakefile
27
32
  - lib/espeak-ruby.rb
28
33
  - lib/hash_ext.rb
29
34
  - spec/espeak_ruby_spec.rb
30
35
  - spec/hash_ext_spec.rb
31
36
  - spec/spec_helper.rb
37
+ - README.rdoc
32
38
  has_rdoc: true
33
39
  homepage: http://github.com/dejan/espeak-ruby
34
40
  licenses: []
35
41
 
36
42
  post_install_message:
37
- rdoc_options:
38
- - --inline-source
39
- - --charset=UTF-8
43
+ rdoc_options: []
44
+
40
45
  require_paths:
41
46
  - lib
42
47
  required_ruby_version: !ruby/object:Gem::Requirement
48
+ none: false
43
49
  requirements:
44
50
  - - ">="
45
51
  - !ruby/object:Gem::Version
52
+ hash: 3
53
+ segments:
54
+ - 0
46
55
  version: "0"
47
- version:
48
56
  required_rubygems_version: !ruby/object:Gem::Requirement
57
+ none: false
49
58
  requirements:
50
59
  - - ">="
51
60
  - !ruby/object:Gem::Version
61
+ hash: 3
62
+ segments:
63
+ - 0
52
64
  version: "0"
53
- version:
54
65
  requirements: []
55
66
 
56
67
  rubyforge_project:
57
- rubygems_version: 1.3.5
68
+ rubygems_version: 1.6.2
58
69
  signing_key:
59
- specification_version: 2
70
+ specification_version: 3
60
71
  summary: "espeak-ruby is small Ruby API for utilizing \xE2\x80\x98espeak\xE2\x80\x99 and \xE2\x80\x98lame\xE2\x80\x99 to create Text-To-Speech mp3 files"
61
72
  test_files: []
62
73
 
data/VERSION.yml DELETED
@@ -1,5 +0,0 @@
1
- ---
2
- :major: 0
3
- :minor: 3
4
- :patch: 0
5
-