Skip to content

Instantly share code, notes, and snippets.

@ketanhdoshi
Last active February 14, 2021 02:15
Show Gist options
  • Save ketanhdoshi/5e3f3d6cfbaa4438ab36ee145f77f1e1 to your computer and use it in GitHub Desktop.
Save ketanhdoshi/5e3f3d6cfbaa4438ab36ee145f77f1e1 to your computer and use it in GitHub Desktop.
import librosa.display
import matplotlib.pyplot as plt
# x-axis has been converted to time using our sample rate.
# matplotlib plt.plot(y), would output the same figure, but with sample
# number on the x-axis instead of seconds
plt.figure(figsize=(14, 5))
librosa.display.waveplot(samples, sr=sample_rate)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment