Adding a structured pipeline for cepstral coefficients extraction #8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.