In [1]:
using REAPER
using PyPlot


INFO: Loading help data...

In [2]:
x = int16(vec(readdlm(joinpath(Pkg.dir("REAPER"), "test", "test16k.txt"))))
fs = 16000
time_axis = [1:length(x)]/fs
figure(figsize=(12, 4), dpi=80, facecolor="w", edgecolor="k")
plot(time_axis, x, label="a speech signal")
xlim(time_axis[1], time_axis[end])
xlabel("Time [sec]")
legend()


Out[2]:
PyObject <matplotlib.legend.Legend object at 0x7f9c220924d0>

In [3]:
pm_times, pm, f0_times, f0, corr = reaper(x, fs);


Residual symmetry: P:1814.794312  N:2462.929688  MEAN:0.243403

In [4]:
figure(figsize=(12, 4), dpi=80, facecolor="w", edgecolor="k")
plot(pm_times, pm, label="Pitch mark", linewidth=2, color=:magenta)
xlabel("Time [sec]")
xlim(pm_times[1], pm_times[end])
ylim(-0.1, 1.1)
legend()


Out[4]:
PyObject <matplotlib.legend.Legend object at 0x7f9bfd71d0d0>

In [5]:
figure(figsize=(12, 4), dpi=80, facecolor="w", edgecolor="k")
plot(f0_times, f0, label="F0 trajectory", linewidth=2, color=:green)
xlabel("Time [sec]")
xlim(f0_times[1], f0_times[end])
legend()


Out[5]:
PyObject <matplotlib.legend.Legend object at 0x7f9bfd6525d0>

In [6]:
figure(figsize=(12, 4), dpi=80, facecolor="w", edgecolor="k")
plot(f0_times, corr, label="Correlation function", linewidth=2, color=:purple)
xlabel("Time [sec]")
xlim(f0_times[1], f0_times[end])
legend()


Out[6]:
PyObject <matplotlib.legend.Legend object at 0x7f9bfd58fd10>