tts 0.8.1 → 0.8.2
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.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/tts.rb +7 -4
- data/tts.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 83919a609ee80d82a514a698936ebfb3e21e2bae
|
4
|
+
data.tar.gz: 20621b15fdcc69b2d6cd9dc1b0e022f021f718f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3af93aff5e8d6d3890f1b4b362d610eb3f67c1633ed72aa5f9254a62d6458cc39755bf54af4a8cdac883c9336a93916c10e1d2309dd00e2e78f336225478562a
|
7
|
+
data.tar.gz: 567ee87246cd0d96a510ac9fbdf9c341e823d6e8ce210eeefc38fee1f66594aec764f86eb0c67558885af0fca7865b68eca374e3931eddfcece739373eccf6b3
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.8.2
|
data/lib/tts.rb
CHANGED
@@ -80,6 +80,10 @@ module Tts
|
|
80
80
|
@@temp_file ||= Tempfile.new.path
|
81
81
|
end
|
82
82
|
|
83
|
+
def play_file_name
|
84
|
+
@@play_file_file ||= Tempfile.new.path
|
85
|
+
end
|
86
|
+
|
83
87
|
def merge_mp3_file file_name
|
84
88
|
`cat #{temp_file_name} >> "#{file_name}" && rm #{temp_file_name}`
|
85
89
|
end
|
@@ -91,10 +95,9 @@ module Tts
|
|
91
95
|
puts "mpg123 executable NOT found. This function only work with POSIX systems.\n Install mpg123 with `brew install mpg123` or `apt-get install mpg123`"
|
92
96
|
exit 1
|
93
97
|
end
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
File.delete(fn)
|
98
|
+
self.to_file(lang, play_file_name)
|
99
|
+
times.times{|i| `mpg123 --no-control -q #{play_file_name}`}
|
100
|
+
File.delete(play_file_name)
|
98
101
|
end
|
99
102
|
|
100
103
|
end
|
data/tts.gemspec
CHANGED