Typo fixes.

This commit is contained in:
Kuang Fangjun 2021-07-19 07:36:37 +08:00
parent c9d73f289c
commit d27b45bb79

View File

@ -48,10 +48,10 @@ class OfflineFeature(nn.Module):
meaning no warping is to be done. The value will be ignored for meaning no warping is to be done. The value will be ignored for
feature types that don't support VLTN, such as spectrogram features. feature types that don't support VLTN, such as spectrogram features.
chunk_size: chunk_size:
It specifies the number of frames for each computation. If It specifies the number of frames for each computation.
If None, it compute features at once (requiring more memory for If None, it computes features at once (requiring more memory for
long waves) If not None, each computation takes this number of long waves). If not None, each computation takes this number of
frames (requiring less memory) frames (requiring less memory).
Returns: Returns:
Return a list of 2-D tensors containing the features if the 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 input is a list of 1-D tensors. The returned list has as many elements
@ -97,15 +97,16 @@ class OfflineFeature(nn.Module):
meaning no warping is to be done. The value will be ignored for meaning no warping is to be done. The value will be ignored for
feature types that don't support VLTN, such as spectrogram features. feature types that don't support VLTN, such as spectrogram features.
chunk_size: chunk_size:
It specifies the number of frames for each computation. If It specifies the number of frames for each computation.
If None, it compute features at once (requiring more memory for If None, it computes features at once (requiring more memory for
long waves) If not None, each computation takes this number of long waves). If not None, each computation takes this number of
frames (requiring less memory) frames (requiring less memory).
Returns: Returns:
Return a 2-D tensor with as many rows as the input tensor. Its Return a 2-D tensor with as many rows as the input tensor. Its
number of columns is the number mel bins. number of columns is the number mel bins.
""" """
assert x.ndim == 2 assert x.ndim == 2
assert x.dtype == torch.float32
if chunk_size is None: if chunk_size is None:
features = self.computer.compute_features(x, vtln_warp) features = self.computer.compute_features(x, vtln_warp)
else: else:
@ -138,4 +139,6 @@ class OfflineFeature(nn.Module):
Returns: Returns:
Return a 2-D tensor. Return a 2-D tensor.
""" """
assert wave.ndim == 1
assert wave.dtype == torch.float32
return _kaldifeat.get_strided(wave, self.opts.frame_opts) return _kaldifeat.get_strided(wave, self.opts.frame_opts)