No project description provided
Project description
Introduction
Kaldi-compatible online fbank feature extractor without external dependencies.
Tested on the following architectures and operating systems:
- Linux
- macOS
- Windows
- Android
- x86
- arm
- aarch64
Usage
See the following CMake-based speech recognition (i.e., text-to-speech) projects for its usage:
- https://github.com/k2-fsa/sherpa-ncnn
- Specifically, please have a look at https://github.com/k2-fsa/sherpa-ncnn/blob/master/sherpa-ncnn/csrc/features.h
- https://github.com/k2-fsa/sherpa-onnx
They use kaldi-native-fbank
to compute fbank features for real-time
speech recognition.
Python APIs
First, please install kaldi-native-fbank
by
git clone https://github.com/csukuangfj/kaldi-native-fbank
cd kaldi-native-fbank
python3 setup.py install
or use
pip install kaldi-native-fbank
To check that you have installed kaldi-native-fbank
successfully, please use
python3 -c "import kaldi_native_fbank; print(kaldi_native_fbank.__version__)"
which should print the version you have installed.
Please refer to https://github.com/csukuangfj/kaldi-native-fbank/blob/master/kaldi-native-fbank/python/tests/test_online_fbank.py for usages.
For easier reference, we post the above file below:
#!/usr/bin/env python3
import sys
try:
import kaldifeat
except:
print("Please install kaldifeat first")
sys.exit(0)
import kaldi_native_fbank as knf
import torch
def main():
sampling_rate = 16000
samples = torch.randn(16000 * 10)
opts = kaldifeat.FbankOptions()
opts.frame_opts.dither = 0
opts.mel_opts.num_bins = 80
opts.frame_opts.snip_edges = False
opts.mel_opts.debug_mel = False
online_fbank = kaldifeat.OnlineFbank(opts)
online_fbank.accept_waveform(sampling_rate, samples)
opts = knf.FbankOptions()
opts.frame_opts.dither = 0
opts.mel_opts.num_bins = 80
opts.frame_opts.snip_edges = False
opts.mel_opts.debug_mel = False
fbank = knf.OnlineFbank(opts)
fbank.accept_waveform(sampling_rate, samples.tolist())
assert online_fbank.num_frames_ready == fbank.num_frames_ready
for i in range(fbank.num_frames_ready):
f1 = online_fbank.get_frame(i)
f2 = torch.from_numpy(fbank.get_frame(i))
assert torch.allclose(f1, f2, atol=1e-3), (i, (f1 - f2).abs().max())
if __name__ == "__main__":
torch.manual_seed(20220825)
main()
print("success")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for kaldi-native-fbank-1.18.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c4ee06f0897d1117260d62705fe9c006dc1fbd8be42cb1ae85c1f647475b523 |
|
MD5 | e98dbac3410e5d09a2b56f8d166988e8 |
|
BLAKE2b-256 | 65b048b7649db0b82ed50c71ef6857d2c5ca58ca30f1840f004c99d4ed5ec941 |
Hashes for kaldi_native_fbank-1.18.5-pp39-pypy39_pp73-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb2dc5aba0ccff51c4569ec5b77f6f98f8cc2656202f2d00261724bc73421ec3 |
|
MD5 | 0b7c1f780b77e059eb78f9ab20c1185a |
|
BLAKE2b-256 | 0edc8690d26b6f6d8d6d78582cca819375a42fe03ab36f7e126a7f991e6adef1 |
Hashes for kaldi_native_fbank-1.18.5-pp38-pypy38_pp73-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba8a2da8dfe8db458a663dce2a9f7a921f9a01b4dddf153e4c6eacc64f0dea2c |
|
MD5 | ca411db14a7527ed5fd9352fbf061396 |
|
BLAKE2b-256 | bf5097f96df0c5b171a0f1fe7584fd9cef97ecb9c149d1cf1d4a796117c41bbd |
Hashes for kaldi_native_fbank-1.18.5-pp37-pypy37_pp73-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 483789296dbe26fba65bb8d460609105b31a011e1e19d332abe486a321991b65 |
|
MD5 | f0dc61d5eed4459a7357a5c29214b76f |
|
BLAKE2b-256 | a0b619b62c898601a92863c4c4fc1ceafafb294427819eb53f947fdb8089a3fd |
Hashes for kaldi_native_fbank-1.18.5-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 037291ca319ef7f8755f151c68ad78315b3a8ef3afc6f95c99faa62be6a24d39 |
|
MD5 | 89988dcddd2f790fa52d24c95d257046 |
|
BLAKE2b-256 | f2b4c0ad147e63f4c0a4e1f99d4a42dd4fdeebff2bcb40fdeda7f4fdc7903bd9 |
Hashes for kaldi_native_fbank-1.18.5-cp311-cp311-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23c6c46b14caa959e8ac180d05f73ffc872e08bfef3201dd9016e1d065ce5886 |
|
MD5 | afeb964a4bd4dc1138f79ead2c42488f |
|
BLAKE2b-256 | 1b4b3d0964f3234ac4acb3492d7b0664d2c31bffa886fa1862a6a7682fea1b67 |
Hashes for kaldi_native_fbank-1.18.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 244594f585bb55e77fc297e0dffc669e25bb3e2f1337fb967e21a6d0d9b6eacc |
|
MD5 | 193172f705dcf026e8c9144d7d5f5547 |
|
BLAKE2b-256 | 3177d5a4c643d8e48b7cdb3540500b20375ea1c0c459f360372b6c52dd364aae |
Hashes for kaldi_native_fbank-1.18.5-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3801cf7fcb675d3ee71478e771ca4575e1c4fb5733ae40d8fd5f77755ff3eab0 |
|
MD5 | c343ce208db9bb4d88491bfb4173b1d4 |
|
BLAKE2b-256 | e453bbbaeb9ee1ba44086fd8eaeec5fbbdee67f72ae79d4eb49277b3490e7bf1 |
Hashes for kaldi_native_fbank-1.18.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eef826cd1f40012ff6f5e64970f8759826de19267b18e6d3ead9b9604fc51189 |
|
MD5 | a037fa932e83f77d25b9cf7fe5fbc4ab |
|
BLAKE2b-256 | e0c653edaf4ba901c9617033eecce97a4fd97ace017a5ab2dd5c46cbd1726b01 |
Hashes for kaldi_native_fbank-1.18.5-cp311-cp311-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d11e722b8e311cef61964bcb19232e9a35d8fc99fd2b3cda2047ad508cc1e0d7 |
|
MD5 | f9e7b0aed4ee59467efc50e2423a9431 |
|
BLAKE2b-256 | d5b82b664a0db42cfc92c3f0ce4dbaf2a31bcf8599e3f17ac69aa324012176f2 |
Hashes for kaldi_native_fbank-1.18.5-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fecaf00568023993c872133aef5f6a8fd20f6d3f1c21a971e6b3fbe2551aaecf |
|
MD5 | 4dee6fca4e8e3ee6f99833142bb76303 |
|
BLAKE2b-256 | fed4c91cfac45bcebf26056bf721ab9303ede62329c0bc192f526591a54992d7 |
Hashes for kaldi_native_fbank-1.18.5-cp310-cp310-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6747ec47e8525fc59c295e961af8ea1afdb17ba38b7d4a75499642e6a4f1434 |
|
MD5 | 4f62c296d91a4e0c17d1160e7e1ac01a |
|
BLAKE2b-256 | e9e929000c61cf6e846746e9c1aa5c5bcd80c92b78100d593fd606df8d12b196 |
Hashes for kaldi_native_fbank-1.18.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39928d1424cc53b9814098fcebfc32d205a182fb2229ea4312821835d8b34bea |
|
MD5 | aaf87487342da776d0a63329677fe569 |
|
BLAKE2b-256 | b0d999fafda2cd21eed9892bad1a61795457873ca90e2234f25bc9212f918fc3 |
Hashes for kaldi_native_fbank-1.18.5-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6f6547c9bad02a1810fc1842f441959810210f4e14bf197bf38f61af9b7e8e0 |
|
MD5 | 2071a2fcb8775a77e25a88b6d60d7d24 |
|
BLAKE2b-256 | 7f501e61f1023cd836dd5e0c7ff87152c4c5535ba22e44d79f3b6238977bb1ff |
Hashes for kaldi_native_fbank-1.18.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 59b57c6166929f162f16899d202d5fbaffc12d504c5d38d039175dcd143b8e7f |
|
MD5 | c53c9ad4a9e27930c0ac14a37d98e59a |
|
BLAKE2b-256 | 73741d9b893d17fc0f240e99a554c4acdf81efb8cf0df9c8e7f2f7a581f2e9df |
Hashes for kaldi_native_fbank-1.18.5-cp310-cp310-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 46c42a5a71d87bb841881339ffe99a12c061e3410fc77e5a30e5b8d18cf7bef1 |
|
MD5 | 4cdfd11696f7fe76ac984b47973e8394 |
|
BLAKE2b-256 | 57ae930abe7bb4c792d97fae95d89b14e9b3e39f913ff222c6df6518b751401d |
Hashes for kaldi_native_fbank-1.18.5-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 317e9270be478badd107274e4f5490a05f251998decaf9ab2ad7b354193fdeeb |
|
MD5 | 127e8497f38a6569d0c9d4dec4e5db80 |
|
BLAKE2b-256 | 151a5d8774169229d707b9993dcdf8deeaf72d57e7b7001ee07255b27a701bd4 |
Hashes for kaldi_native_fbank-1.18.5-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 622208c5a602f13d427aef5463cbc844c9c5efa875fbe42bc1e516dc88ec85d7 |
|
MD5 | 911c868c5453fbb9979b93e6f92b087d |
|
BLAKE2b-256 | b8ddaf60a8b43a187691b0d76eab4a23c25c3e6531ea6b90de255452432be03c |
Hashes for kaldi_native_fbank-1.18.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ecc7d52f18802dfb416cee4bf968e79296536fa60c8561ef3a4c8fecde3d3e0e |
|
MD5 | 0e89fb798a84a8a7ca921bc3de5b7e83 |
|
BLAKE2b-256 | eedce5dec61f7de3194f4b2c52344e023b65f2faef40995ef380e98714186087 |
Hashes for kaldi_native_fbank-1.18.5-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | efd492c89e06bc00a4271de1efaa2f6b90ebe8fe07439a495e3752bb6e66c56d |
|
MD5 | 4b268d2a13b18200cddcc7cc043f3224 |
|
BLAKE2b-256 | 3c62b330c1cd18ad424e45596bfccc6c70c143373055ab6224447f7223ad54c8 |
Hashes for kaldi_native_fbank-1.18.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1341c96be3a7db77301e08ae9d87ce1f45ae0a48dbfb2bff0c863eb82692dc5e |
|
MD5 | 6e82c508ba3d3cf49e82aef09296bb84 |
|
BLAKE2b-256 | 452677f7c5b2358b5407a662daad118687fb1a442e349658d2937a7d92189501 |
Hashes for kaldi_native_fbank-1.18.5-cp39-cp39-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 418b7aeb624e6af4211bc0960ad7074b8e353ff7b6e141ce55189480e1c9acb4 |
|
MD5 | 305d03e647e9223dafc8f7f113847573 |
|
BLAKE2b-256 | 976f17f5fd2c55417e338609dbcba6bc638031265205d2cd8f5e621de7e00d80 |
Hashes for kaldi_native_fbank-1.18.5-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1dcad650c8016a575821b039f08501eb2714d49175b8cf03f08b9a0cc01bb06f |
|
MD5 | ba45136ee464c76d9c3c06a77fc3a684 |
|
BLAKE2b-256 | f2d304aacee2e1ec39e640f7898868e1fd724801e04e4bee14a388eb8179d6e1 |
Hashes for kaldi_native_fbank-1.18.5-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1420e9ed36d5409cf3a90ffe4fcbaeeb21f7c82d439b03c8b4e5af8fb2091250 |
|
MD5 | b34dd1cc4e60e5facb0de94987b5b880 |
|
BLAKE2b-256 | 9dd0d287bd15f339ca0bf1a37647297460b269976fc213d31cb99d36e2058bf4 |
Hashes for kaldi_native_fbank-1.18.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b458a4c9ef4b783da3b8764a4cd5242d955001330c5f483ad2868966bc1bb0da |
|
MD5 | c578b10684c7e52d952ec8a2388e3d9e |
|
BLAKE2b-256 | 9713232e8c753eeaf960aeeaf2c49129282280404dda303d327b5bf928ba11f8 |
Hashes for kaldi_native_fbank-1.18.5-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 876bbfb8d8fe54dde2f8a5b2036b121d47aaf4977b484fa73ddc78302f44b59e |
|
MD5 | 8e6cb720792563ff39f22c688d35b36f |
|
BLAKE2b-256 | fb92e1b40cc895c25b430df856bdb97927ae0de7d3db4430b745ff9e642c649a |
Hashes for kaldi_native_fbank-1.18.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec8c3c4446558684b8be5877da2efcbc5347851f057fbf703f0d9afb3ad51ea0 |
|
MD5 | 65c0e20f0455bf68d0d80a8acc770a96 |
|
BLAKE2b-256 | 14d4e60f9623ec7747ed016e6a67bc04a435db783cd9e6497b6b89f36c2aca1d |
Hashes for kaldi_native_fbank-1.18.5-cp38-cp38-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 488b8e03422d7e0b97a65d4471dab3ccdc3fef8beb6785689664374e9985967c |
|
MD5 | dfd53a9cd71c1bb9be060f5a2fb276e9 |
|
BLAKE2b-256 | 148aca7c82c9b84e6d3ec10912876c6e74a09f69d92da28c3a2ee2c193b085b1 |
Hashes for kaldi_native_fbank-1.18.5-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73872871cec929ceb8d1f1a6f5174fa6f7a691f667dc331e7af5c53e698469e4 |
|
MD5 | 6ff1c9c1f2070a47f0d8d382ea98af3c |
|
BLAKE2b-256 | 63913ff2b604b19db4a6ea1937c9ad0e9ff774034d4a98789cac63f3192e7d54 |
Hashes for kaldi_native_fbank-1.18.5-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2af3c8f870702e09c122a8251e17820d31c76f95f9dec84c4be57cf6f42f4bea |
|
MD5 | c3a08e21319095863844fb81b2629941 |
|
BLAKE2b-256 | 2fc6675f3ecaf86bf494274f7251603ce52e0d72cc39def7f15dc4223bd7303d |
Hashes for kaldi_native_fbank-1.18.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | feb1a2859b1997d23a4e134dfe0cee6f8b061215eaa2c9e7fb3ec3b03305557b |
|
MD5 | d019e0e8aadde5220ddf44aeb6e6bd8c |
|
BLAKE2b-256 | 4ae29ad353d8fac7b51e05190dbe3481053078a16a4936dd862ac6a5a57eff8f |
Hashes for kaldi_native_fbank-1.18.5-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9736e7a830e13f2659717f67a021629f259a21ff9b03585e4b313c7c781095d5 |
|
MD5 | d017007d0ba33fc09a59e2bb1a76b7b1 |
|
BLAKE2b-256 | 84c9584ddc2d5b9338f1604e81dce599c84a1e6a08868b3fdc292cde67d648a4 |
Hashes for kaldi_native_fbank-1.18.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e08e4ef421ae349963d66a8f777a76c1c6470996278dfc8252c06db8c601af39 |
|
MD5 | 8d36699013c6912dff05140896492afa |
|
BLAKE2b-256 | 7874504345d45a82980d542fba220e800c379d8999fcd133e775aef5291655b9 |
Hashes for kaldi_native_fbank-1.18.5-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e7a94a8999ca8829832202d1c35d7d07b1e604d02afc3fc48cc5b3a39a43859 |
|
MD5 | 9baed41afbaf13031ebae883e3632f84 |
|
BLAKE2b-256 | 23ff67ebcde9db63ea0d80b5a6e309e96497dac4c548b4ef7e3bdf94333b565a |
Hashes for kaldi_native_fbank-1.18.5-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 79a285452878c2b72778069e2d4cd8550409bf982267a0ae1229a8f317281f44 |
|
MD5 | b5281a44b243eab3390f49de5e958f70 |
|
BLAKE2b-256 | 92f4e8df3b3032ca78a9017f23f2f3bd8d08f172413434c680a14e9de2278182 |
Hashes for kaldi_native_fbank-1.18.5-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c70ebf90f0448b2e22fbca7729d4766b639566857d91a41171c116b892610d77 |
|
MD5 | a592d305f1bd768e09ca908300ccbb66 |
|
BLAKE2b-256 | ed6507e26bbaf961804815d240773d11ecfca82abd5950798ffede64eb1430da |
Hashes for kaldi_native_fbank-1.18.5-cp36-cp36m-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 632de3fea8126ebc1af44b3689a672979bedf22765045893fd27a8fc11313be0 |
|
MD5 | 2b630d2259a332d3a4626a7e519b1664 |
|
BLAKE2b-256 | 7e220e9cc48d89d250a46484b4a3c5e17676795aeca4111c4fbd728cf1931b79 |
Hashes for kaldi_native_fbank-1.18.5-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dfa5586ee476455402d0df49dac90efd3cd39f2d53e731254a4a0cd6106622a4 |
|
MD5 | f257e4b07713b64f3409f2bc7ff020c3 |
|
BLAKE2b-256 | 6346cb955d0119ec32485bc9966da39484392a28cd98de03ef58dc660629aed1 |