Skip to content

Commit

Permalink
A more complete example code
Browse files Browse the repository at this point in the history
  • Loading branch information
KinWaiCheuk authored Nov 13, 2019
1 parent e83aa55 commit 9079a3f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ To use nnAudio, you need to import the Spectrogram method first

Then do the following
```
from scipy.io import wavfile
import torch
sr, song = wavfile.read('./Bach.wav') # Loading your audio
x = song.mean(1) # Converting Stereo to Mono
x = torch.tensor(x, dtype=torch.float) # casting the array into a PyTorch Tensor
Expand Down

0 comments on commit 9079a3f

Please sign in to comment.