<jupyter_start><jupyter_text>Linear fbanks examples  Install spafe<jupyter_code>%pip install spafe<jupyter_output>Requirement already satisfied: spafe in /home/am/anaconda3/lib/python3.7/site-packages (0.1.2)
Requirement already satisfied: scipy>=1.3.1 in /home/am/anaconda3/lib/python3.7/site-packages (from spafe) (1.4.1)
Requirement already satisfied: numpy>=1.17.2 in /home/am/anaconda3/lib/python3.7/site-packages (from spafe) (1.21.5)
Note: you may need to restart the kernel to use updated packages.<jupyter_text>Constant linear fbanks<jupyter_code>from spafe.utils import vis
from spafe.fbanks import linear_fbanks

# init vars
nfilts = 24
nfft = 512
fs = 16000
low_freq = 0
high_freq = 8000
scale = "constant"

# compute the linear filter banks
lin_filbanks = linear_fbanks.linear_filter_banks(nfilts=nfilts,
                                              nfft=nfft,
                                              fs=fs,
                                              low_freq=low_freq,
                                              high_freq=high_freq,
                                              scale=scale)
# plot filter banks
vis.visualize_fbanks(lin_filbanks, "Amplitude", "Frequency (Hz)")<jupyter_output><empty_output><jupyter_text>Constant linear fbanks<jupyter_code>from spafe.utils import vis
from spafe.fbanks import linear_fbanks

# init vars
nfilts = 24
nfft = 512
fs = 16000
low_freq = 0
high_freq = 8000
scale = "ascendant"

# compute the linear filter banks
lin_filbanks = linear_fbanks.linear_filter_banks(nfilts=nfilts,
                                              nfft=nfft,
                                              fs=fs,
                                              low_freq=low_freq,
                                              high_freq=high_freq,
                                              scale=scale)
# plot filter banks
vis.visualize_fbanks(lin_filbanks, "Amplitude", "Frequency (Hz)")<jupyter_output><empty_output><jupyter_text>Constant linear fbanks<jupyter_code>from spafe.utils import vis
from spafe.fbanks import linear_fbanks

# init vars
nfilts = 24
nfft = 512
fs = 16000
low_freq = 0
high_freq = 8000
scale = "descendant"

# compute the linear filter banks
lin_filbanks = linear_fbanks.linear_filter_banks(nfilts=nfilts,
                                              nfft=nfft,
                                              fs=fs,
                                              low_freq=low_freq,
                                              high_freq=high_freq,
                                              scale=scale)
# plot filter banks
vis.visualize_fbanks(lin_filbanks, "Amplitude", "Frequency (Hz)")<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.07538061641292239, 'fraction_numerical': 0.02636464909023394, 'mean_word_length': 1.8568398727465536, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 18, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 30, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '136793', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 835, 'n_tokens_neox': 760, 'n_words': 169, 'path': 'docs/source/examples/fbanks_linear_example.ipynb', 'repo_name': 'SuperKogito/cautious-palm-tree', 'size': '2693'}