public class FFTFingerprintExtractorNaive
extends java.lang.Object
Constructor and Description |
---|
FFTFingerprintExtractorNaive(float sampleRate,
int fingerprintsPerSecond)
Disables public access to default constructor
|
Modifier and Type | Method and Description |
---|---|
static java.util.Set<FFTFingerprint> |
calculateLandmarks(float[] audioBuffer,
float sampleRate,
int landmarksPerSecond,
int offset) |
void |
calculateSpectralFeatures(float[][] amplitudes,
float[] audioBuffer) |
java.util.Set<FFTFingerprint> |
findFingerprints(float[] audioBuffer,
int timeOffset)
Find landmarks in the audio defined by the float array audioBuffer, for a
certain sample rate.
|
float[][] |
getSpectralFeatures() |
void |
keepSpectralFeatures() |
public FFTFingerprintExtractorNaive(float sampleRate, int fingerprintsPerSecond)
sampleRate
- The sample rate in samples per second.fingerprintsPerSecond
- The requested maximum number of landmarks per second. The actual number of landmarks depend on the input: e.g. generating landmarks on total silence generates not much landmarks.public void calculateSpectralFeatures(float[][] amplitudes, float[] audioBuffer)
public java.util.Set<FFTFingerprint> findFingerprints(float[] audioBuffer, int timeOffset)
audioBuffer
- The float buffer with audio. E.g. 5 seconds at 8kHz takes
5x8000x32bit = 5 x 8k x 4 bytes = 156 kB, 15 seconds takes 478
kB.timeOffset
- The offset, in analysis frames.public float[][] getSpectralFeatures()
public static java.util.Set<FFTFingerprint> calculateLandmarks(float[] audioBuffer, float sampleRate, int landmarksPerSecond, int offset)
public void keepSpectralFeatures()