wasabi_pea 0.2 → 0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/wasabi_pea.rb +9 -4
- metadata +1 -1
data/lib/wasabi_pea.rb
CHANGED
@@ -14,12 +14,17 @@ module TextToSpeech
|
|
14
14
|
end
|
15
15
|
rescue Exception => error
|
16
16
|
$stderr.puts(" #{error.message}")
|
17
|
+
return nil
|
17
18
|
end
|
18
19
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
20
|
+
begin
|
21
|
+
io = StringIO.new(open(file, "rb") {|io| io.read })
|
22
|
+
io.original_filename = "#{file_name}.mp3"
|
23
|
+
io.content_type = "audio/mpeg"
|
24
|
+
return io
|
25
|
+
rescue
|
26
|
+
return nil
|
27
|
+
end
|
23
28
|
end
|
24
29
|
|
25
30
|
end
|