14th June 2007

Captcha Audio Service

This is still online as a handful of sites still use it, but the service dates back to 2007 and easier options are now available – notably reCAPTCHA.

This is a simple to use SOAP service which quickly creates mp3 audio versions of alphanumeric strings. Various parameters can be adjusted to change the style, security and content of the audio.

The service grew out of a client requirement for a Captcha access solution for visually impaired screenreader users, it is not an approach which is particularly useful to ID audiences – nor is it anything more than a partial solution to the many accessibility issues created by Captcha.

Code examples for PHP are provided, but anything which consumes WSDL should work fine.

This free audio service is intended for low volume commercial or personal sites only. For the sake of efficiency the requests made via SOAP are cached and the mp3 is created only when its url is requested – creation itself takes only a fraction of a second. Please don’t attempt to cache the audio on your server, it won’t be any quicker for the end user but will use unnecessary resources here.

Captcha Security

Marginal security can be achieved by varying the mode and phrasing of the Captcha audio. By default the audio is clear and therefore very easy for speech recognition applications to interpret. Further obfuscation options are included to make the audio more challenging for programmatic agents. Obfuscation is achieved mostly by using delayed feedback effects which are varied regularly, as are all the component audio files. In basic testing with desktop recognition software I’ve found delayed feedback to be a more successful mask than adding pops, tones and noise since all these are really easy to filter out. It pretty much goes without saying that using audio is unlikely to be as secure as a good graphical Captcha if speech is kept clear enough to be widely useful.

Other Captcha Links

  • Carnegie Melon University.
    The university originally coined the term ‘CAPTCHA‘. If you are looking for a quick fix solution or ready made plugins for WordPress, then their free Captcha service might be just what you’re after. It includes both visual and audible challenges.
  • W3C : WAI Captcha References Whitepaper on Captcha accessibility, common barriers and alternative approaches to testing for programmatic agents.
  • Google What’s Up? CAPTCHA – CNET Article on a CAPTCHA developed by Google using rotated images and which is much simpler than obscurred character based approaches.
  • Juicy Studio Article.
    Accessibility of Captcha is an article considering accessibility issues and alternative approaches to testing for programmatic agents.
  • freeCap 1.4 : PureMango
    Very flexible and free to use graphical Captcha script in PHP. The script allows backgrounds, fonts and visual effects to be extensively customised.
  • PWNtcha : Visit PWNtcha Website Information on the breaking of graphical Captcha using image manipulation software to allow OCR. The site includes a list of commonly used Captcha scripts and provides a rating of their vulnerability to attack.

PHP SOAP Samples for CAPTCHA service

List of service parameters and their possible values follow; see the WSDL or PHP samples below for more information.

  • $code : Captcha text. A case insensitive, alphanumeric string of maximum length 20 characters.
  • $mode : one of ‘simple’, ‘phonetic’, ‘both’ or ‘animal’.
  • $language : either ‘UK-English’ or ‘US-English’.
  • $obfuscate : TRUE or FALSE. Disguise the audio.
  • $prefix : TRUE or FALSE. Add a random prefix to the audio.
  • $extend : TRUE or FALSE. Extend the lifespan to 30 minutes from 3 minutes.
  • $count : TRUE or FALSE. Add a prefix which announces the number of Captcha characters.

Output

The url of the Captcha audio as an mp3 is returned, this will be in the form “http://captcha.cognable.com/captcha/xxxxxx/captcha.mp3”. By default the Captcha mp3 is kept available for 3 minutes after generation, beyond this an audio message asking the user to refresh the Captcha will be provided. You can optionally extend the life of the Captcha to 30 minutes, which may be useful if its to be used on complex, time-consuming forms for instance.

The following examples return the fully qualified url of an mp3 audio file.

Variables/Parameters

To generate the Captcha code ‘abc007’ spelt out phonetically, in disguised US English, prefixing audio with the words ‘the Captcha is six characters long’ set the following values:

$code='abc007';
$mode='phonetic';
$language='US-English';
$obfuscate=TRUE;
$prefix=FALSE;
$extend=FALSE;
$count=TRUE;

Using PHP5 SOAP extension

$client = new SoapClient('http://captcha.cognable.com/wsdl/');

$captcha_data= array(

	'Code'		=>		$code,
	'Mode'		=>		$mode,
	'Language'	=>		$language,
	'Obfuscate'	=>		$obfuscate,  
	'Prefix'	=>		$prefix,
	'Extend'	=>		$extend,
	'Count'		=>		$count            
					);

$mp3url=$client->captcha($captcha_data); 

Using PHP4/5 with NuSoap

Download nusoap here: NuSOAP Download Page. NuSOAP has slightly different syntax.

require_once('nusoap.php');  
$client = new soapclient('http://captcha.cognable.com/wsdl/',true);

$captcha_data= array(

	'Code'		=>		$code,
	'Mode'		=>		$mode,
	'Language'	=>		$language,
	'Obfuscate'	=>		$obfuscate,  
	'Prefix'	=>		$prefix,
	'Extend'	=>		$extend,
	'Count'		=>		$count            
					);

$mp3url=$client->call('captcha', array('captcha_data' => $captcha_data)); 

Latest Posts By simon

Category

Downloads