# -*- coding: utf-8 -*-

import matplotlib.pyplot as plt
from scipy.io import wavfile
from scipy import signal
import numpy as np

sample_rate, samples = wavfile.read('output.wav') # ./output/audio.wav
frequencies, times, spectrogram = signal.spectrogram(samples, sample_rate)

plt.pcolormesh(times, frequencies, np.log(spectrogram))
plt.ylabel('Frequency [Hz]')
plt.xlabel('Time [sec]')
plt.show()


399d1ec41952cc7761c402cff65b9158efe92a76
<mask token>

<mask token>
plt.pcolormesh(times, frequencies, np.log(spectrogram))
plt.ylabel('Frequency [Hz]')
plt.xlabel('Time [sec]')
plt.show()

<mask token>
sample_rate, samples = wavfile.read('output.wav')
frequencies, times, spectrogram = signal.spectrogram(samples, sample_rate)
plt.pcolormesh(times, frequencies, np.log(spectrogram))
plt.ylabel('Frequency [Hz]')
plt.xlabel('Time [sec]')
plt.show()

import matplotlib.pyplot as plt
from scipy.io import wavfile
from scipy import signal
import numpy as np
sample_rate, samples = wavfile.read('output.wav')
frequencies, times, spectrogram = signal.spectrogram(samples, sample_rate)
plt.pcolormesh(times, frequencies, np.log(spectrogram))
plt.ylabel('Frequency [Hz]')
plt.xlabel('Time [sec]')
plt.show()

# -*- coding: utf-8 -*-

import matplotlib.pyplot as plt
from scipy.io import wavfile
from scipy import signal
import numpy as np

sample_rate, samples = wavfile.read('output.wav') # ./output/audio.wav
frequencies, times, spectrogram = signal.spectrogram(samples, sample_rate)

plt.pcolormesh(times, frequencies, np.log(spectrogram))
plt.ylabel('Frequency [Hz]')
plt.xlabel('Time [sec]')
plt.show()

