示例#1
0
def synthesize(pfile, mfile, rawfile, wavfile):
    c1 = 'excite -p 80 %s | mlsadf -m 39 -a 0.35 -p 80 %s | x2x +fs -o > %s' \
            % (pfile, mfile, rawfile)
    c2 = 'sox -e signed-integer -c 1 -b 16 -r 16000 %s %s' % (rawfile, wavfile)

    execute(c1)
    execute(c2)
def ext_pitch(rawfile, pitchfile):
	f0cmd = 'x2x +sf %s | pitch -a 1 -p 80 -s 44.1 -L 10 -H 500 > %s' \
	                                       % (rawfile, pitchfile)
	execute(f0cmd)
def ext_mcep(rawfile, mcepfile):
	mcepcmd = 'x2x +sf < %s | frame -l 400 -p 80 | window -l 400 -L 512 | mcep -l 512 -m 25 -a 0.54 -e 0.00001 > %s' % (rawfile, mcepfile)
	
	execute(mcepcmd)
示例#4
0
def mcep2sp(mfile, spfile):
    cmd = 'mgc2sp -m 39 -a 0.42 -l 512 -o 2 %s > %s' \
                                           % (mfile, spfile)
    execute(cmd)
示例#5
0
def ext_logf0(rawfile, pitchfile):
    f0cmd = 'x2x +sf %s | pitch -a 1 -p 80 -s 16.0 -H 600 -o 2 > %s' \
                                           % (rawfile, pitchfile)
    execute(f0cmd)
示例#6
0
def ext_mfcc(rawfile, mfccfile):
    mfcccmd = 'x2x +sf < %s | frame -l 400 -p 80 | mfcc -l 400 -m 39 -E > %s' % (
        rawfile, mfccfile)

    execute(mfcccmd)