mirror of
https://github.com/csukuangfj/kaldifeat.git
synced 2025-08-09 01:52:39 +00:00
Fix chunk size (#22)
* Use chunk size in feature extraction. * Fix a typo.
This commit is contained in:
parent
632098e0c1
commit
f0d69c3f9e
@ -1,3 +1,5 @@
|
|||||||
|
include LICENSE
|
||||||
|
include README.md
|
||||||
include CMakeLists.txt
|
include CMakeLists.txt
|
||||||
exclude pyproject.toml
|
exclude pyproject.toml
|
||||||
recursive-include kaldifeat *.*
|
recursive-include kaldifeat *.*
|
||||||
|
@ -72,7 +72,7 @@ class OfflineFeature(nn.Module):
|
|||||||
strided = [self.convert_samples_to_frames(w) for w in waves]
|
strided = [self.convert_samples_to_frames(w) for w in waves]
|
||||||
strided = torch.cat(strided, dim=0)
|
strided = torch.cat(strided, dim=0)
|
||||||
|
|
||||||
features = self.compute(strided, vtln_warp)
|
features = self.compute(strided, vtln_warp, chunk_size=chunk_size)
|
||||||
|
|
||||||
if is_list:
|
if is_list:
|
||||||
return list(features.split(num_frames_per_wave))
|
return list(features.split(num_frames_per_wave))
|
||||||
@ -122,7 +122,7 @@ class OfflineFeature(nn.Module):
|
|||||||
)
|
)
|
||||||
features.append(this_chunk)
|
features.append(this_chunk)
|
||||||
if end < x.size(0):
|
if end < x.size(0):
|
||||||
last_chunk = self.compute_features(x[end:], vtln_warp)
|
last_chunk = self.computer.compute_features(x[end:], vtln_warp)
|
||||||
features.append(last_chunk)
|
features.append(last_chunk)
|
||||||
features = torch.cat(features, dim=0)
|
features = torch.cat(features, dim=0)
|
||||||
|
|
||||||
|
1
setup.py
1
setup.py
@ -34,7 +34,6 @@ setuptools.setup(
|
|||||||
version=get_package_version(),
|
version=get_package_version(),
|
||||||
author="Fangjun Kuang",
|
author="Fangjun Kuang",
|
||||||
author_email="csukuangfj@gmail.com",
|
author_email="csukuangfj@gmail.com",
|
||||||
data_files=[("", ["LICENSE", "README.md"])],
|
|
||||||
package_dir={package_name: "kaldifeat/python/kaldifeat"},
|
package_dir={package_name: "kaldifeat/python/kaldifeat"},
|
||||||
packages=[package_name],
|
packages=[package_name],
|
||||||
url="https://github.com/csukuangfj/kaldifeat",
|
url="https://github.com/csukuangfj/kaldifeat",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user