Search code examples
javajspcaptchatext-to-speechjavasound

Concatenate sounds for the visually impaired in captcha code


I have a code that generates a captcha image from random characters in Java and returns to the HTML form where it is displayed. But I want to add sound clip as well to the image for the people who are visually impaired.

Can anyone help me with any tutorial or example or something they have themselves come up with?


Solution

  • For the server-side, you might have a servlet that generates the sound using javax.sound.sampled (for concatenating pre-recorded parts for the letters and numbers). See Concatenating or mixing audio files for working source.

    Unless you explicitly intend to use an applet (which I do not advise) then the client-side of this is not really related to Java.