nl.captcha.audio.noise
Class RandomNoiseProducer
java.lang.Object
nl.captcha.audio.noise.RandomNoiseProducer
All Implemented Interfaces: NoiseProducer
public class RandomNoiseProducer extends java.lang.Objectimplements NoiseProducer
Adds noise to a Sample
from one of the given noiseFiles
.
By default this noise comes from one of three files, all located in
/sounds/noises/
: radio_tuning.wav
,
restaurant.wav
, and swimming.wav
. This can be
overridden by passing the location of your own sound files to the
constructor, e.g.:
String myFiles = { "/mysounds/noise1.wav", "/mysounds/noise2.wav" };
NoiseProducer myNp = new RandomNoiseProducer(myFiles);
Author:
James Childers
Method Summary
Sample
addNoise (java.util.List<Sample > samples)
Append the given samples
to each other, then add random
noise to the result.
java.lang.String
toString ()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
RandomNoiseProducer
public RandomNoiseProducer ()
RandomNoiseProducer
public RandomNoiseProducer (java.lang.String[] noiseFiles)
addNoise
public Sample addNoise (java.util.List<Sample > samples)
Append the given samples
to each other, then add random
noise to the result.
Specified by: addNoise
in interface NoiseProducer
toString
public java.lang.String toString ()
Overrides: toString
in class java.lang.Object
Copyright © 2010-2011 James Childers. All Rights Reserved.