<jupyter_start><jupyter_text>The implementation is a direct translation of <NAME>'s `ERBFilteBank` and `MakeERBFilters` in the *Auditory Toolbox*. Below is a 40-channel Gammatone filterbank extracted using his MATLAB code:![](https://filedn.com/lx3TheNX5ifLtAEMJg2YxFh/sn/pyaudlib/gammatone40.png)<jupyter_code># Obtain Gammatone-weighted short-time power spectr
from audlib.quickstart import welcome
from audlib.sig.transform import stpowspec
from audlib.sig.window import hamming
from audlib.plot import specgram

sig, sr = welcome()
wlen = .025
hop = .01
nfft = 1024
wind = hamming(int(wlen*sr))
powerspec = stpowspec(sig, wind, int(hop*sr), nfft, synth=False)

wts = gtbank.gammawgt(nfft, powernorm=True, squared=True)
gammaspec = powerspec @ wts
print(gammaspec.shape)

fig = plt.figure(figsize=(16, 12), dpi= 100)
ax1 = fig.add_subplot(211)
specgram(10*np.log10(gammaspec), ax1, time_axis=np.arange(gammaspec.shape[0])*hop, freq_axis=gtbank.cf)<jupyter_output>(129, 40)
{'fraction_non_alphanumeric': 0.12102564102564102, 'fraction_numerical': 0.038974358974358976, 'mean_word_length': 6.746031746031746, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '501650', 'license': 'MIT', 'n_tokens_mistral': 412, 'n_tokens_neox': 375, 'n_words': 84, 'path': 'examples/dsp/Gammatone Filterbank.ipynb', 'repo_name': 'RaphaelOlivier/pyaudlib', 'size': '983'}