📄 sd.5t
字号:
.\" Copyright (c) 1987 Entropic Speech, Inc.; All rights reserved.\" @(#)sd.5t 1.8 25 Sep 1997 ESI.TH SD 5\-ESPS 25 Sep 1997.ds ]W "\fI\s+4\ze\h'0.05'e\s-4\v'-0.4m'\fP\(*p\v'0.4m'\ Entropic Speech, Inc..de us\\$1\l'|0\(ul'...SH NAMEESPS Sampled Data File \- (.sd).SH SYNOPSIS.B #include <esps/esps.h>.br.B #include <esps/sd.h>.SH DESCRIPTIONA sampled data file is a header followed by a stream of data values. The type of the data values that follow the header is indicated in the header. See \fIESPS\fR(5\-ESPS)..PPThe header has the following layout as defined by .I <esps/header.h>.The data items common to all ESPS data files are described in\fIESPS\fR(5\-ESPS). The type specific header structure for a sampled data file is shown below..br.nf.sp/* Sampled Data File specific header */.spstruct sd_header {.TSl1 l1 l1 l. short equip; /\(** A/D equipment \(**/ float max_value; /\(** max value of data \(**/ float sf; /\(** sample frequency \(**/ float src_sf; /\(** source file sf \(**/ short synt_method; /\(** synthesis method \(**/ float scale; /\(** scale factor \(**/ float dcrem; /\(** DC term removed \(**/ short q_method; /\(** quant method \(**/ short v_excit_method; /\(** voiced excitation \(**/ short uv_excit_method; /\(** unvoiced excitation \(**/ short spare1; /\(** spare \(**/ short nchan; /\(** number of channels for multiplexed data \(**/ short synt_interp; /\(** reflection coefficient interpolation \(**/ short synt_pwr; /\(** power source for synthesis \(**/ short synt_rc; /\(** reflection coefficient computation \(**/ short synt_order; /\(** synthesis filter order \(**/ long start; /\(** starting point analyzed \(**/ long nan; /\(** number of points analyzed \(**/ short spares[SD_SPARES]; /\(** spares \(**/ struct zfunc *prefilter; /\(** prefilter \(**/ struct zfunc *de_emp; /\(** deemphasis filter \(**/};.TE.fi.PPThe following items are all in the sampled data file specificheader structure..IP equipEquipment used to capture analog data. If NONE, it means that thedata did not originate from an A/D.Legal values for are defined in \fI<esps/header.h>\fR..IP max_valueIf the data is from an A/D \fImax_value\fR is the maximum value thatcan be represented by the A/D used (this is a function of thebit resolution of the converter and perhaps its operating mode). If this SD file was produced by a synthesis program and\fImax_value\fR is non-zero, then no sample in thefile will exceed the value of \fImax_value\fR. If \fImax_value\fR iszero, then no information is available about the maximum value in the file..IP sfSampling frequency of this sampled data file..IP src_sfSampling frequency of the reference file (\fIvariable.refer\fR). If zero, it means that there is no reference file. .IP synt_methodIndicates which method of synthesis was used in generating the file.If neither this SD file or any of its source files were produced by asynthesis program, \fIsynt_method\fR has a value of NONE.Other legal values are defined in \fI<esps/header.h>\fR..IP scaleA nonzero value here is a scale factor used by the program thatcreated this sampled data file. A zero means no scale factor wasused; therefore zero here is equivalent to one and it is not possibleto have a zero scale factor..IP dcremIf nonzero, the DC term in the original source data was removed beforeanalysis, and that DC value is stored here..IP q_methodThe type of scaler quantization. A value of NONE indicates no quantization.Legal values are defined in \fI<esps/header.h>\fR..IP v_excit_methodIf the SD file or any of its source files were produced by a synthesisprogram, \fIv_excit_method\fR indicates what excitation method was usedfor voiced speech.Legal values are defined in \fI<esps/header.h>\fR..IP uv_excit_methodIf the SD file or any of its source files were produced by a synthesisprogram, \fIuv_excit_method\fR indicates what excitation method wasused for unvoiced speech.Legal values for are defined in \fI<esps/header.h>\fR..IP nchanNumber of A/D channels (for multiplexed files). Zero or one indicatesthat all sample points are from the same A/D. A value other thanzero or one indicates that a sampled data file consists of \fInchan\fRchannels. In such a file the data points cycle sequentially among the A/Dchannels..IP synt_interpIf the SD file or any of its source files were produced by a synthesisprogram, \fIsynt_interp\fR indicates what method was used for interpolationreflection coefficients. Legal values are defined in\fI<esps/header.h>\fR..IP synt_pwrIf the SD file or any of its source files were produced by a synthesisprogram, \fIsynt_pwr\fR indicates the method that was used forchoosing excitation power. Legal values are defined in\fI<esps/header.h>\fR..IP synt_rcIf the SD file or any of its source files were produced by a synthesisprogram \fIsynt_rc\fR indicates the method that was used for selectingthe reflection coefficients. Legal values are defined in\fI<esps/header.h>\fR..IP synt_orderIf the order of the synthesis filter was different from that of theanalysis filter, \fIsynt_order\fR is the synthesis order. If thesynthesis order is the same as the analysis order, or if the SD fileis not a synthetic file, the value of synt_order is zero..IP "start, nan"Starting point and intended number of points analyzed.Values are set to zero if they are not meaningful.If the file is tagged (see description of \fIcommon.tag\fR in ESPS(5\-ESPS)),\fIstart\fR and \fInan\fR refer to the file named by \fIvariable.refer\fR.Otherwise, they refer to a relevant source file (\fIvariable.refer\fR is alsolikely to be a source file).If the file has many source files \- as is the case for \fIcopysd\fR(1\-ESPS)\- then \fIstart\fR and \fInan\fR usually referto all the source files.Often, \fIstart\fR and \fInan\fR will be determined by a command-line rangeoption or by values in the ESPS Parameter or Common file.In cases where an entire file is to be analyzed and the file is processed bymeans of standard input, \fInan\fR will be set to LONG_MAX (2147483648 on68000 class machines);if a disk file is used, then \fInan\fR can be set to the actual number ofpoints in the file since \fIcommon.ndrec\fR is filled in by\fIread_header\fR(3\-ESPS) \- see ESPS(5\-ESPS)..sp .5Note that \fInan\fR is the.I "intended"number of points analyzed.Whether or not standard input is used, \fInan\fR will not reflect the actualnumber of points analyzed if an input file is exhausted before the intendedrange is covered.This is because the header is written before the data.To require \fInan\fR always to be the actual number of points analyzedwould require that programs use a temporary file and therefore that theywrite the data twice.If it is crucial to record in \fInan\fR the actual number of pointsprocessed, this can be accomplished by using such a temporary file..IP prefilterPointer to a prefilter function.The function is described by the \fIstruct zfunc\fR in\fI<esps/header.h>\fR. Itconsists of the numerator size, followed by the denominator size,followed by the zero polynomial, followed by the pole polynomial..IP de_empPointer to a deemphasis filter function..PPThe data structure is simply a series of sample data.There are \fIcommon.ndrec\fR of these one item records.The type of the data is indicated by the header items \fIcommon.ndouble,common.nfloat, common.nlong, common.nshort, or common.nchar\fR(see \fIESPS\fR(5\-ESPS)). Since a sampled data filehas one item records, one of these type fields in the headershould have a value of one, and all the others should have a value ofzero. There is a library function provided to set these type fields,see \fIset_sd_type\fR(3\-ESPS)..SH FILES/usr/include/esps/header.h.SH SEE ALSOESPS(5\-ESPS), read_header(3\-ESPSu),write_header(3\-ESPSu), set_sd_type(3\-ESPSu)..SH FUTURE CHANGES.SH AUTHOROriginal design by Joe Buck. This version by Alan Parker.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -