Skip to content

Some questions #2

Description

@Johndirr

What a nice project! I'm was looking for a tool that can diff audio files and display their differences.

Since you wrote in the project description that the parameters for feature extraction are like this:

Parameters:

n_mels: 128 (frequency bins)
hop_length: 512 (frame shift)
win_length: 2048 (frame size)
Sample rate: 16kHz

I wonder why the code has other values?

    def __init__(self, file1_path, file2_path):
        self.file1_path = Path(file1_path)
        self.file2_path = Path(file2_path)
        
        # Mel-spectrogram parameters
        self.sr = 16000
        self.n_mels = 128
        self.n_fft = 2048
        self.win_length = 400
        self.hop_length = 160 # 512
        self.similarity_threshold = 1.0 # 1.5 
        #self.distance_threshold = 0.3
        # Store audio data
        self.sr1 = None
        self.sr2 = None
        self.segments = []

I also wonder how the whole process scales? It is possible to diff two audio files of the same movie (uncut and cut edition) in a reasonable time?

Thank you

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions