Simple audio support for the
Add this line to your application's Gemfile:
And then execute:
Or install it yourself as:
$ gem install simple_audio_captcha
rails g simple_audio_captcha [templatetype] to generate the default template with audio support and overwrite the existing simple captcha template.
Simple Captcha Audio Utilises Espeak to produce audio. The Espeak configuration for voice, pitch and speed can be added to simple captcha:
SimpleCaptcha.setup do |simple_captcha| simple_captcha.voice = 'en' simple_captcha.speed = 100 simple_captcha.pitch = 100 end
See espeak documentation for further details for these parameters.
- Ruby >= 1.9.3
- Rails >= 3.2
- You need to install
lamesystem libraries which would help you in the text to speech conversion and exporting the audio to the
You can install them on OSX from homebrew:
brew install espeak lame
or on a linux based system from your package manager.
- Fork it ( https://github.com/[my-github-username]/simple_audio_captcha/fork )
- Create your feature branch (
git checkout -b my-new-feature)
- Commit your changes (
git commit -am 'Add some feature')
- Push to the branch (
git push origin my-new-feature)
- Create a new Pull Request