Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a structured pipeline for cepstral coefficients extraction #8

Merged
merged 6 commits into from
Mar 20, 2024

Conversation

eryk-urbanski
Copy link
Owner

The pipeline currently supports MFCC extraction. Filterbank creation is structured so that new banks can be easily added.

Michał i Natalia
Przeanalizujcie fragmenty kodu, które zaraz podam, pod kątem Waszego zadania związanego z filterbankiem gammatone.
Plik cepstral.py - linijka 83 -> tutaj wywoływana jest metoda 'prywatna' __create_filterbank() (python nie ma jako takich metod prywatnych, ale jest taka konwencja, by dodawać dwa underscore'y w przypadkach, gdy chce się taką enkapsulację wprowadzić). Przechodzimy do definicji metody, linijka 134 -> wywołujemy taki jakby konstruktor z klasy Filterbank. Przechodzimy do pliku filterbank.py i widzimy metodę new(), która jest już przeze mnie przygotowana na dodanie nowej funkcjonalności, czyli gammatone.

Antek
Zobacz jak mniej więcej jest zrobiona klasa Cepstral. Zagreguj swoje metody do ekstrakcji parametrów czasowych w klasę, może się nazywać np. TimeDomain. Metody powinny się stać statyczne w tym wypadku. Zmodyfikuj wnętrza funkcji tak, by wykorzystywać naszą klasę AudioInfo. Dla zobrazowania - np. metoda temporal_centroid powinna przyjmować instację klasy AudioInfo i z niej brać sobie sygnał i sr.

Poproszę o zwrotne review i jeśli macie pytania, to śmiało.

@eryk-urbanski eryk-urbanski self-assigned this Mar 19, 2024
@eryk-urbanski eryk-urbanski linked an issue Mar 19, 2024 that may be closed by this pull request
plap/parameterization/cepstral.py Show resolved Hide resolved
return mel_filterbank

@staticmethod
def __gammatone_filterbank(params: list) -> np.ndarray:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

w weekend coś dodam na pewno 😃

@eryk-urbanski eryk-urbanski merged commit dc3c99b into master Mar 20, 2024
Copy link
Collaborator

@Wyciszka Wyciszka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Widziałem, ale pozmieniam coś później

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

Successfully merging this pull request may close these issues.

MFCC Extraction Pipeline
3 participants