com.octo.captcha.component.sound.wordtosound
Class AbstractWordToSound

java.lang.Object
  extended by com.octo.captcha.component.sound.wordtosound.AbstractWordToSound
All Implemented Interfaces:
WordToSound
Direct Known Subclasses:
FreeTTSWordToSound

public abstract class AbstractWordToSound
extends java.lang.Object
implements WordToSound

WordToSound abstract implementation


Field Summary
protected  SoundConfigurator configurator
           
protected  int maxAcceptedWordLength
           
protected  int minAcceptedWordLength
           
 
Constructor Summary
AbstractWordToSound(SoundConfigurator configurator, int minAcceptedWordLength, int maxAcceptedWordLength)
          Constructor with a configurator
 
Method Summary
protected abstract  javax.sound.sampled.AudioInputStream addEffects(javax.sound.sampled.AudioInputStream sound)
          Add effect to the sound
 int getMaxAcceptedWordLenght()
           
 int getMaxAcceptedWordLength()
           
 int getMinAcceptedWordLenght()
           
 int getMinAcceptedWordLength()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.octo.captcha.component.sound.wordtosound.WordToSound
getSound, getSound
 

Field Detail

maxAcceptedWordLength

protected int maxAcceptedWordLength

minAcceptedWordLength

protected int minAcceptedWordLength

configurator

protected SoundConfigurator configurator
Constructor Detail

AbstractWordToSound

public AbstractWordToSound(SoundConfigurator configurator,
                           int minAcceptedWordLength,
                           int maxAcceptedWordLength)
Constructor with a configurator

Parameters:
configurator - the configuration for this particular voice
minAcceptedWordLength - Length Minimal of generated words
maxAcceptedWordLength - Length Maximal of generated words
Method Detail

getMaxAcceptedWordLength

public int getMaxAcceptedWordLength()
Specified by:
getMaxAcceptedWordLength in interface WordToSound
Returns:
the max word length accepted by this word2image service

getMinAcceptedWordLength

public int getMinAcceptedWordLength()
Specified by:
getMinAcceptedWordLength in interface WordToSound
Returns:
the min word length accepted by this word2image service

getMaxAcceptedWordLenght

public int getMaxAcceptedWordLenght()
Specified by:
getMaxAcceptedWordLenght in interface WordToSound
Returns:
the max word lenght accepted by this word2image service

getMinAcceptedWordLenght

public int getMinAcceptedWordLenght()
Specified by:
getMinAcceptedWordLenght in interface WordToSound
Returns:
the min word lenght accepted by this word2image service

addEffects

protected abstract javax.sound.sampled.AudioInputStream addEffects(javax.sound.sampled.AudioInputStream sound)
Add effect to the sound

Parameters:
sound - The sound to modify
Returns:
The modified sound.


Copyright 2003-2009 JCaptcha. All Rights Reserved.