espeak-ruby 1.0.5 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +6 -10
  3. data/lib/espeak/speech.rb +3 -1
  4. metadata +6 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6668613d8bf8daabc824864e551fd7cfcfff3cddf08d3c994a3cd088d704900b
4
- data.tar.gz: '0313183c857d3d4fa1444ae46b3fb62d292157e2922ba5aa8696acf6098284d2'
3
+ metadata.gz: 9d5971c82e6e1b6f3aee1178a9c92cea060a643daa57bc606b88498ce7f17e1e
4
+ data.tar.gz: f668512d5fdb406c28f326d8c0bcc6a22472baf80ca024aa4612bb666abdaa07
5
5
  SHA512:
6
- metadata.gz: f2fdcf4eadd06e21b75f8024048f353298b3522b9e97347dbad14e930359f5fa5e7d50facfa2c120df60978691e35767d5f36c28016b808496999f8453002e2d
7
- data.tar.gz: ec27483768fb3016c9304327528afd4dc1fec73473a6bea8560c3b2128e35c1df8a45091965703687f1b8d81f2b0f9b0d1cda6134361a0fa6f58b6acde93263d
6
+ metadata.gz: f644bde0b8ebe76d934c170eb9f8a2b4705935d24c09011978bbe9d7c0b5ec3eba85913169d2d0e72fb3bef8b747f4dc3a1f1822c865e4446165681f8d1d1e6e
7
+ data.tar.gz: c973d3d750fef73c8c62080d4b59eccbddfc4580378f81ae062f9b966b0bef810c32340f55049efffecf4bff65c36029fb1e8089b6f80ecff265072c432fc6c8
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # espeak-ruby
2
2
 
3
- espeak-ruby is a small Ruby API for utilizing [espeak](http://espeak.sourceforge.net) and [lame](http://lame.sourceforge.net/) to create Text-To-Speech mp3 files. It can also just speak (without saving).
3
+ espeak-ruby is a small Ruby API for utilizing [espeak](http://espeak.sourceforge.net) and [lame](http://lame.sourceforge.net/) to create Text-To-Speech mp3 files or just speak (without saving). See [live demo](https://espeak.rors.org/).
4
4
 
5
5
  ## Install
6
6
 
@@ -12,7 +12,6 @@ gem "espeak-ruby", require: "espeak"
12
12
 
13
13
  ## Examples
14
14
 
15
-
16
15
  ```ruby
17
16
  # Speaks "YO!"
18
17
  speech = ESpeak::Speech.new("YO!")
@@ -34,10 +33,11 @@ ESpeak::Voice.find_by_language('en') #<ESpeak::Voice:0x007fe1d3806be8 @language=
34
33
  Currently only subset of espeak features is supported.
35
34
 
36
35
  ```ruby
37
- :voice => 'en' # use voice file of this name from espeak-data/voices
38
- :pitch => 50 # pitch adjustment, 0 to 99
39
- :speed => 170 # speed in words per minute, 80 to 370
40
- :capital => 170 # increase emphasis (pitch) of capitalized words, 1 to 40 (for natural sound, can go higher)
36
+ :voice => 'en' # use voice file of this name from espeak-data/voices
37
+ :pitch => 50 # pitch adjustment, 0 to 99
38
+ :speed => 170 # speed in words per minute, 80 to 370
39
+ :capital => 170 # increase emphasis (pitch) of capitalized words, 1 to 40 (for natural sound, can go higher)
40
+ :amplitude => 150 # amplitude (volume) adjustment, 0 to 200
41
41
  ```
42
42
 
43
43
  These are default values, and they can be easily overridden:
@@ -56,10 +56,6 @@ Speech.new("Zdravo svete", voice: "sr", pitch: 90, speed: 200).speak
56
56
 
57
57
  apt-get install espeak lame
58
58
 
59
- ## Related
60
-
61
- * [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
62
-
63
59
  ## Licence
64
60
 
65
61
  espeak-ruby is released under the [MIT License](/MIT-LICENSE).
data/lib/espeak/speech.rb CHANGED
@@ -12,6 +12,7 @@ module ESpeak
12
12
  # :speed - speed in words per minute, 80 to 370
13
13
  # :capital - increase emphasis of capitalized letters by raising pitch by this amount
14
14
  # no range given in man but good range is 10-40 to start
15
+ # :amplitude - amplitude adjustment, 0 to 200
15
16
  # :quiet - remove printing to stdout. Affects only lame (default false)
16
17
  #
17
18
  def initialize(text, options = {})
@@ -73,12 +74,13 @@ module ESpeak
73
74
  pitch: 50,
74
75
  speed: 170,
75
76
  capital: 1,
77
+ amplitude: 100,
76
78
  quiet: true }
77
79
  end
78
80
 
79
81
  def espeak_command(options, flags = '')
80
82
  ['espeak', @text.to_s, flags.to_s, "-v#{options[:voice]}", "-p#{options[:pitch]}", "-k#{options[:capital]}",
81
- "-s#{options[:speed]}"]
83
+ "-s#{options[:speed]}", "-a#{options[:amplitude]}"]
82
84
  end
83
85
 
84
86
  def std_lame_command(options)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: espeak-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dejan Simic
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-30 00:00:00.000000000 Z
11
+ date: 2022-09-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -72,7 +72,7 @@ licenses:
72
72
  - MIT
73
73
  metadata:
74
74
  rubygems_mfa_required: 'true'
75
- post_install_message:
75
+ post_install_message:
76
76
  rdoc_options: []
77
77
  require_paths:
78
78
  - lib
@@ -87,8 +87,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
87
87
  - !ruby/object:Gem::Version
88
88
  version: '0'
89
89
  requirements: []
90
- rubygems_version: 3.2.32
91
- signing_key:
90
+ rubygems_version: 3.0.3.1
91
+ signing_key:
92
92
  specification_version: 4
93
93
  summary: espeak-ruby is small Ruby API for utilizing ‘espeak’ and ‘lame’ to create
94
94
  Text-To-Speech mp3 files