aidiary
3/4/2015 - 12:12 PM

メルケプストラムの時系列を描画

メルケプストラムの時系列を描画

import os
import numpy as np
import matplotlib.pyplot as plt

def draw_mcep(mcep_file1, mcep_file2, order):
    mcep1 = np.loadtxt(mcep_file1)
    mcep2 = np.loadtxt(mcep_file2)
    plt.plot(mcep1[:, order], label=mcep_file1)
    plt.plot(mcep2[:, order], label=mcep_file2)
    plt.xlabel("frame")
    plt.title("%dth-order mcep" % order)
    plt.legend(loc=4)

mcep_file1 = "mcep/clb/arctic_a0005.mcep"
mcep_file2 = "mcep/slt/arctic_a0005.mcep"
draw_mcep(mcep_file1, mcep_file2, 0)