Skip to content

Commit 6c6512a

Browse files
committed
Address reviews
1 parent a020c0c commit 6c6512a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

docs/source/backend.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ There are currently three implementations available.
2020

2121
``sox`` backend is the original backend which is built on ``libsox``. This module is currently default but is known to have number of issues, such as wrong handling of WAV files other than 16-bit signed integer. Users are encouraged to use ``sox_io`` backend. This backend requires C++ extension module and is not available on Windows system.
2222

23-
``sox_io`` backend is the new backend which is built on ``libsox`` and bound to Python with ``Torchscript``. This module is thoroughly tested and addresses all the known issues ``sox`` backend has. Function calls to this backend can be Torchscriptable. This backend requires C++ extension module and is not available on Windows system.
23+
``sox_io`` backend is the new backend which is built on ``libsox`` and bound to Python with ``Torchscript``. This module addresses all the known issues ``sox`` backend has. Function calls to this backend can be Torchscriptable. This backend requires C++ extension module and is not available on Windows system.
2424

2525
``soundfile`` backend is built on ``PySoundFile``. You need to install ``PySoundFile`` separately.
2626

torchaudio/sox_effects/sox_effects.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,16 +142,16 @@ def apply_effects_tensor(
142142
... ["lowpass", "-1", "300"], # apply single-pole lowpass filter
143143
... ["rate", "8000"], # change sample rate to 8000
144144
... ]
145-
>>> trans = SoxEffectTensorTransform(effects, input_sample_rate)
145+
>>> transform = SoxEffectTensorTransform(effects, input_sample_rate)
146146
>>>
147147
>>> # Dump it to file and load
148148
>>> path = 'sox_effect.zip'
149149
>>> torch.jit.script(trans).save(path)
150-
>>> trans = torch.jit.load(path)
150+
>>> transform = torch.jit.load(path)
151151
>>>
152152
>>>> # Run transform
153153
>>> waveform, input_sample_rate = torchaudio.load("input.wav")
154-
>>> waveform, sample_rate = trans(waveform, input_sample_rate)
154+
>>> waveform, sample_rate = transform(waveform, input_sample_rate)
155155
>>> assert sample_rate == 8000
156156
"""
157157
in_signal = torch.classes.torchaudio.TensorSignal(tensor, sample_rate, channels_first)

0 commit comments

Comments
 (0)