man.diff

来自「speech signal process tools」· DIFF 代码 · 共 458 行 · 第 1/2 页

DIFF
458
字号
This option forces all computation to be carried out in double precisionformat. By default if this option is not specified, floating point operation is used forinput data types of FLOAT, LONG, SHORT, BYTE, FLOAT_CPLX, LONG_CPLX, SHORT_CPLX, and BYTE_CPLX; otherwise if input data type is DOUBLE or DOUBLE_CPLX,double precision operation is used..TP.B \-fThis option saves the lowpass filter coeffiecients in the header of outputfile..TP.BI \-x " debug_level \fR[0]\fP"If .I debug_levelis positive,.I sfconvertprints debugging messages and other information on the standard erroroutput.  The messages proliferate as the  .I debug_levelincreases.  If \fIdebug_level\fP is 0 (the default), no messages areprinted.  .SH ESPS PARAMETERSThe parameter file is not required to be present, as there are defaultparameters that apply.  If the parameter file does exist, the followingparameters are read:.TP.I new_sample_freq - intThe sampling frequency of output file.  This parameter is not read if the\fB-s\fR option is used..TP.I deviation - floatThe maximum tolerable deviation from \fInew_sample_freq\fR in percent.This parameter is not read if the \fB-v\fR option is used..TP.I start - integerThe first point in the input sampled-data file that is processed.  A valueof 1 denotes the first sample in the file.  If it is not in the parameter(or Common) file, the default value of 1 is used..TP.I nan - integerThe total number of points to analyze.  If it is set to 0 or if the valueis not given, \fInan\fR is set equal to the total number of points in the input file minus \fIstart\fR plus 1.  .TP.I corner_freq - floatThe corner frequency of the lowpass filter designed for interpolation.This parameter is not read if the \fB-c\fR option is used.  A value of zeroindicates the Nyquist rate of output file is used..TP.I Kaiserflag - intThis paramter is optional.  It is used to determine the window type used for the filter designin case of ambiguity.  Set \fIKaiserflag\fR to 1 for the Kaiser window type,or 0 for non-Kaiser window type.  If there is no \fB-w\fR on the command line,\fIsfwin_type\fR is set to a non-Kaiser window type in the paramter file, and \fIKaiserflag\fR exists in the paramter file and it is equal to zero, then the window type determined by \fIsfwin_type\fR isused for the filter design.  Otherwise, the Kaiser windowing filter design is used.  In the case when \fB-w\fR exists on the command line and\fIKaiserflag\fR is 1, then window type specified by \fB-w\fR is used sincea command line option always takes precedence..I rej_db - floatThe rejection ratio of the lowpass filter designed by Kaiser window from passband to stopband in dBs.  This paramter is ignored if a non-Kaiserwindow type is used for filter design..TP.I trans_band - floatThe transition bandwidth of the lowpass filter designed by the Kaiser windowingmethod between passband and stopband.This paramter is ignored if a non-Kaiserwindow type is used for filter design..TP.I sfwin_type - stringWindow type used in designing the lowpass filter other than Kaiserwindowing method.  Available parameters are WT_RECT (rectangular window), WT_HAMMING (Hamming window), WT_TRIANG (Triangular window),WT_HANNING (Hanning window), and WT_COS4 (Cosine to power of 4 window)..TP.I sfwin_len - floatWindow length in seconds used in designing the lowpass filter designed by\fIsfwin_type\fR window type.This paramter is ignored if the Kaiser windowing filter design method is used..TP.I channels - stringThis parameter specifies which channels from a multichannel input file forsampling frequency conversion.  This parameter is not read if the \fB-e\fRoption is used.  .TP.I output_type - stringThis parameter specifies the output data type.  Available data types areDOUBLE, FLOAT, LONG, SHORT, BYTE, DOUBLE_CPLX, FLOAT_CPLX, LONG_CPLX, SHORT_CPLX, and BYTE_CPLX. This parameter is not read if the \fB-o\fR optionis used..TP.I dflag - intThis specifies whether resampling is to be carried out in floating point ordouble precision.  A value of \fI1\fR is for double precision.  A value of \fI0\fR specifies floating point computation..PP.SH ESPS COMMON.PPIf the \fB-r\fR option is not used and ESPS Common processing is enabled,the following items are read from the ESPS Common File provided that no input file is given on the command line and provided that standard inputis not used..IP.I "filename - string".IPThis is the name of the input file..IP.I "start - integer".IPThis is the starting point in the input file for frequency conversion..sp.I "nan - integer".IPThis is the number of points in the input file for frequency conversion.A value of zero means the last point in the file..sp.PPThe following items are written into the ESPS Common file, providedESPS Common processing is enabled and the output file is not <stdout>..IP.I "start - integer".IPA value of 1 is written to the Common file..sp.I "nan - integer".IPThe number of points in the output file..sp.I "prog - string".IPThis is the name of the program (\fIsfconvert\fP in this case)..sp.I "filename - string".IPThe name of the output file..PP.SH ESPS HEADERSThe generic header item \fIrecord_freq\fR  is written in the output file with the actual sampling frequency which may be different from\fInew_sample_freq\fR if \fIdeviation\fR by the \fB-v\fR option is not zero. Theinput file sampling frequency is also written as \fIsource_freq\fR.  Bothheader items are type DOUBLE.  The corner frequency of lowpass filter iswritten as \fIcorner_freq\fR as type DOUBLE if its default value 0 is notused.\fIstart_time\fR header item of type DOUBLE of output file is computedby taking the \fIstart_time\fR of the input file and adding to it the offset time (from the beginning of the first input file) of the firstpoint used in frequency conversion.The header item, \fIfilter_siz\fR, for the size of the lowpass filter is written as type SHORT.  If \fB-f\fR is specified on the command line,the lowpass filter coeffiecients are saved in the header.  The coefficients, \fIfilter\fR, is written as type DOUBLE if input data is type DOUBLE or DOUBLE_CPLX,if the \fB-d\fR option is set, or if the value of \fIdflag\fR in the parameter file is \fIyes\fR.  Otherwise \fIfilter\fR is type FLOAT.If the Kaiser windowing method is used in filter design, \fIrej_db\fR and\fItrans_band\fR are written as type FLOAT. Otherwise, \fIsfwin_type\fR and \fIsfwin_len\fR are written as typeCODED and FLOAT, respectively.The header item, \fIsource_file\fR, is the input file name.  If the inputdata is multichannel, channels selected for sampling frequency conversionis written in the header item \fIchannels\fR..PP.SH EXAMPLESConverting the input sampling frequency 8000 Hz of input data channels1, 3, 4, and 5 to 6000 Hz with the aliased components 80 dB down.	\fIsfconvert -s6000 -R80 -e1,3:5 input.sd output.sd\fRDividing the input sampling frequency of 8000 Hz by one third (2666.66...).  The conversion factor is 1/3.  However, using the option \fI-s 2666\fR fornew sampling frequency will result in large \fIup\fR and \fIdown\fR factors andlong filter length. The \fB-v\fR option allows \fIsfconvert\fR to find the exact intended conversion factor of 1/3by allowing a small deviation from the necessarily truncated\fInew_sample_freq\fR.  The following command finds the actual sampling frequency to be 2666 Hz within plus or minus 26.66 Hz, or exactly 8000/3 Hz with the valuesof 1 and 3 for the \fIup\fR and \fIdown\fR ratios. 	\fIsfcovnert -s2666 -v1 input.sd output.sd\fRConverting the input sampling frequency 8000 Hz to 6000 Hz with a lowpassfilter of corner frequency of 2500 Hz instead of the default 3000 Hz, Nyquistfrequency.	\fIsfcovnert -s6000 -c2500 input.sd output.sd\fRFrequency conversion to 12000 Hz using a lowpass filter designed by Hamming window for input data sampled at 8000 Hz.  The filter will be 0.02 secondlong, or 160 points in samples.	\fIsfconvert -s12000 -wWT_HAMMING -l0.02 input.sd output.sd\fR.PP.SH ERRORS AND DIAGNOSTICSIn the case when the interpolation factor \fIup\fR is very large and window length \fIsfwin_len\fR supplied by \fB-l\fR is too short such that no convolution is possible,an error message is issued and the program exits..PP.SH BUGS.PPNone known..SH REFERENCESAlan V. Oppenheim and Ronald W. Schafer, \fIDiscrete-Time Signal Processing\fP.Englewood Cliffs, New Jersey: Prentice-Hall, Inc., 1989.PP.SH "SEE ALSO"filter(1-ESPS), demux(1-ESPS), type_convert(3-ESPS), window(3-ESPS) .PP.SH AUTHOR.PPProgram and man page by Derek Lin

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?