man.diff
来自「speech signal process tools」· DIFF 代码 · 共 210 行
DIFF
210 行
.\" Copyright (c) 1988,1990 Entropic Speech, Inc.; All rights reserved.\" @(#)zcross.1 1.8 8/10/91 ESI.TH ZCROSS 1\-ESPS 8/10/91.ds ]W "\fI\s+4\ze\h'0.05'e\s-4\v'-0.4m'\fP\(*p\v'0.4m'\ Entropic Speech, Inc..SH "NAME"zcross \- computes average zero-crossing rate for sampled data in FEA records .SH "SYNOPSIS".B zcross[.BI \-P " params"] [.BI \-f " sd_field"[.BI \-f " zeros_field"]] [.BI \-r " range"] [.BI \-x " debug_level"].I "input output".SH "DESCRIPTION".PP.I Zcrossaccepts a FEA file \fIinput\fP containing a vector sampled-data fieldin each record. It produces a FEA file \fIoutput\fP with recordscontaining the average zero-crossing rate of the sampled-data fieldfrom that record. Each field of sampled data may be thought of as aseparate frame of data, such as might be produced by \fIframe\fP(1\-\s-1ESPS\s+1). The default name for the sampled data field in\fIinput\fP is \fIsd\fP, and the default name for the zero-crossingfield in \fIoutput\fP is \fIzero_cross_rate\fP. Both defaults can bechanged by means of the \fB\-f\fP option. If \fIinput\fP is "\-",standard input is used for the input file. If \fIoutput\fP is "\-",standard input is used for the output file..PPThe zero-crossing rate is computed by multiplying the number of zerocrossings by the sampling frequency and dividing by the number of samplesin the frame. Thus, the units are zero-crossings per second. If\fIinput\fP is not a segment-labelled FEA file (see FEA (5\-\s-1ESPS\s+1)),the frame is considered to comprise all of the points in the sampled datafield, so the frame length is a constant set to the size of the sampleddata field (which can be determined from the file header). If \fIinput\fPis segment-labelled, the size of the sampled data field is really a maximumsize, and the frame size for a particular record is given by the\fIsegment_length\fP field (this field is always present insegment-labelled files). Thus, for segment-labelled files, the frame fromany input record is the first \fIsegment_length\fP points of the sampleddata field..PPThe sampling frequency is determined by the generic header item\fIsrc_sf\fP from \fIinput\fP. If this generic header item doesn't exist,the sample frequency is set to 1 so that the zero-crossing rate is reportedin units of crossings per sample. (Note that you can always use\fIaddgen\fP (1\-\s-1ESPS\s+1) to put in the correct sampling frequency ifit is missing.).SH OPTIONS.PPThe following options are supported:.TP.BI \-P " param" " \fR[params]\fP"Specifies the name of the parameter file..TP.BI \-r " start" : "last" "\fR [1:(last in file)]".TP.BI \-r " start" :+ "nan"In the first form, a pair of unsigned integers specifies the rangeof records to be processed.Either.I startor.I lastmay be omitted; then the default value is used.If.IR last " = " start " + " nan,the second form (with the plus sign) specifies the same range as the first.The \fB\-r\fP overrides the values of \fIstart\fP and \fInan\fP from the parameter file. .TP.BI \-f " field_name" If this option is used once, it specifies the name of the sampled datafield in \fIinput\fP. If it is used twice, the second time it specifiesthe name of the power field in \fIoutput\fP. The default names for thesefields are "sd" and "zero_cross_rate", respectively..SH "ESPS PARAMETERS".PPThe parameter file does not have to be present,since all the parameters have default values.The following parameters are read, if present, from the parameter file:.IP.I "sd_field_name \- string".IPThis is the name of the sampled data field in \fIinput\fP.The default is "sd". A parameter file value (if present) is overriddenby the first use of the \fB\-f\fP option. .IP.I "zcross_field_name \- string".IPThis is the name of the raw power field in \fIoutput\fP. The default is"zero_cross_rate". A parameter file value (if present) is overridden bythe second use of the \fB\-f\fP option..IP.I "start \- integer".IPThis is the first record of \fIinput\fP to process. The default is 1. Itis not read if the \fB\-r\fP option is used..sp.I "nan \- integer".IPThis is the number of records to process. It is not read if the \fB\-r\fPoption is used. A value of zero means all subsequent records in the file;this is the default..PPRemember that command line option values override parameter file values..SH "ESPS COMMON".PPESPS Common processing may be disabled by setting the environment variableUSE_ESPS_COMMON to "off". The default ESPS Common file is .espscom in the user's home directory. This may be overridden by settingthe environment variable ESPSCOM to the desired path. User feedback ofCommon processing is determined by the environment variable ESPS_VERBOSE,with 0 causing no feedback and increasing levels causing increasinglydetailed feedback. If ESPS_VERBOSE is not defined, a default value of 3 isassumed..PPESPS Common is not processed by .I zcrossif \fIinput\fP is standard input. Otherwise, provided that the Common file is newer than the parameter file, and provided that the \fIfilename\fP entry in Common matches \fIinput\fP, the Common values for \fIstart\fP and \fInan\fP override those that may be present in the parameter file. .PPThe following items are written into the ESPS Common file provided that \fIoutput\fP is not <stdout>. .IP.I "start \- integer".IPThe starting point from the input file..sp.I "nan \- integer".IPThe number of points in the selected range..sp.I "prog \- string".IPThis is the name of the program .RI ( zcrossin this case)..sp.I "filename \- string".IPThe name of the input file \fIinput\fP..SH ESPS HEADERS.PPThe \fIoutput\fP header is a new FEA file header. If the genericheader item \fIsrc_sf\fP exists in the input file, it is copied to theoutput file if it exists (otherwise it is set to 1). The items\fIstart\fP and \fInan\fP are written to contain the starting recordnumber and number of records processed..PPThe size of the input sampled data field is written to the generic \fIfrmlen\fP. .PPThe generic header item \fIstart_time\fP is written in the outputfile. The value written is computed by taking the \fIstart_time\fPvalue from the header of the input file (or zero, if such a headeritem doesn't exist), adding to it the relative time from the firstrecord in the file to the first record processed, and adding adisplacement corresponding to half of \fIfrmlen\fP. The computationof \fIstart_time\fP depends on the value of the generic header item\fIsrc_sf\fP in the input file (which is assumed to be the samplingrate of the actual data in each field). If this item is not present,\fIstart_time\fP is just copied from the input file to the outputfile..PPAs usual, the command line is added as a comment and the header of\fIinput\fP is added as a source file to \fIoutput\fP. Anothercomment gives the name of the field added by \fIzcross\fP..SH "FUTURE CHANGES".PPControl over the type of the output power field. .SH "SEE ALSO".PP\fIframe\fP (1\-\s-1ESPS\s+1), FEA (5\-\s-1ESPS\s+1), \fIfea_stats\fP(1\-\s-1ESPS\s+1), \fIpwr\fP (1\-\s-1ESPS\s+1), \fIwindow\fP(1\-\s-1ESPS\s+1), \fIaddgen\fP (1\-\s-1ESPS\s+1), \fIstats\fP(1\-\s-1ESPS\s+1) .SH "WARNINGS AND DIAGNOSTICS".PP.I zcrosswill exit with an error message if any of the following are true: .I inputdoes not exist or is not an ESPS FEA file; the sampled-data field does not exist in.I input;the power field already exists in.I input..PP.I Zcrosswill warn if the generic \fIsrc_sf\fP doesn't exist in \fIinput\fP. .SH "BUGS".PPNone known. .SH "AUTHOR".PPManual page and program by John Shore.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?