dejan-espeak-ruby 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +4 -0
- data/VERSION.yml +1 -1
- data/lib/espeak-ruby.rb +1 -1
- metadata +1 -1
data/README.rdoc
CHANGED
@@ -5,6 +5,10 @@ espeak-ruby is small Ruby API for utilizing 'espeak' and 'lame' to create Text-T
|
|
5
5
|
* eSpeak is a compact open source software speech synthesizer for English and other languages, for Linux and Windows.
|
6
6
|
* LAME is a high quality MPEG Audio Layer III (MP3) encoder licensed under the LGPL.
|
7
7
|
|
8
|
+
== Install
|
9
|
+
|
10
|
+
sudo gem install dejan-espeak-ruby --source http://gems.github.com
|
11
|
+
|
8
12
|
== Example
|
9
13
|
|
10
14
|
require 'rubygems'
|
data/VERSION.yml
CHANGED
data/lib/espeak-ruby.rb
CHANGED
@@ -13,7 +13,7 @@ module ESpeak
|
|
13
13
|
}.merge(opts)
|
14
14
|
|
15
15
|
sanitized_text = text.gsub(/(!|\?|"|`|\\)/, ' ')
|
16
|
-
filename = Digest::SHA1.hexdigest(options.to_s)
|
16
|
+
filename = Digest::SHA1.hexdigest(textrm + options.to_s + ".mp3")
|
17
17
|
|
18
18
|
if system(%$espeak "#{sanitized_text}" --stdout -v#{options[:v]} -p#{options[:p]} -s#{options[:s]} | lame -V2 - #{filename}$)
|
19
19
|
filename
|