Moving to here from this thread.
I have a significant visual impairment and love EE. But the number of EE-powered sites that use CAPTCHAs to combat comment spam is disconcerting. I cannot read them at all. I would appreciate it if someone could look into getting an audio CAPTCHA bundled with the visual one.
Here’s a first approach to the subject: Audio CAPTCHA.
What the module does is pretty straightforward. There is one single tag that returns the URL to a dynamically created .wav-file.
You can use this tag as if it was the URL to an ordinary .wav-file and include it in your templates, probably in the vicinity of the {captcha} variable, in any way youu see fit. Some basic examples.
Oh my goodness, I need tech support!
Ok, I entered my path as this:
/www/username/public_html/
I also tried:
/www/username/public_html/audio/ /www/username/public_html/audio/lisajill/
and whenever I click I just get Invalid URI, see this entry
I already had an “audio” folder for my poetry recordings, so I put a “lisajill” folder in there and used this tag:
{if captcha}
<div class="row">
<span class="label">Please enter the word you see in the image:</span>
<span class="formw">{captcha}
<input type="text" name="captcha" value="{captcha_word}" maxlength="20" />
</span>
<a >Read CAPTCHA</a>
</div>
{/if}
It may be because I have no 1.wav etc in the audio folder, must we use “audio” as the folder? I’m already using that and all. I did try renaming the top folder to lisajill-audio with all the .wavs in the top level, but got the same problems.
The (audio-)folder containing the sound-files can be named however you like.
If your doc-root was
/www/username/public_html/
and the (audio-)folder containing a.wav, b.wav, c.wav, … was named
mysounds
you’d enter
/www/username/public_html/mysounds/
in the module configuration.
If your captchas don’t contain numbers you don’t need 1.wav etc.
Right now it seems to be looking for wav-files in
/www/username/public_html/lisajill/
where it doesn’t find any.
Plus there seems to be some issue beginning around the textarea:
<textarea itsalltext_uid="2h2d2w2u1z2b1g351d231w291y17351t1x2d1b231u291p1p" id="itsalltext_generated_id_comment_1" name="comment" cols="70" rows="10"></textarea;</span>
Ah, Safari 3, how I love and hate thee.
Yea, it’s running out of memory. Perhaps I made my sound files too large, I thought I made them plain ole 8bit with Audacity.
But also, the URLs are all butchered. Going to have to downgrade Safari again and see if that helps :(
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 301989873 bytes) =/
Ok yes, was able to correct the URL issues by editing the template in Firefox. Nevertheless it’s trying to use 60meg of memory. Is that because of the size of my audio files or is something else up?
Eh, nevermind. I’m going to just record them in something other than Audacity, I think there’s a confused MIME type issue. Meh.
Thanks =)
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 301989873 bytes) =/
Sounds like large soundfiles…
Version 1.1 also supports MP3, by the way. The only way I could get it to work together with a flash-player like the last example there.
Will be probably be published tomorrow…
Yep, that’s much. Mono and a low sample-rate should actually be sufficient if you got a good microphone.
Good example: http://cafe.bevocal.com/libraries/audio/female1/en_us/alphabet/ Nice quality and around 10k per file.
You probably don’t gain much compression using mp3 when the samples are only 1-2 seconds long.
Works great, but my flash player hates it. Which one are you using, silenz? Mine is balking at something, though I’m not sure what, since it works with my entries the way I have it. The second I substitute the hard URL your module creates, it hates me. So time for something that’ll work with it 😉
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 301989873 bytes) =/
This still keeps me wondering…
I ran some tests on the memory consumption of the module. Roughly speaking it seems to usenot much more than about 2,300,000 bytes base memory + the combined sizes of the audio files used.
Even if your files are 100k each, which is a lot, a 6-letter CAPTCHA would leave you below 3M memory usage. Why on earth would it want to allocate 300M?
EDIT: Well seems to be resolved 😉
Works great, but my flash player hates it. Which one are you using, silenz? Mine is balking at something, though I’m not sure what, since it works with my entries the way I have it. The second I substitute the hard URL your module creates, it hates me. So time for something that’ll work with it 😉
I think I know what you mean. I encountered the same. Most players don’t seem to like the URL. I have no idea why, actually. Back in times of Flash 5 I’ve written some games in Flash but afterwards never got around to do something in Flash anymore.
I’ve been using XSPF Music Player which can play single files as well as xspf-playlists.
So what I did is create an XML-template in EE to work as playlist. In there I use the {exp:audio_captcha:mp3link}-tag to output the URL.
Template site/playlist:
<?xml version="1.0" encoding="UTF-8" ?>
<playlist version="1" xmlns="http://xspf.org/ns/0/">
<trackList>
<track>
<location>{exp:xml_encode}{exp:audio_captcha:mp3link}{/exp:xml_encode}</location>
</track>
</trackList>
</playlist>
Then I feed the playlist to the plugin:
<object type="application/x-shockwave-flash" width="40" height="40"
data="http://localhost/musicplayer.swf?playlist_url=http://localhost/index.php/site/playlist/">
</object>
Which happens to work just fine 😉
Hrm, see, mine can take a playlist, but since it was just a single audio file I figured I’d just feed it the URL. That’s how I do my “talk to people” entries, but I don’t have anything odd in the URL string in those.
Your code just confused the heck out of me, not in the code manner, but in the, “what about all those other playlists?” manner. Nrr. I’ll have to think on this some more. =)
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.