pitchmrk.m
资源名称:speech.rar [点击查看]
上传用户:ay_070428
上传日期:2014-12-04
资源大小:11427k
文件大小:2k
源码类别:
语音合成与识别
开发平台:
Matlab
- function [y,fs,pmark] = pitchmrk(wavefile,maxPeriod,minPeriod,plotopt)
- %PITCHMRK Pitch mark
- % Usage : [y,fs,pmark] = pitchmrk(wavefile,maxPeriod,minPeriod,plotopt)
- % Selfdemo : pitchmrk;
- if nargin==0,
- [y, fs, pmark] = selfdemo; return;
- end;
- if isstr(wavefile),
- % ====== Read wavefile
- [y,fs] = wavread(wavefile);
- y = y-mean(y);
- % ====== Endpoint detection
- legalFrame = epdetect(y,fs);
- if ~isempty(legalFrame),
- y = y(legalFrame.begin:legalFrame.end);
- else
- wavefile
- end;
- else
- y = wavefile;
- fs = plotopt;
- plotopt = 0;
- end;
- % =====