Fix bug.
This commit is contained in:
parent
b7d7b6e9ae
commit
76646d0b43
|
@ -4,7 +4,7 @@ module RuCaptcha
|
|||
require 'fileutils'
|
||||
EspeakDataDir = "#{ENV['HOME']}/espeak-ng-data"
|
||||
EspeakBuildDir = "#{ENV['HOME']}/.espeak_build"
|
||||
EspeakLibDir = "#{ENV['HOME']}/shared_library"
|
||||
EspeakLibDir = "#{ENV['HOME']}/.espeak_build/shared_library"
|
||||
unless Dir.exist?(EspeakDataDir)
|
||||
FileUtils.cp_r(File.expand_path("../../../resources/espeak-ng-data", __FILE__), EspeakDataDir)
|
||||
end
|
||||
|
@ -79,7 +79,7 @@ module RuCaptcha
|
|||
cmd << " -g #{gap}" unless @gap.nil?
|
||||
cmd << " -v '#{voice}'" unless @voice.nil?
|
||||
cmd << " -w #{wav_file} ' #{code}'"
|
||||
system({'LD_LIBRARY_PATH'=>"#{ENV['HOME']}/.espeak_build/shared_library"}, cmd)
|
||||
system({'LD_LIBRARY_PATH'=>EspeakLibDir}, cmd)
|
||||
true
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue