%pylab inline
rcParams["figure.figsize"] = (16, 4)
Populating the interactive namespace from numpy and matplotlib
import pysptk
import pyreaper
from scipy.io import wavfile
from IPython.display import Audio
fs, x = wavfile.read(pysptk.util.example_audio_file())
plot(x)
Audio(x, rate=fs)
pm_times, pm, f0_times, f0, corr = pyreaper.reaper(x, fs)
plot(pm_times, pm, linewidth=3, color="red", label="Pitch mark")
legend(fontsize=15)
<matplotlib.legend.Legend at 0x7f98138faa90>
plot(f0_times, f0, linewidth=3, color="green", label="F0 contour")
legend(fontsize=15)
<matplotlib.legend.Legend at 0x7f98102442e8>
plot(f0_times, corr, linewidth=3, color="blue", label="Correlations")
legend(fontsize=15)
<matplotlib.legend.Legend at 0x7f980e93c3c8>