⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 guide.vme

📁 speech signal process tools
💻 VME
📖 第 1 页 / 共 3 页
字号:
	ESPS COMMON	ESPS HEADERS	FUTURE CHANGES.fiThe "ESPS PARAMETERS" section lists the parameters that are read from theparameter or common file and gives their types.  The section shouldexplain how the program uses each of these parameters.  .lpThe "ESPS COMMON" section describes how the ESPS Common file isprocessed (e.g., whether the \fIfilename\fP in Common is required tomatch a particluar file name), and what items, if any, are written tothe Common file.  .lpThe "ESPS HEADERS" section lists which header items are read by the program (including generic header items), and explains how the programdepends on them.  This section also lists the header items that written by the program.  .lpThe "FUTURE CHANGES" section is intended to record ideas for enhancingthe program.  This section should be included even when the manual page is written before the program, since its contents may affect the program structure.  .sh 1 "Command Line Format and Pipelines".lpThe command line for any ESPS program will be.(l\fIprog options input-files output-files.)lOptions, if present, will be of the standard\s-1UNIX\s+1 form (.b \-x,.b \-x\fI\ text,\fR or .b \-x\fItext\fR)..lpBy default, the parameter file for the program will be the file "params"in the current directory.  All ESPS programs that process parameters willrecognize the option .(l\fB\-P \fIparamfile\fR.)lwhich will specify an alternative parameter file name..lpIf the output of the program is ASCII text then the default output isstandard output.   This can be redirected by the user, if desired, byusing the standard \s-1UNIX\s+1 shell facilities.    If the output of theprogram is binary data, then an output file must be specified.If a minus sign is given, then standard output isused.  The intent here is to reduce the chance that auser will accidently send binary data to his terminal.Any source file name may be replaced by a minus sign, meaning that thissource is read from the standard input (if a program takes multiple sourcefiles, only one may be read from standard input, however). Standard input or standard output are never to be the default ifa binary data file is involved..lpWhere reasonable, pipelines should be allowed.  If a program performsrandom I/O on its input, that fact should be included in the userdocumentation. If a program reads from a pipe, it writes the string"<stdin>" as the source file name in the output header.  Note that programs that read SPS files from pipes can not depend on the headeritem common.ndrec -- see ESPS(5\-\s-1ESPS\s+1).  .lpPrograms that perform plots or dumps, or that compute statistics, havedifferent syntax. For one thing, they do not accept parameter files. Theyare invoked by lines of the form.(l\fIprog options src1 [src2 ...]\fR.)lThe output should go to the standard output.  Where reasonable, thedefault behavior should be to plot on the user's screen.  Also,device-specific output should be specifiable with the \fB\-T\fRswitch on the command line.  Where possible, values for the \fB\-T\fRoption will agree with those of the \s-1UNIX\s+1 \fIplot(1)\fR.  Common ESPS supported options here are \fBgps, mcd, tek, \fP and\fBimagen\fP.  command where possible..sh 1 "Standard Option Letters".lpWhen appropriate, ESPS programs should use the the following standardoptions:.nf.ta .5i	\fB\-c\fP = comment	\fB\-e\fP = elements	\fB\-f\fP = fieldname 	\fB\-g\fP = gain	\fB\-h\fP = history file	\fB\-k\fP = clock, keyword	\fB\-m\fP = mode, method	\fB\-n\fP = number, value	\fB\-p\fP = points 	\fB\-P\fP = parameter files/values	\fB\-r\fP = records	\fB\-s\fP = seconds	\fB\-t\fP = text, title	\fB\-T\fP = device type	\fB\-u\fP = unvoiced speech	\fB\-v\fP = voiced speech/records	\fB\-w\fP = width, window	\fB\-x\fP = debug level 	\fB\-X\fP = x-axis	\fB\-y\fP = y-axis 	\fB\-Y\fP = y-axis	\fB\-z\fP = suppress 	\fB\-Z\fP = suppress.ta.fi.sh 1 "Command Line Options and Parameter File Values".lpIn general analysis conditions are specified in a file read by theESPS program (see reference (2) for details of the parameter file).However, if the programmer decides that certain parameter values willchange often from run to run, then these values can be specified onthe command line as options.  When used, command line values willoverride values in the parameter file given for the variable.Analysis parameter values should be stored in the output file header,using either built-in header fields or generics; this holds whether the parameters were specified on the command line or in the parameter file..lpFor programs that process parameter and common files, the manual page must include the sections "ESPS PARAMETERS" and "ESPS COMMON".  The first of these should document all of the parameters that are read from the parameter file.  The second should explain how ESPS commonis handled by the program (ignored, processed, or processed with a filename restriction -- see [3]), and it should document any values that are written to ESPS common.  .lpIn order to allow new analysis condition options to be added fortesting or experiments, without modifying the data file headersimmediately, but still record all analysis conditions in the outputfile header, all ESPS programs will store the command line that invokedthem in the comment field of the of the output file header.A library function, .i get_cmd_line(3\-\s-1ESPS\s+1)returns the command line as a string for inclusion in the header..sh 1 "Internal Structure of ESPS Programs".lpAll ESPS programs go through similar steps at the beginning and at theend.  First, the options, if any, are parsed using the \fIgetopt(3)\fRsubroutine (note:  \fIgetopt\fR is standard in System V.  We have apublic-domain version in the ESPS library).  Source file headers are readusing the \fIread_header\fR(3\-\s-1ESPS\s+1) routine and the various generic headeraccess routines:.i genhd_list(3\-\s-1ESPS\s+1), .i genhd_type(3\-\s-1ESPS\s+1), and.i get_genhd(3\-\s-1ESPS\s+1).  The routine \fIeopen\fP(3\-\s-1ESPS\s+1) can beused to facilitate file opening, header reading, and file typechecking.  Then \fIread_params\fR(3\-\s-1ESPS\s+1) is called to readthe parameter and common files and create a symbol table; neededparameters are checked and retrieved from the symbol table using thesymbol table access routines (\fIgetsym_X\fR(3\-\s-1ESPS\s+1)).  Theroutine \fIsymerr_exit\fR(3\-\s-1ESPS\s+1) is called after allparameter values are retrieved; it cleans up and exits after anysymbol table errors.  Parameter values and header values are checkedfor consistency (documentation for individual programs will describethe checks performed), and the program exits if the source file(s)are the wrong type or are inconsistent with one another.  Record keeping is performed using.i add_source_file,.i get_cmd_line,and .i add_comment(3\-\s-1ESPS\s+1). (See the discussion about the order of usingthese functions in [1].).lpOutput headers are created with.i new_header(3\-\s-1ESPS\s+1), .i copy_header(3\-\s-1ESPS\s+1), and the generic header routines\fIadd_genhd\fR_X(3\-\s-1ESPS\s+1).  In most cases, all fields of theoutput file header will be known before any processing is performed.If so, the output header(s) is(are) written by calling\fIwrite_header\fR(3\-\s-1ESPS\s+1) and any data to be written by theprogram is appended.  If this is not possible, output is directed toa temporary file, then the header is written, and then the temporaryfile is dumped to the output and deleted.  This method is preferredto patching up header locations by doing disk seeks since it allowsthe output to be a pipe.  Definition of FEA file records using.i add_fea_fld(3\-\s-1ESPS\s+1)must also take place before the header is written.  .lpAll programs return zero exit status if the program's operation wassuccessful, and nonzero exit status if an error occurred, so shell scriptsare notified of the error condition..sh 1 "Compile-time vs. Run-time Symbols".lpMany analysis conditions are given as character strings for names ofmethods, such as AUTO_SAM, HAMMING, LPC10, etc.    These strings areassociated with C compile-time \fB#define\fR values.  For example, in.i <header.h>there is the statement.vS.nf    #define HAMMING 1.fi.vEThe value that actually gets stored to identify the method in thiscase is 1, but the programs all reference that value as HAMMING.There is no built-in connection between the run-time reading of theparameter file and the compile-time symbol HAMMING.  Of course, wedon't want to read the integer 1 from the parameter file (or commandline) in this case, and we don't want to see it in listings from\fIpsps\fP(1\-\s-1ESPS\s+1).  To make the connection between the compile-time symbolsand the run-time reading of the parameter file, there are arrays thatcontain these symbols.  A function,.i lin_search(3\-\s-1ESPS\s+1), searches these arrays and returns the index if the symbolis found.  By using these arrays and this function, the programmercan easily read character strings from the parameter file or thecommand line and get the value associated with that string forcomparison against the compile-time symbols.  See.i lin_search(3\-\s-1ESPS\s+1) and.i lin_search2(3\-\s-1ESPS\s+1) for details..lpThese arrays can also be used to return the string associated with aparticular compile-time symbol.  For example:.(lprintf("Method is %s\n",method_array[method_code]);.)lwill print the symbol associated with the current value of .i method_code.Many of these arrays are stored in .i <header.h>for the appropriate arrays.  Others can be found by reading therelevant program documentation.  .sh 1 "ESPS Include Files and Library Functions".lpInclude files for ESPS programs are stored in a directory .i espsunder a location specified at install time; the suggested default is.i /usr/esps/include.  Programs include such files them by means of a line of the form.vS.nf     #include <esps/file.h>.fi.vEThe install script makes sure that ESPS compilations are done withthe appropriate \fB\-I\fP flag to cause the ESPS include directory to be searched before the standard locations.  Here are some of themost important ESPS include filesCurrently, the following include files exist:.ip anafea.h 10Includes declarations needed for FEA_ANA files;.ip header. 10Includes declarations for header structure, header access routinesand the character arrays containing .i methodsand.i codesvalues for use with .i lin_search. This file is included automatically by <esps.h>.  .ip param.h 10Includes declarations for parameter file access routines.This file is included automatically by <esps.h>.  .ip ftypes.h 10Includes declarations for file type constants.This file is included automatically by <esps.h>.  .ip esps.h 10Includes some useful macro definitions and includes header.h, param.h,and ftypes.h.   All ESPS programs should include this file, and notmake specific reference to the above three files..ip constants.h 10Includes some useful constant declarations..ip sd.h 10Includes declarations for SD files..ip spec.h 10Includes declarations for SPEC files..ip filt.h 10Includes declarations for FILT files..ip scbk.h 10Includes declarations for SCBK files.  .ip fea.h 10Includes declarations for FEA files.  .ip complex.h 10Includes a typedef and useful macros for processing complex numbers\- see .i complex(3\-\s-1ESPS\s+1).  .ip vq.h 10Includes declarations for FEA_VQ files.  .ip fstat.h 10Includes declarations for FEA_STAT files.  .lpIn most cases, an ESPS program will include \fI<esps/esps.h>\fR and oneor more type specific include files, depending on the type of datafiles the program handles.  See the Section 5 manual pages [4].  .lpESPS library routines are compiled into two library modules, one each for the general and local sections.  The default names and locations forthese are /usr/lib/libspsg.a and /usr/lib/libspsl.a.  If routinesfrom these are used one or the other or both switches.i -lspsgand.i -lspslshould be added on the.i cccommand line.  If the library is stored in a different location, then an appropriate command line option must be used (for distributed ESPSprograms, this is handled automatically by the install script).  .sh 1 "Defined Constants for Numerical Limits"

⌨️ 快捷键说明

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