com.octo.captcha.component.sound.wordtosound
Interface WordToSound

All Known Implementing Classes:
AbstractFreeTTSWordToSound, AbstractWordToSound, CleanFreeTTSWordToSound, FreeTTSWordToSound

public interface WordToSound

Provides methods to tranform a word to a sound

.


Method Summary
 int getMaxAcceptedWordLenght()
          Deprecated. misspelled, use getMaxAcceptedWordLength() instead
 int getMaxAcceptedWordLength()
           
 int getMinAcceptedWordLenght()
          Deprecated. misspelled, use getMinAcceptedWordLength() instead
 int getMinAcceptedWordLength()
           
 javax.sound.sampled.AudioInputStream getSound(java.lang.String word)
          Main method for this service Return a sound with the specified word
 javax.sound.sampled.AudioInputStream getSound(java.lang.String word, java.util.Locale locale)
          Main method for this service Return a sound with the specified word and Locale, depending on the local a sound is not the same.
 

Method Detail

getMaxAcceptedWordLenght

int getMaxAcceptedWordLenght()
Deprecated. misspelled, use getMaxAcceptedWordLength() instead

Returns:
the max word lenght accepted by this word2image service

getMinAcceptedWordLenght

int getMinAcceptedWordLenght()
Deprecated. misspelled, use getMinAcceptedWordLength() instead

Returns:
the min word lenght accepted by this word2image service

getMaxAcceptedWordLength

int getMaxAcceptedWordLength()
Returns:
the max word length accepted by this word2image service

getMinAcceptedWordLength

int getMinAcceptedWordLength()
Returns:
the min word length accepted by this word2image service

getSound

javax.sound.sampled.AudioInputStream getSound(java.lang.String word)
                                              throws CaptchaException
Main method for this service Return a sound with the specified word

Parameters:
word - The word to tranform into sound
Returns:
the generated sound
Throws:
CaptchaException - if word is invalid or an exception occurs during the sound generation

getSound

javax.sound.sampled.AudioInputStream getSound(java.lang.String word,
                                              java.util.Locale locale)
                                              throws CaptchaException
Main method for this service Return a sound with the specified word and Locale, depending on the local a sound is not the same. This is a big difference with an image.

Parameters:
word - The word to tranform into sound
locale - Locale for the sound
Returns:
the generated sound
Throws:
CaptchaException - if word is invalid or an exception occurs during the sound generation


Copyright 2003-2009 JCaptcha. All Rights Reserved.