def generate_speech_captcha
      raise RuntimeError, "espeak disabled" unless EasyCaptcha.espeak?
      if EasyCaptcha.cache
        File.read(speech_captcha_cache_path(current_captcha_code))
      else
        wav_file = Tempfile.new("#{current_captcha_code}.wav")
        EasyCaptcha.espeak.generate(current_captcha_code, wav_file.path)
        File.read(wav_file.path)
      end
    end
def generate_speech_captcha
      raise RuntimeError, "espeak disabled" unless EasyCaptcha.espeak?
      if EasyCaptcha.cache
        File.read(speech_captcha_cache_path(current_captcha_code))
      else
        wav_file = Tempfile.new("#{current_captcha_code}.wav")
        EasyCaptcha.espeak.generate(current_captcha_code, wav_file.path)
        File.read(wav_file.path)
      end
    end
generate speech by captcha from session