|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbe.hogent.tarsos.dsp.SilenceDetector
public class SilenceDetector
The continuing silence detector does not break the audio processing pipeline when silence is detected.
| Field Summary | |
|---|---|
static double |
DEFAULT_SILENCE_THRESHOLD
|
| Constructor Summary | |
|---|---|
SilenceDetector()
Create a new silence detector with a default threshold. |
|
SilenceDetector(double silenceThreshold,
boolean breakProcessingQueueOnSilence)
Create a new silence detector with a defined threshold. |
|
| Method Summary | |
|---|---|
double |
currentSPL()
|
boolean |
isSilence(float[] buffer)
|
boolean |
isSilence(float[] buffer,
double silenceThreshold)
Checks if the dBSPL level in the buffer falls below a certain threshold. |
boolean |
process(AudioEvent audioEvent)
Process the audio event. |
void |
processingFinished()
Notify the AudioProcessor that no more data is available and processing has finished. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final double DEFAULT_SILENCE_THRESHOLD
| Constructor Detail |
|---|
public SilenceDetector()
public SilenceDetector(double silenceThreshold,
boolean breakProcessingQueueOnSilence)
silenceThreshold - The threshold which defines when a buffer is silent (in dB).
Normal values are [-70.0,-30.0] dB SPL.breakProcessingQueueOnSilence - | Method Detail |
|---|
public double currentSPL()
public boolean isSilence(float[] buffer,
double silenceThreshold)
buffer - The buffer with audio information.silenceThreshold - The threshold in dBSPL
public boolean isSilence(float[] buffer)
public boolean process(AudioEvent audioEvent)
AudioProcessor
process in interface AudioProcessoraudioEvent - The audio event that contains audio data.
public void processingFinished()
AudioProcessor
processingFinished in interface AudioProcessor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||