1

I have a basic code of checking audio similarity between any 2 audio files.

I am using chromaprint and pyacousitic library for checking similarity of 2 audio and its giving me a score of 50-100 range based on similarity.

I need a way to extract or at least be able to tell at this timestamp the audio is similar.

So far I haven't been able to find any way to do this or is it even possible?

Didn't get anything to try to extract the matching audio timestamp.

import acoustid
import chromaprint

duration, fp_encoded = acoustid.fingerprint_file('music.mp3')
fingerprint, version = chromaprint.decode_fingerprint(fp_encoded)
print(fingerprint)

duration1, fp_encoded1 = acoustid.fingerprint_file('music1.mp3')
fingerprint1, version1 = chromaprint.decode_fingerprint(fp_encoded1)
print(fingerprint1)

from fuzzywuzzy import fuzz
similarity = fuzz.ratio(fingerprint1, fingerprint)
print(similarity)

52
sophros
  • 14,672
  • 11
  • 46
  • 75
  • What do you mean my matching timestamp? Is this about the timestamp of the audio file? – sophros Jun 24 '19 at 07:36
  • Yes, I mean for example I found similarity of audio around 00:01:20 (hh:mm:ss) – M.Harish Rao Jun 24 '19 at 09:26
  • Well, to me this has nothing to do with a audio file timestamp but rather a portion of the audio similarity. Then my answer should be of use to you. – sophros Jun 24 '19 at 12:23

1 Answers1

0

I do not know the libraries you are using but you are asking about the possibility of performing comparison of audio files. The following answers give some clues about it (even if they do not pertain only to Python):

  1. https://stackoverflow.com/a/6739398/6573902
  2. Acoustic Audio Comparing Library
  3. Java compare two audio files with fingerprint

There are also many bindings which would help you use libraries written in other languages in Python.

sophros
  • 14,672
  • 11
  • 46
  • 75