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