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

📄 ,fea2kb_rec.3

📁 speech signal process tools
💻 3
字号:
.\" Copyright (c) 1987 Entropic Speech, Inc.; All rights reserved.\" %W%	%G% ESI.TH FEA2KB_REC 3\-ESPS %G%.ds ]W "\fI\s+4\ze\h'0.05'e\s-4\v'-0.4m'\fP\(*p\v'0.4m'\ Entropic Speech, Inc..ds ]Y "\fBESI INTERNAL\fP.SH NAME.nfallo_fea2kb_rec \- allocate memory for an ESPS FEA_2KB file record.get_fea2kb_rec \- get the next data record from an ESPS FEA_2KB file.init_fea2kb_hd \- initialize a FEA file header for subtype FEA_2KB.put_fea2kb_rec \- write the next data record of an ESPS FEA_2KB file..SH SYNOPSIS.ft B.nf#include <esps/esps.h>#include <esps/fea.h>#include <esps/anafea.h>#include <esps/fea2kb.h>#include <esps/feaqhist.h>struct fea2kb *allo_fea2kb_rec( hd )struct header *hd;intget_fea2kb_rec( data, hd, file )struct fea2kb *data;struct header *hd;FILE *file;intinit_fea2kb_hd( hd, avg_pitch, avg_power, lsf_quant, pitch_quant, power_quant,    pre, preemp_uv, u_avg, v_avg )struct header *hd;char *avg_pitch;char *avg_power;char *lsf_quant;char *pitch_quant;char *power_quant;struct zfunc *pre;char *preemp_uv;short *u_avg;short *v_avg;voidput_fea2kb_rec( data, hd, file )struct fea2kb *data;struct header *hd;FILE *file;.fi.ft.SH DESCRIPTION\fIAllo_fea2kb_rec\fR allocates memory for a FEA_2KB file record andreturns a pointer to it. The memory allocations assume that the header was initialized by a call to \fIinit_fea2kb_hd\fR. Becausethe size of the allocated record depends on values in the data file header,it is important to ensure that a FEA_2KB record is consistent with theheader of the file it is being used with [see \fIinit_fea2kb_hd\fR].Internally, \fIallo_fea2kb_rec\fR calls \fIallo_fea_rec\fR (3\-ESPS), andthen hooks the FEA record up to a \fIfea2kb\fR structure..PP\fIGet_fea2kb_rec\fR reads the next FEA_2KB record from stream \fIfile\fRinto the data structure pointed to by \fIdata\fR, which must have beenallocated by means of a call to \fIallo_fea2kb_rec\fR. The parameter \fIhd\fR points to the ESPS header in which the various FEA_2KB fields have beendefined. When the header was originally created, it must have been initializedby means of \fIinit_fea2kb_hd\fR. An EOF is returned upon end of file.A positive, non-zero value is returned otherwise..PP\fIInit_fea2kb_hd\fR accepts a pointer \fIhd\fR to an ESPS FEA file header. Itsets \fIhd.hd.fea\->fea_type\fR to FEA_2KB and initializes the record-fielddefinitions to describe the fields that make up a file of subtype FEA_2KB. Itdoes this by means of calls to \fIadd_fea_fld\fR (3\-ESPS). For a descriptionof the various FEA_2KB record fields, see \fIfea_2kb\fR (5\-ESPS).\fIInit_fea2kb_hd\fR also defines the generic header items described in\fIfea_2kb\fR (5\-ESPS). For those generic header items which correspond tothe parameters in the call to \fIinit_fea2kb_hd\fR, values are assigned by\fIinit_fea2kb_hd\fR itself [see \fIfea_2kb\fR (5\-ESPS) for a description ofthese parameters]. For the remaining generic header items, valuesmust be assigned by the calling program. \fIInit_fea2kb_hd\fR returns 1 ifany of the internal calls to \fIadd_fea_fld\fR(3\-ESPS) returns an error code; otherwise, it returns 0. \fIInit_fea2kb_hd\fRshould be called only when creating a new FEA_2KB file, after the call to\fInew_header\fR (3\-ESPS)..PP\fIPut_fea2kb_rec\fR writes a FEA_2KB data record pointed to by \fIdata\fRonto the stream \fIfile\fR, which should be an open ESPS FEA_2KB file. Theheader must be written out to the FEA_2KB file before calling this function.   When the header was originally created, it must have been initialized by meansof \fIinit_fea2kb_hd\fR..SH EXAMPLES.if n .ta 33.if t .ta 3i.nf\fB\s-1Reading an existing file:\s+1\fRFILE *ifp;struct fea2kb *fea2kb_rec;struct header *ih;ih = read_header( ifp );fea2kb_rec = allo_fea2kb_rec( ih );if ( get_fea2kb_rec( fea2kb_rec, ih, ifp ) == EOF ) . . .word = *fea2kb_rec\->bitstream;\fB\s-1Creating a new file:\s+1\fRFILE *ofp;struct fea2kb *fea2kb_rec;struct header *oh;oh = new_header( FT_FEA );if ( init_fea2kb_hd( oh, avg_pitch, avg_power, lsf_quant, pitch_quant, power_quant,    pre, preemp_uv, u_avg, v_avg ) )        ERROR_EXIT( "error filling FEA_2KB header" ); . . .write_header( oh, ofp );fea2kb_rec = allo_fea2kb_rec( oh );  . . .*fea2kb_rec\->bitstream = word;put_fea2kb_rec( fea2kb_rec, oh, ofp );.fi.SH DIAGNOSTICSIf \fIhd\fR does not point to a FEA header of subtype FEA_2KB, theprogram terminates with an assertion failure. In \fIget_fea2kb_rec\fR,if an incomplete record is read, a message is written to \fIstderr\fR.In \fIput_fea2kb_rec\fR, if an I/O error occurs during the write,a message is written to \fIstderr\fR and the program exits with status 1.  .SH BUGSNone known..SH SEE ALSOallo_fea_rec (3\-ESPS), fea_2kb (5\-ESPS)..SH AUTHORPrograms and manual page by Jim Elliott.

⌨️ 快捷键说明

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