ClapApi, WhistleApipublic class DetectionApi
extends java.lang.Object
| Modifier and Type | Field | Description |
|---|---|---|
protected int |
fftSampleSize |
|
protected int |
highPass |
|
protected int |
lowerBoundary |
|
protected int |
lowPass |
|
protected double |
maxFrequency |
|
protected double |
maxIntensity |
|
protected int |
maxNumZeroCross |
|
protected double |
maxStandardDeviation |
|
protected double |
minFrequency |
|
protected double |
minIntensity |
|
protected int |
minNumZeroCross |
|
protected double |
minStandardDeviation |
|
protected int |
numFrequencyUnit |
|
protected int |
numRobust |
|
protected double |
unitFrequency |
|
protected int |
upperBoundary |
|
protected WaveHeader |
waveHeader |
| Constructor | Description |
|---|---|
DetectionApi(WaveHeader waveHeader) |
Constructor, support mono Wav only, 4096 sample byte size for 44100Hz
16bit mono wav
|
| Modifier and Type | Method | Description |
|---|---|---|
protected void |
init() |
Initiate the settings for specific sound detection
|
protected boolean |
isPassedFrequency(double[] spectrum) |
|
protected boolean |
isPassedIntensity(double[] spectrum) |
|
protected boolean |
isPassedStandardDeviation(double[][] spectrogramData) |
|
protected boolean |
isPassedZeroCrossingRate(short[] amplitudes) |
|
boolean |
isSpecificSound(byte[] audioBytes) |
Determine the audio bytes contains a specific sound or not
|
protected void |
normalizeSpectrogramData(double[][] spectrogramData) |
protected WaveHeader waveHeader
protected int fftSampleSize
protected int numFrequencyUnit
protected double unitFrequency
protected double minFrequency
protected double maxFrequency
protected double minIntensity
protected double maxIntensity
protected double minStandardDeviation
protected double maxStandardDeviation
protected int highPass
protected int lowPass
protected int minNumZeroCross
protected int maxNumZeroCross
protected int lowerBoundary
protected int upperBoundary
protected int numRobust
public DetectionApi(WaveHeader waveHeader)
sampleRate - Sample rate of the input audio bytebitsPerSample - Bit size of a sample of the input audio byteprotected void init()
public boolean isSpecificSound(byte[] audioBytes)
audioBytes - input audio byteprotected void normalizeSpectrogramData(double[][] spectrogramData)
protected boolean isPassedStandardDeviation(double[][] spectrogramData)
protected boolean isPassedFrequency(double[] spectrum)
protected boolean isPassedIntensity(double[] spectrum)
protected boolean isPassedZeroCrossingRate(short[] amplitudes)
Copyright © 2018. All Rights Reserved.