Skip to content

Instantly share code, notes, and snippets.

@pragatibaheti
Last active May 8, 2020 13:55
Show Gist options
  • Save pragatibaheti/be47b947f84008f7ecbd683b87338d84 to your computer and use it in GitHub Desktop.
Save pragatibaheti/be47b947f84008f7ecbd683b87338d84 to your computer and use it in GitHub Desktop.
audio_path = '../dataset/audio/'
samples, sample_rate = librosa.load(audio_path+'hello/001.wav', sr = 16000)
fig = plt.figure(figsize=(14, 8))
ax1 = fig.add_subplot(211)
ax1.set_title('Raw wave of ' + '../dataset/audio/1_001.wav')
ax1.set_xlabel('Time')
ax1.set_ylabel('Amplitude')
ax1.plot(np.linspace(0, sample_rate/len(samples), sample_rate), samples)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment