Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8397573
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T20:49:35+00:00 2026-06-09T20:49:35+00:00

I am trying to write an audio fingerprinting library for educational purpose. Its based

  • 0

I am trying to write an audio fingerprinting library for educational purpose. Its based on Computer Vision for Music Identification
. I have a couple of questions relating to the contents of the paper.

  1. I know that two bytes represents a sample, so i wrote this class to extract the samples from a pcm file. I’d like to know if this is right (sorry if its too obvious 🙂 ).

    class FingerPrint:
    
       def __init__(self, pcmFile):
          self.pcmFile = pcmFile
          self.samples = []
          self.init()
    
    
       def init(self):
          # Current samples
          currentSamples = []
    
          # Read pcm file
          with open(self.pcmFile, 'rb') as f:
             byte = f.read(2)
             while byte != '':
               self.samples.append(byte)
               byte = f.read(2)
    
    fp = FingerPrint('output.pcm')
    
  2. If the above code is ok, then according to the book the next thing to do is to convolve the signal with a low pass filter and take every 8th sample. I don’t understand these and why this has to be done, it would be awesome if someone could help me understand (with codes if possible)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T20:49:37+00:00Added an answer on June 9, 2026 at 8:49 pm

    After read the two bytes, you need to convert it into int. You can use struct module.

    But I think you should use NumPy, SciPy:

    To read wave file, you can call scipy.io.wavfile.read()

    http://docs.scipy.org/doc/scipy-0.10.0/reference/tutorial/io.html#module-scipy.io.wavfile

    If your file is raw PCM data, you can call numpy.fromfile()

    http://docs.scipy.org/doc/numpy/reference/generated/numpy.fromfile.html

    for example:

    data = numpy.fromfile("test.pcm", dtype=np.int16)
    

    To design lowpass filter, you can use filter design functions in scipy.signal:

    http://docs.scipy.org/doc/scipy-0.10.1/reference/signal.html#filter-design

    To do the convolve, you can use convoliving functions in scipy.signal:

    http://docs.scipy.org/doc/scipy-0.10.1/reference/signal.html#convolution

    There is also a convolve function in numpy:

    http://docs.scipy.org/doc/numpy/reference/generated/numpy.convolve.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to write a couple of functions that will encrypt or decrypt a file
I'm trying to write an .m file to extract energy features from an audio
I'm trying to write something like Perl Audio Converter , so I need to
I'm trying to write a simple command line audio player using the Python Gstreamer
Right now I'm trying to write a script that will only accept certain audio
I've been trying to write a video+audio using AVAssetWriter and AVAssetWriterInputs. I read multiple
I am trying to write a C++ program which plays real-time processed audio. I
I am trying to write an audio application using PortAudio, but if any other
I am trying to write an uploaded multipart file to the filesystem. I have
I am facing a problem regarding audio decoding. I have the SPIMP3 library for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.