diff --git a/README.md b/README.md index 05e5d5d..744bdf9 100644 --- a/README.md +++ b/README.md @@ -9,3 +9,15 @@ Wrap kaldi's feature computations to Python with PyTorch support. ```bash pip install kaldifeat ``` + +# TODOs + +- [ ] Add Python interface +- [ ] Support torch.device so that it can switch between CUDA and CPU +- [ ] Add unit tests +- [ ] Set up GitHub actions +- [ ] Benchmark its speed and compare it with Kaldi +- [ ] Support batch processing of multiple waves +- [ ] Handle non-default parameters +- [ ] Support MFCC and other features available in Kaldi +- [ ] Publish it to PyPI diff --git a/kaldifeat/csrc/feature-window.cc b/kaldifeat/csrc/feature-window.cc index 4a511c5..93c749d 100644 --- a/kaldifeat/csrc/feature-window.cc +++ b/kaldifeat/csrc/feature-window.cc @@ -134,7 +134,12 @@ torch::Tensor Dither(const torch::Tensor &wave, float dither_value) { if (dither_value == 0.0f) wave; torch::Tensor rand_gauss = torch::randn_like(wave); +#if 1 return wave + rand_gauss * dither_value; +#else + // use in-place version of wave and change its to pointer type + wave_->add_(rand_gauss, dither_value); +#endif } void Preemphasize(float preemph_coeff, torch::Tensor *wave) {