featohtk.1
来自「speech signal process tools」· 1 代码 · 共 501 行
1
501 行
.\" Copyright (c) 1998 Entropic Research Laboratory, Inc. All rights reserved..\" @(#)featohtk.1 1.1 3/17/98 ERL.ds ]W (c) 1998 Entropic Research Laboratory, Inc..if n .ds - ---.if t .ds - \(em\h'-0.5m'\(em.TH FEATOHTK 1\-ESPS 3/17/98.SH NAMEfeatohtk \- HTK input filter for ESPS FEA files.SH SYNOPSIS.Bfeatohtk[.BI \-f " field"\c.RI [ range ]] [.BI \-k " parmKind"] [.BI \-r " range"] [.BI \-x " debug_level"] [.BI \-E " field"\c.RI [ index ]] [.B \-L] [.BI \-O " field"\c.RI [ index ]] [.BI \-P " param_file"].I "input output".SH DESCRIPTION.PP.I featohtkreads a FEA file.I input,extracts the contents of specified fields or portions of fields,formats the extracted data as an HTK waveform or parameter file(see ref. [1]),and writes the result as.I output.The function is designed to be used as an input filter to permitconvenient reading by HTK of data written by ESPS programs or.I waves+.Output is in HTK default most-significant-byte-first order, regardlessof the architecture of the machine on which the program is run..PPIf.I inputis ``\-'', standard input is used for the input file.If.I outputis ``\-'', standard output is used for the output file.The input and output should not be the same file;however, the program can be run as a filterby specifying ``\-'' for both input and output..PPThe output consists of a standard HTK header(see section 5.7.1 [``HTK Format Parameter Files''] of ref. [1])followed by a sequence of waveform samplesor parameter vector samples..PPThe header contains items that indicatethe number of samples in the file,the sample period,the number of bytes per sample,and the parameter kind.The sample period is given in units of 100 nanosecondsand is computed from the ESPS generic header item.I record_freqin the input header.The sample kind is a code indicating whether the samplesare waveform samples (WAVEFORM) or contain vectors oflinear-prediction filter coefficients (LPC),mel-frequency cepstral coefficients (MFCC), etc..PPThe sample kind is determined by command-line optionsor ESPS parameter-file entries; see.B \-kunder OPTIONS for the full list of supported basic parameter kinds.For parameter kinds other than WAVEFORM, IREFC, and DISCRETE,the basic parameter vector can be augmented with a log-energy term;see option.BR \-E .For parameter kind MFCC, a ``zeroth-order cepstral parameter''may appear in addition to, or in place of, the log energy;see option.BR \-O ..PPEach input record supplies the contents for one output waveform sampleor parameter sample vector.The basic output coefficients (waveform samples or parameter vectors)are taken from a specified field;see option.BR \-f .The entire field or a specified subset may be used.The log-energy term, if any, may be a specified element of the samefield or another field;see option.BR \-E .Likewise the zeroth-order cepstral parameter, if included,may be a specified element of the same field or another;see option.BR \-O ..PPIn the output vector, the basic coefficients (specified with.BR \-f )come first, followed by the zeroth-order cepstral term, if any,followed finally by the log-energy term, if any..PPThe data type of the output vectors is.I shortfor parameter kinds WAVEFORM, IREFC, and DISCRETE, and.I floatfor the other parameter kinds.The data types of the input fieldsneed not match the output data type; conversions are performed as necessary..SH OPTIONS.PPThe following options are supported.Default values are shown in parentheses..TP.BI \-f " field" "\h'|1.4i'\fR(no default)\fP".TP\fB\-f "\fIfield\fB\^[\^\fIgrange\fB\^]\^"\fRThe name of the field containing the waveform sample valuesor parameter values to be included in the output..IPThe second form, with brackets,indicates a subset of the field elementsthat are to be included in the output.For example, ``\-f "auto[0,2:5,8]"'' indicates that the output vectorcontains elements number 0, 2 through 5, and 8of the input field named.I auto.The reason for the double quotes is simply to prevent the shellfrom giving the usual special interpretation to the brackets.The brackets contain a general range specificationof the form handled by the function.IR grange_switch (3\-ESPS).See the function manual page for the detailed syntax..IPThe first form of the option argument, without the bracketed range,denotes the entire field..TP.BI \-k " parmKind" "\h'|1.4i'\fR(no default)"A string indicating the basic kind of datato be indicated in the output HTK header\*-e.g. WAVEFORMfor sampled waveform dataor LPREFC for linear-prediction reflection coefficients.The allowed values are:.sp 0.5.nf.ta 0.25i 1.50i 2.75i 4.0i WAVEFORM LPC LPREFC LPCEPSTRA IREFC MFCC FBANK MELSPEC USER DISCRETE.DT.fi.sp 0.5For the meaning of each,see section 5.7.1 (``HTK Format Parameter Files'') of ref. [1].(Note that LPDELCEP, though listed in that section, is not supported.).TP.BI \-r " start" : "last" "\h'|1.4i'\fR(1:[last in file])\fP".TP.BI \-r " start" :+ "incr".TP.BI \-r " start"The range of records to be processed.In the first form, a pair of unsigned integersgives the record numbersof the first and last records to be processed(counting from 1 for the first record of the file).Either.I startor.I lastmay be omitted; then the default value is used.If.IR last " = " start " + " incr,the second form (with the plus sign) specifies the same range as the first.The third form (omitting the colon) specifies a single record..TP.BI \-x " debug_level" "\h'|1.4i'\fR(0)\fP"A positive value of.I debug_levelcalls for debugging output,which is printed on the standard error output.Larger values result in more output.For the default value of 0, no messages are printed..TP.BI \-E " field".TP\fB\-E "\fIfield\fB\^[\^\fIindex\fB\^]\^"\fRA field element containing an energy or log energy termto be included in an output parameter file in addition to thebasic parameters in the field specified with.BR \-f .The resulting output file has a parameter kinddenoted by appending the qualifier ``_E''to the basic type indicated with.BR \-k.For example, if.BR \-k " LPREFC"was specified, the output file would have the format indicated by``LPREFC_E''.See section 5.5 (``Energy Measures'') of ref. [1].In the second form, the.I indexin brackets is an integer that indicates the field element to be used(counting from 0 for the first element).(The reason for the double quotes is simply to prevent the shellfrom giving the usual special interpretation to the brackets.)The first form, without brackets, may be usedwhen the field has only one element..TP.B \-LLog energy computation flag.If this option is specified, any field elementspecified with.B \-Eis assumed to be an energy, and its natural logarithm is computedto provide a log energy term for the output.If.B \-Lis not specified, the logarithm is not computed, and the unmodifiedfield value is used.This option has no effect if.B \-Eis not specified..TP.BI \-O " field".TP\fB\-O "\fIfield\fB\^[\^\fIindex\fB\^]\^"\fRA field element containing a ``zeroth-order cepstral parameter''to be included in the output in addition to, or in place of,the log energy term specified with.BR \-E .See section 5.5 (``Energy Measures'') of ref. [1].This option is valid only when the basic parameterkind specified with.B \-kis MFCC.The resulting output parameter kind is MFCC_O if.B \-Ois specified alone, and MFCC_O_E if both.B \-Oand.B \-Eare specified.In the second form of the option argument, the.I indexin brackets is an integer that indicates the field element to be used,(counting from 0 for the first element).(The reason for the double quotes is simply to prevent the shellfrom giving the usual special interpretation to the brackets.)The first form, without brackets, may be usedwhen the field has only one element..TP.BI \-P " param_file" "\h'|1.4i'\fR(params)\fP"The name of the ESPS parameter file..SH ESPS PARAMETERS.PPThe terms ``parameter'' and ``parameter file'' are used in two senses.An HTK parameter file, as described in ref. [1],is a data file containing sample vectorsof parameters such as reflection coefficients, cepstral coefficients,or filter-bank channel outputs.An ESPS parameter file, as described in ref. [2],is an ASCII file that contains values for parameters,such as those described in this section,that control the operation of a program..PPThe following parameters are read from the ESPS parameter file, if present..TP.I "compute_log \- string".IPA value of ``YES'' or ``yes'' means compute the logarithm of the field,if any, specified with the option.B \-Eor the parameter.I Efield.A value of ``NO'' or ``no'' means skip the logarithm computation.This parameter is not read if the option.B \-Lis specified.The default value is ``NO''..TP.I "field \- string".IPThe name of the field containing the waveform sample valuesor parameter values to be included in the output.As in the argument of the option.BR \-f ,the field name may be followed by a bracketed.I grangespecification to indicate a subset of the field elementsthat are to be included in the output.See.B \-funder OPTIONS, and see the.IR grange_switch (3\-ESPS)man page.This parameter is not read if.B \-fis specified.It is required if.B \-fis not specified.(There is no default.).TP.I "nan \- int".IPThe total number of input records to process.A value of 0, the default,means continue processing until the end of the file is reached.This parameter is not read if the option.B \-ris specified..TP.I "parmKind \- string".IPThe basic kind of data to be indicated in the output HTK header.Allowed values are those listed for the option.BR \-k .This parameter is not read ifthat option is specified.It is required if the option is not specified.(There is no default.).TP.I "start \- int".IPThe record number of the first input record to be processed.A value of 1, the default, denotes the first record of the file.This parameter is not read if the option.B \-ris specified..TP.I "Efield \- string".IPThe name of a field containing an energy or log energy termto be included in the output HTK parameter file in addition to thebasic parameters in the field specified with the option.B \-for the parameter.I field.As in the argument of the option.BR \-E ,an integer index in brackets following the field nameindicates the field element to be used;the bracketed index may be omitted when the field has only one element.If this parameter is omitted, and if the option.B \-Eis not specified,then no log energy term is included in the output.This parameter is not read if.B \-Eis specified..TP.I "Ofield \- string".IPThe name of a field containing a ``zeroth-order cepstral parameter''to be included in the output in addition to, or in place of,the log energy term specified with the option.B \-Eor the parameter.I Efield.As in the argument of the option.BR \-O ,an integer index in brackets following the field nameindicates the field element to be used;the bracketed index may be omitted when the field has only one element.If this parameter is omitted, and if the option.B \-Ois not specified,then no zeroth-order cepstral parameter term is included in the output.This parameter is not read if.B \-Ois specified..SH ESPS COMMON.PPThe ESPS Common file is not read or written..SH ESPS HEADERS.PPThe ESPS header item.I ndrecis accessed and used in determining the number of samples to indicatein the HTK output header.The generic header item.I record_freqin the input is accessed and used in determining the sample periodto indicate in the output header.Field size information in the input header is accessedand used in determining the number of bytes per sampleto indicate in the output header..SH FUTURE CHANGES.PPPossible option for output in Esignal format.Possible option to control output byte order..SH EXAMPLES.PPTo let HTK read waveforms from an ESPS FEA_SD file,set the environment variable HWAVEFILTER to the value:.IP.Ifeatohtk \-kWAVEFORM \-fsamples $ \-.PPTo let HTK read reflection coefficients from an ESPS FEA_ANA file,set the environment variable HPARMFILTER to the value:.IP.Ifeatohtk \-kLPREFC \-fspec_param $ \-.LPand set the HTK configuration variable TARGETKIND appropriately,e.g. with an entry:.IP.I TARGETKIND = "LPREFC".LPin the HTK configuration file.(If TARGETKIND is not set,HTK will probably attempt\*-and fail\*-to read the file as a waveform filebefore reading it as a parameter file.The file can still be read successfully if the environment variableHWAVEFILTER is given the same value as HPARMFILTER.).SH ERRORS AND DIAGNOSTICS.PPIf an unknown option is specified,or if the number of file names is wrong,.I featohtkprints a synopsis of command-line usage and exits..PPThe program exits with an error messageif any of the following are true:.I inputdoes not exist or cannot be read by the ESPS file input routines;.I inputis the same as.I output(but not ``\-'');no basic parameter kind is specified (with.B \-kor the parameter.IR parmKind );the specified parameter kind is invalid or unsupported;no basic parameter field is specified (with.B \-for the parameter.IR field );an input field (specified with.BR \-f ,.BR \-E ,or.BR \-Oor a corresponding parameter-file entry)does not exist in the input file or is not numeric;an invalid field subrange or item index is indicated;an invalid range is specified (with.B \-ror the parameters.I startand.IR nan )..PPThe program prints a warning and continuesif either of the following is true:an energy field is specified (with.B \-Eor the parameter.IR Efield )when the basic parameter kind is WAVEFORM, IREFC, or DISCRETE;a zeroth-order cepstral parameter field is specified (with.B \-Oor the parameter.IR Ofield )when the basic parameter kind is not MFCC..SH BUGS.PPNone known..SH REFERENCES.PP[1] Steve Young, Julian Odell, Dave Ollason, Valtcho Valtchev,and Phil Woodland,.I "The HTK Book,"Entropic, 1997..PP[2] Joe Buck and John Shore,``Parameter and Common Files'', in.I "ESPS/waves+ with EnSig Application Notes",Entropic, 1997..SH "SEE ALSO".PP.IR grange_switch (3\-ESPS)..SH AUTHOR.PPRod Johnson, Entropic.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?