Skip to content

Commit

Permalink
Typo fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
csukuangfj committed Jul 18, 2021
1 parent c9d73f2 commit d27b45b
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions kaldifeat/python/kaldifeat/offline_feature.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ def forward(
meaning no warping is to be done. The value will be ignored for
feature types that don't support VLTN, such as spectrogram features.
chunk_size:
It specifies the number of frames for each computation. If
If None, it compute features at once (requiring more memory for
long waves) If not None, each computation takes this number of
frames (requiring less memory)
It specifies the number of frames for each computation.
If None, it computes features at once (requiring more memory for
long waves). If not None, each computation takes this number of
frames (requiring less memory).
Returns:
Return a list of 2-D tensors containing the features if the
input is a list of 1-D tensors. The returned list has as many elements
Expand Down Expand Up @@ -97,15 +97,16 @@ def compute(
meaning no warping is to be done. The value will be ignored for
feature types that don't support VLTN, such as spectrogram features.
chunk_size:
It specifies the number of frames for each computation. If
If None, it compute features at once (requiring more memory for
long waves) If not None, each computation takes this number of
frames (requiring less memory)
It specifies the number of frames for each computation.
If None, it computes features at once (requiring more memory for
long waves). If not None, each computation takes this number of
frames (requiring less memory).
Returns:
Return a 2-D tensor with as many rows as the input tensor. Its
number of columns is the number mel bins.
"""
assert x.ndim == 2
assert x.dtype == torch.float32
if chunk_size is None:
features = self.computer.compute_features(x, vtln_warp)
else:
Expand Down Expand Up @@ -138,4 +139,6 @@ def convert_samples_to_frames(self, wave: torch.Tensor) -> torch.Tensor:
Returns:
Return a 2-D tensor.
"""
assert wave.ndim == 1
assert wave.dtype == torch.float32
return _kaldifeat.get_strided(wave, self.opts.frame_opts)

0 comments on commit d27b45b

Please sign in to comment.