Audio CAPTCHA module

Most current version is 1.1.

This module can be used to place a link to a dynamically generated sound-file which will spell the CAPTCHAs created by ExpressionEngine.

An example can be seen over here where CAPTCHAs are enabled for comments.

Installation:

  1. Copy the folder named audio_captcha into the modules folder inside your system-directory.
  2. Copy the file named lang.audio_captcha.php into the /language/english folder inside your system-directory.
  3. Copy the folder named audio to any accessable location on your webserver. The folder does not have to be named “audio”, it can have any name you like as long as you enter the correct path to it in step 5.
  4. Navigate to Modules in your CP and find the module named Audio CAPTCHA. Click Install.
  5. Enter the Settings of your the newly installed module and enter the absolute path (not URL) to the audio-folder you uploaded in step 3.

Usage:

To use the module in your templates there are two single tags. They return an URL to a sound-file which is created on-the-fly when clicked.

Example to create a wav-file:

<a href="<span style="color:green;">{exp:audio_captcha:wavlink}</span>">Read CAPTCHA</a>

Example to create a MP3-file:

<a href="<span style="color:green;">{exp:audio_captcha:mp3link}</span>">Read CAPTCHA</a>

The sound-file is put together from the seperate files in the audio-folder.
The module is shipped with two example sample-sets. The standard set and second set in the subfolder named nato.
These files exist in .wav- as well as in .mp3-format.

If you use {exp:audio_captcha:mp3link} to create MP3s you need to have sound-files in MP3-format.
If you use {exp:audio_captcha:wavlink} to create wave-files you need to have sound-files in wave-format.

Of course you can use / create your own sample-sets. You’ll need a sound-file for any letter and number that can appear in the CAPTCHAs in the format you are going to use.

There is also one optional paramter, assuming that some people might want to serve different (more than one) soundsample-sets in certain situtations, like different languages for example.

<span style="color:green;">{exp:audio_captcha:wavlink lang="german"}</span>

The lang="”-parameter can contain any word you like. There must be a subfolder with a corresponding name inside the audio-folder containing a set of sound-files. So in the example above, the module would expect to find .wav-files inside /audio/german.

In case you create your own sound-files to go along with this module or you stumble upon suitable sound-files which are free to use on the net, I’d appreciate if you could share them with the rest of the world in the comments of this entry.

You probably want to keep the files rather small in size. You do not need stereo and proper results can already be achieved with sample rates as small as 8000 Hz.

If you intend to feed MP3s to a Flash-player of some sort you should be aware that Flash 8 only supports the sample rates 8000 Hz, 11025 Hz, 22050 Hz and 44100 Hz. Sounds recorded with other rates will be played either too fast or too slow. No idea if that has changed with Flash 9.

Download: audio_captcha.zip
B


Changelog:

  • 1.1
    Added support for MP3 and mp3-sample-files.
  • 1.0.1
    Added a unique ID to the URL to prevent mediaplayer from caching when file is embedded with <object>-tag.
  • 1.0
    Initial release

Related Entries:

Using Audio Captcha with XSPF player

Using Audio Captcha with Soundmanager2

If you found something useful here and want to show your appreciation feel free to

or


Comments:

1 of 1 pages

The module supports an unlimited number of languages, as along as you create the necessary soundfiles.

Posted by  on  11/27  at  03:44 PM

Good captcha module, but only one language :(

Posted by bobi  on  11/27  at  01:20 PM

1 of 1 pages