private void processMonitorQueryToSerializeFingerprints(float[] audioBuffer,SerializedFingerprintsHandler handler,double queryOffset){
int samplerate = Config.getInt(Key.NFFT_SAMPLE_RATE);
int size = Config.getInt(Key.NFFT_SIZE);
int overlap = size - Config.getInt(Key.NFFT_STEP_SIZE);
AudioDispatcher d;
try {
d = AudioDispatcherFactory.fromFloatArray(audioBuffer, samplerate, size, overlap);
final NFFTEventPointProcessor minMaxProcessor = new NFFTEventPointProcessor(size,overlap,samplerate);
d.addAudioProcessor(minMaxProcessor);
d.run();
double queryDuration = d.secondsProcessed();
List<NFFTFingerprint> fingerprints = new ArrayList<NFFTFingerprint>(minMaxProcessor.getFingerprints());
handler.handleSerializedFingerprints(PanakoWebserviceClient.serializeFingerprintsToJson(fingerprints),queryDuration,queryOffset);
} catch (UnsupportedAudioFileException e) {
LOG.severe("Unsupported audio");
}
}
NFFTStrategy.java 文件源码
java
阅读 24
收藏 0
点赞 0
评论 0
项目:Panako
作者:
评论列表
文章目录