[Python] How to perform audio subtraction in Python?

Discussão em 'Python' iniciado por Stack, Julho 17, 2025.

  1. Stack

    Stack Membro Participativo

    I'm back after a long time with a problem that is causing me quite a few headaches. I have two audio tracks:

    • The “optimal” track is a recording of a hydraulic press, repetitive and constant.
    • The “anomalous” track is also a recording of the press, but with music.

    The goal is “simple”: to filter the optimal track from the anomalous track so that only the “music” can be heard.

    What I have already tried without success (in Python):

    • Autoencoder on MFCC with reconstruction error
    • Spectral subtraction (post MFCC extraction and alignment)
    • Direct spectral subtraction (in the time domain)
    • Various filters, e.g. Wiener
    • Spleeter and Demucs (source separation)
    • Audio Source Separation Using Non-Negative Matrix Factorization (NMF)

    None of these have resulted in clean filtering; in the resulting track, I can still “hear” frequencies from the base track.

    Perhaps one of you can enlighten me.

    Continue reading...

Compartilhe esta Página