Code covered by the BSD License
Highlights from
colea
-
colea(filename,Srate1)
Copyright (c) 1995 by Philipos C. Loizou
-
colea(infile,Srate1)
COLEA
-
comptool(type)
Copyright (c) 1995 Philipos C. Loizou
-
convert
Copyright (c) 1996 Philipos C. Loizou
-
distool
Copyright (c) 1995 Philipos C. Loizou
-
drawctls
Copyright (c) 1995 by Philipos C. Loizou
-
estf0(type,action)
Copyright (c) 1995 Philipos C. Loizou
-
filetool
Copyright (c) 1996 Philipos C. Loizou
-
filtool
Copyright (c) 1995 Philipos C. Loizou
-
ftrack(action)
Show the formant track
-
iadsil
Copyright (c) 1995 by Philipos C. Loizou
-
isnr(type)
Copyright (c) 1998 by Philipos C. Loizou
-
itext(action)
Copyright (c) 1995 by Philipos C. Loizou
-
label(action,opt)
-
labtool
-
singen
Copyright (c) 1995 Philipos C. Loizou
-
voltool
Copyright (c) 1995 by Philipos C. Loizou
-
[F0, F1, F2, A1, A2, A3, A4, ...
-
[F0, F1, F2, A1, A2]=formants...
-
[F0]=pitch(inp)
-
[F1,F2, F3]=frmnts(a,srat)
The formants are computed by solving for the roots of the LPC polynomial
-
[inp,nsam]=getvec
-
adtext
Copyright (c) 1995 by Philipos C. Loizou
-
apfilter(type,action)
Copyright (c) 1995 Philipos C. Loizou
-
autoc(x,p)
-
centfreq(n,low,high)
Divides the spectrum into n bands equally spaced logarithmically
-
closem(type)
Copyright (c) 1995 Philipos C. Loizou
-
convtool(type)
Copyright (c) 1995 Philipos C. Loizou
-
cprint(otype,cmd)
Prints the image so it fills up the page, with orientation 'otype'
-
cprint(otype,cmd,nfiles)
Prints the image so it fills up the page, with orientation 'otype'
-
crsrline(np,Ylim,button)
Draws the cursor lines
-
design(numch)
Copyright (c) 1995 by Philipos C. Loizou
-
distance(x,y,N,type,opt)
DISTANCE - distance computation y = distance(x,y,N,type,option)
-
dlgopen(cmd,ext)
-
editool(action,psample)
Copyright (c) 1995 by Philipos C. Loizou
-
endpoint
-
engy
Copyright (c) 1995 Philipos C. Loizou
-
estpsd(type)
Copyright (c) 1995 Philipos C. Loizou
-
filtdesi(type,sfreq,numch,nOr...
This function designs different kinds of filters.
-
filtpar(type,param1)
Copyright (c) 1995 Philipos C. Loizou
-
getf0 (sr,x)
Copyright (c) 1995 Philipos C. Loizou
-
gethdr(fp,ext)
-
getkb
global fno
-
getrec
Copyright (c) 1995 Philipos C. Loizou
-
getslide
Copyright (c) 1995 by Philipos C. Loizou
-
getvol
Copyright (c) 1996 by Philipos C. Loizou
-
helpf(type)
-
ilpc(x,p)
-
ishandle(h)
ISHANDLE True for graphics handles.
-
labtext
-
loadfile(action)
Copyright (c) 1995 by Philipos C. Loizou
-
mapfun(xin)
Copyright (c) 1995 Philipos C. Loizou
-
mclick
Detect mouse click, and act appropriately
-
mel(N,low,high)
This function returns the lower, center and upper freqs
-
modhder(fpin,fpout,ext,nsampl...
Adjust the entry in the header regarding number of samples and sampl.
-
modify(action)
Copyright (c) 1995 by Philipos C. Loizou
-
pitch(len,sr,xin)
Copyright (c) 1995 Philipos C. Loizou
-
pitch3(len,sr,xin)
-
pitchaut(len,sr,xin)
Pitch estimation using the autocorrelation method
-
playf(cmd)
-
pllpc(t0)
Copyright (c) 1995 by Philipos C. Loizou
-
prefer(type)
-
prnt(orientation)
-
prnt2(orientation)
-
prntg(orientation)
-
prntg(orientation)
-
puttext
Copyright (c) 1995 Philipos C. Loizou
-
quitall
Copyright (c) 1995 Philipos C. Loizou
-
raw2ils(filename,nbytes,srate...
Usage : raw2ils infile [NumberOfBytesToSkip SamplingFreq]
-
savechan(inp)
Copyright (c) 1995 by Philipos C. Loizou
-
savefile(type)
Copyright (c) 1995 by Philipos C. Loizou
-
savehder(fpin,fpout,ext,nsamp...
Adjust the entry in the header regarding number of samples
-
savelpc
Copyright (c) 1996 Philipos C. Loizou
-
saveparm(type)
-
setchan(numch)
Copyright (c) 1995 by Philipos C. Loizou
-
setdisp(type,clor)
Copyright (c) 1995 Philipos C. Loizou
-
setdur
Copyright (c) 1995 Philipos C. Loizou
-
setfft
Copyright (c) 1995 Philipos C. Loizou
-
setlpc
Copyright (c) 1995 Philipos C. Loizou
-
setlpc
-
seton(type)
Copyright (c) 1995 Philipos C. Loizou
-
setovr(type)
Copyright (c) 1995 Philipos C. Loizou
-
setpar(type)
Copyright (c) 1995 Philipos C. Loizou
-
setsin(type)
Copyright (c) 1995 Philipos C. Loizou
-
showpt
Detect mouse click, and act appropriately
-
singen
Copyright (c) 1995 Philipos C. Loizou
-
smspspec
Copyright (c) 1995 by Philipos C. Loizou
-
specsel
Copyright (c) 1995 Philipos C. Loizou
-
spectrg(wave,segsize,nlap,ntr...
Copyright (c) by 1998 Philipos C. Loizou
-
swapbyte(infile,hdrs)
Copyright (c) 1996 by Philipos C. Loizou
-
volopt(type)
-
zoomi(action)
Copyright (c) 1995 by Philipos C. Loizou
-
contents.m
-
getcontr.m
-
metric.m
-
preemp.m
-
View all files
from
colea
by Philip Loizou
This program can be used to edit speech waveforms
|
| pitchaut(len,sr,xin)
|
function [f0] = pitchaut(len,sr,xin)
% Pitch estimation using the autocorrelation method
% Copyright (c) 1995 Philipos C. Loizou
%
global bf0 af0
xin=filter(bf0,af0,xin); % LPF at 900 Hz
%-----------find the clipping level, CL -----------
i13=len/3;
maxi1=max(abs(xin(1:i13)));
i23=2*len/3;
maxi2=max(abs(xin(i23:len)));
if maxi1>maxi2, CL=0.68*maxi2; else CL= 0.68*maxi1; end;
%----------Center clip waveform, and compute the autocorrelation -----------------------
clip=zeros(len,1);
ind1=find(xin>=CL);
clip(ind1)=xin(ind1)-CL;
ind2=find(xin <= -CL);
clip(ind2)=xin(ind2)+CL;
engy=norm(clip,2)^2;
RR=xcorr(clip);
m=len;
%-------Find the max autocorrelation in the range 60 <= f <= 320 Hz ------------
%
LF=floor(sr/320);
HF=floor(sr/60);
Rxx=abs(RR(m+LF:m+HF));
[rmax, imax]= max(Rxx);
imax=imax+LF;
f0=sr/imax;
%------------ Check max RR against V/UV threshold ----------------------------
silence=0.4*engy;
if (rmax > silence) & (f0 > 60) & (f0 <=320)
f0=sr/imax;
else % -- its unvoiced segment ---------
f0=0;
end
|
|
Contact us at files@mathworks.com