Skip to content

Commit dd644fd

Browse files
committed
Updated docstring.
1 parent 6648a15 commit dd644fd

File tree

1 file changed

+1
-28
lines changed

1 file changed

+1
-28
lines changed

repet.py

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,5 @@
11
"""
22
This Python module implements a number of functions for the REpeating Pattern Extraction Technique (REPET).
3-
Repetition is a fundamental element in generating and perceiving structure. In audio, mixtures are
4-
often composed of structures where a repeating background signal is superimposed with a varying
5-
foreground signal (e.g., a singer overlaying varying vocals on a repeating accompaniment or a varying
6-
speech signal mixed up with a repeating background noise). On this basis, we present the REpeating
7-
Pattern Extraction Technique (REPET), a simple approach for separating the repeating background from
8-
the non-repeating foreground in an audio mixture. The basic idea is to find the repeating elements in
9-
the mixture, derive the underlying repeating models, and extract the repeating background by comparing
10-
the models to the mixture. Unlike other separation approaches, REPET does not depend on special
11-
parameterizations, does not rely on complex frameworks, and does not require external information.
12-
Because it is only based on repetition, it has the advantage of being simple, fast, blind, and
13-
therefore completely and easily automatable.
143
154
Functions:
165
original - Compute the original REPET.
@@ -30,7 +19,7 @@
3019
http://zafarrafii.com
3120
https://github.com/zafarrafii
3221
https://www.linkedin.com/in/zafarrafii/
33-
01/20/21
22+
01/21/21
3423
"""
3524

3625
import numpy as np
@@ -67,8 +56,6 @@
6756
def original(audio_signal, sampling_frequency):
6857
"""
6958
Compute the original REPET.
70-
The original REPET aims at identifying and extracting the repeating patterns in an audio mixture, by estimating
71-
a period of the underlying repeating structure and modeling a segment of the periodically repeating background.
7259
7360
Inputs:
7461
audio_signal: audio signal (number_samples, number_channels)
@@ -207,8 +194,6 @@ def original(audio_signal, sampling_frequency):
207194
def extended(audio_signal, sampling_frequency):
208195
"""
209196
Compute REPET extended.
210-
The original REPET can be easily extended to handle varying repeating structures, by simply applying the method
211-
along time, on individual segments or via a sliding window.
212197
213198
Inputs:
214199
audio_signal: audio signal (number_samples, number_channels)
@@ -426,11 +411,6 @@ def extended(audio_signal, sampling_frequency):
426411
def adaptive(audio_signal, sampling_frequency):
427412
"""
428413
Compute the adaptive REPET.
429-
The original REPET works well when the repeating background is relatively stable (e.g., a verse or the chorus in
430-
a song); however, the repeating background can also vary over time (e.g., a verse followed by the chorus in the
431-
song). The adaptive REPET is an extension of the original REPET that can handle varying repeating structures, by
432-
estimating the time-varying repeating periods and extracting the repeating background locally, without the need
433-
for segmentation or windowing.
434414
435415
Inputs:
436416
audio_signal: audio signal (number_samples, number_channels)
@@ -577,10 +557,6 @@ def adaptive(audio_signal, sampling_frequency):
577557
def sim(audio_signal, sampling_frequency):
578558
"""
579559
Compute REPET-SIM.
580-
The REPET methods work well when the repeating background has periodically repeating patterns (e.g., jackhammer
581-
noise); however, the repeating patterns can also happen intermittently or without a global or local periodicity
582-
(e.g., frogs by a pond). REPET-SIM is a generalization of REPET that can also handle non-periodically repeating
583-
structures, by using a similarity matrix to identify the repeating elements.
584560
585561
Inputs:
586562
audio_signal: audio signal (number_samples, number_channels)
@@ -720,9 +696,6 @@ def sim(audio_signal, sampling_frequency):
720696
def simonline(audio_signal, sampling_frequency):
721697
"""
722698
Compute the online REPET-SIM.
723-
REPET-SIM can be easily implemented online to handle real-time computing, particularly for real-time speech
724-
enhancement. The online REPET-SIM simply processes the time frames of the mixture one after the other given a
725-
buffer that temporally stores past frames.
726699
727700
Inputs:
728701
audio_signal: audio signal (number_samples, number_channels)

0 commit comments

Comments
 (0)