1
$\begingroup$

I'm writing a gunshot detector software. I'm using this article as reference:https://arxiv.org/ftp/arxiv/papers/1706/1706.08759.pdf.

For now, my software is able to recognize an impulsive sound. Now, I need to take this impulsive sound and check if it's and gunshot or not.

For gunshot detection, the author of this article uses MFCC features, but, I'm having a lot of difficulty to extract these MFCC features.

I'm using the Sphinx 4 Java library for this. Here is the base code:

// Windown size is 99 (16 KHz sample rate)
private void calculateMFCC(double[] windowAfterFFT) {
    final ArrayList<DataProcessor> pipeline = new ArrayList<>();
    pipeline.add(new SingleValueAudioSource(windowAfterFFT));
    pipeline.add(new MelFrequencyFilterBank(130, 6800, 1)); // params: (minFreq, maxFreq, numberFilters)
    pipeline.add(new DiscreteCosineTransform2(4, 20)); // params: (numberMelFilters, cepstrumSize)
    FrontEnd f = new FrontEnd(pipeline);
    log.info("Result: " + f.getData());
}

My mainly issue is that I can't figure out these items:

  • How do I define the minimum frequency, maximum frequency and the number of filters that I need for a gunshot detection on the mel frequency filter bank?
  • How do I define the cepstrum size that I need for gunshot detection?

Most of the articles that I read are not very detailed about these topics.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.