Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify sox_effects.apply_effects_tensor as CPU-only in Doc #1459

Merged
merged 3 commits into from
Apr 22, 2021
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion torchaudio/sox_effects/sox_effects.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ def init_sox_effects():

Note:
You do not need to call this function manually. It is called automatically.
This function only works on CPU Tensors.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not the right function. The note has to be added to apply_effects_tensor function.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah got a bit confused. Should have read your comments carefully.


Once initialized, you do not need to call this function again across the multiple uses of
sox effects though it is safe to do so as long as :func:`shutdown_sox_effects` is not called yet.
Expand Down Expand Up @@ -68,7 +69,7 @@ def apply_effects_tensor(
need to give ``rate`` effect with desired sampling rate.)

Args:
tensor (torch.Tensor): Input 2D Tensor.
tensor (torch.Tensor): Input 2D CPU Tensor.
sample_rate (int): Sample rate
effects (List[List[str]]): List of effects.
channels_first (bool): Indicates if the input Tensor's dimension is
Expand Down