Skip to content

Commit 7e52432

Browse files
committed
python3Packages.kaldi-native-fbank: init at 1.22.3
1 parent 5c4e9a1 commit 7e52432

2 files changed

Lines changed: 48 additions & 0 deletions

File tree

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
lib,
3+
buildPythonPackage,
4+
fetchFromGitHub,
5+
cmake,
6+
setuptools,
7+
pybind11,
8+
kissfft,
9+
}:
10+
buildPythonPackage (finalAttrs: {
11+
pname = "kaldi-native-fbank";
12+
version = "1.22.3";
13+
pyproject = true;
14+
15+
src = fetchFromGitHub {
16+
owner = "csukuangfj";
17+
repo = "kaldi-native-fbank";
18+
tag = "v${finalAttrs.version}";
19+
hash = "sha256-Wu4wM52T6NoQ1t5/iAyPtkEGnZki5P0jx0eYMFZMb5o=";
20+
};
21+
22+
build-system = [
23+
cmake
24+
setuptools
25+
];
26+
27+
buildInputs = [ pybind11 ];
28+
29+
dontUseCmakeConfigure = true;
30+
31+
env.KALDI_NATIVE_FBANK_CMAKE_ARGS = lib.concatStringsSep " " [
32+
"-DFETCHCONTENT_SOURCE_DIR_KISSFFT=${kissfft.src}"
33+
"-DFETCHCONTENT_SOURCE_DIR_PYBIND11=${pybind11.src}"
34+
"-DKALDI_NATIVE_FBANK_BUILD_TESTS=OFF"
35+
"-DKALDI_NATIVE_FBANK_BUILD_PYTHON=ON"
36+
];
37+
38+
pythonImportsCheck = [ "kaldi_native_fbank" ];
39+
40+
meta = {
41+
description = "Kaldi-compatible online fbank extractor without external dependencies";
42+
homepage = "https://github.com/csukuangfj/kaldi-native-fbank";
43+
license = lib.licenses.asl20;
44+
maintainers = with lib.maintainers; [ lach ];
45+
};
46+
})

pkgs/top-level/python-packages.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8153,6 +8153,8 @@ self: super: with self; {
81538153

81548154
kaldi-active-grammar = callPackage ../development/python-modules/kaldi-active-grammar { };
81558155

8156+
kaldi-native-fbank = callPackage ../development/python-modules/kaldi-native-fbank { };
8157+
81568158
kaleido = callPackage ../development/python-modules/kaleido { };
81578159

81588160
kalshi-python = callPackage ../development/python-modules/kalshi-python { };

0 commit comments

Comments
 (0)