Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f74ad57

Browse files
committed
transpose, and torchaudio.
1 parent 1c59b95 commit f74ad57

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

beginner_source/audio_preprocessing_tutorial.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
print("Sample rate of waveform: {}".format(sample_rate))
4141

4242
plt.figure()
43-
plt.plot(waveform.transpose(0,1).numpy())
43+
plt.plot(waveform.t().numpy())
4444

4545

4646
######################################################################
@@ -209,7 +209,7 @@ def normalize(tensor):
209209
print("Shape of spectrogram: {}".format(specgram.size()))
210210

211211
plt.figure()
212-
plt.imshow(specgram.transpose(0,1).numpy(), cmap='gray')
212+
plt.imshow(specgram.t().numpy(), cmap='gray')
213213

214214

215215
######################################################################
@@ -222,7 +222,7 @@ def normalize(tensor):
222222
print("Shape of fbank: {}".format(fbank.size()))
223223

224224
plt.figure()
225-
plt.imshow(fbank.transpose(0,1).numpy(), cmap='gray')
225+
plt.imshow(fbank.t().numpy(), cmap='gray')
226226

227227

228228
######################################################################

index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ Audio
114114

115115
.. customgalleryitem::
116116
:figure: /_static/img/audio_preprocessing_tutorial_waveform.png
117-
:tooltip: Preprocessing with Torchaudio Tutorial
117+
:tooltip: Preprocessing with torchaudio Tutorial
118118
:description: :doc:`beginner/audio_preprocessing_tutorial`
119119

120120
.. raw:: html

0 commit comments

Comments
 (0)