Commit 9f7d51de authored by chaask's avatar chaask Committed by Soumith Chintala
Browse files

Update documentation for SoxEffectsChain. (#95)

Fix error "cannot open file", when the audiodir_path is different from where the code is run.
parent ea7fcf08
......@@ -52,7 +52,7 @@ class SoxEffectsChain(object):
class MyDataset(Dataset):
def __init__(self, audiodir_path):
self.data = [fn for fn in os.listdir(audiodir_path)]
self.data = [os.path.join(audiodir_path, fn) for fn in os.listdir(audiodir_path)]
self.E = torchaudio.sox_effects.SoxEffectsChain()
self.E.append_effect_to_chain("rate", [16000]) # resample to 16000hz
self.E.append_effect_to_chain("channels", ["1"]) # mono signal
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment