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

📄 readme.mot

📁 Reference Implementation of G.711 standard and other voice codecs
💻 MOT
字号:
14/4/93 - IS54 US Cellular CoderThis package is not very user friendly, but it works. To compileedit the Makefile to change the compilations flags. If you are not using SPPACK headers, remove the SPPACK flag fromthe compile line.Change the hardwired pathnames ( /usr/kroon ..) in init.c to thedirectory that will contain these files.It runs successfully on SGI R4000 and Sparc stations, and it hasbeen claimed that it will run on a PC with Turbo C.For questions contact Peter Kroon kroon@research.att.com  MH x7000/**************************************************************************                (C) Copyright 1990, Motorola Inc., U.S.A.Note:  Reproduction and use for the development of North American digital       cellular standards or development of digital speech coding       standards within the International Telecommunications Union -       Telecommunications Standardization Sector is authorized by Motorola        Inc. No other use is intended or authorized.       The availability of this material does not provide any license       by implication, estoppel, or otherwise under any patent rights       of Motorola Inc. or others covering any use of the contents       herein.       Any copies or derivative works must incude this and all other       proprietary notices.Systems Research LaboratoriesChicago Corporate Research and Development CenterMotorola Inc.**************************************************************************/1.  General DescriptionThe NADC reference coder is a C language program which implements thechosen standard NADC speech coding algorithm.  This document is a descriptionof the program.1.1  FilesThe NADC reference coder comprises several C language source files.  The"main" function exists in the file "vselp.c".  All of the other .c filescontain functions which are called at least indirectly from vselp.c.The file "vparams.h" contains macro definitions and external variabledeclarations which are needed by nearly every source file, so it is includedin nearly every source file.The files with the ".i" extension contain C code that is expanded in linewith the "include" preprocessor directive.1.2  General Flow and StructureWhen the coder is run, it first prompts for running conditions (or reads themfrom a file).  It then initializes parameters and tables.  These steps areaccomplished through calls to the functions getParams(), calcParams(), andinitTables().The analysis then begins.  One frame of the input speech is high-pass filtered,then the Fixed Point Lattice Technique is applied to find the reflectioncoefficients.  These reflection coefficients are then converted to direct-formcoefficients.  To obtain coefficients for each subframe, the direct-formcoefficients for the current frame and the last frame are linearlyinterpolated.  These steps are accomplished with calls to the functionsFLATV(), RCTOA(), and INTERPOLATE().The analysis is completed by determining the excitation for each subframe.This is done in the function T_SUB().  The input speech is first sent throughthe W(z) spectral weighting filter.  The codebook searches are then performed;the adaptive codebook search (lag search) being done first.  The gains appliedto the excitation vectors from the codebooks are then determined, and someprocessing is done to set up needed states for the next subframe.  These stepsare accomplished with calls to the functions LAG_SEARCH(), DECORR(), V_SRCH(),and G_QUANT().  Filtering is done with the functions DIR(), I_DIR() andZI_DIR().  Functions for constructing vectors are P_EX(), B_CON(), V_CON(),and EXCITE().The coded speech is written to an internal buffer, but may also be writtenout to a file.  The coded speech output may be written in two formats, onewhich is readable by the decoder portion of the program, and one which ishuman-readable.The synthesis is performed on either the internal codes, or on codes from afile written out by the analysis section.  The first step in the analysis isto convert the reflection coefficients to direct-form.  The second stepdetermines the two other sets of coefficients that are needed in the synthesis:they are the numerator and denominator coefficients of the adaptive spectralpostfilter.  In the third step the coefficient sets are interpolated toobtain the coefficients to be used in each subframe.  These steps areaccomplished by the functions ASST() and INTERPOLATE().The excitation vector for the synthesis is built in the function R_SUB().The speech is the synthesized through the synthesis filter, and then sentthrough the adaptive spectral post-filter.  Functions used are P_EX(), B_CON(),V_CON() and EXCITE() to generate the excitation; and DIR() and I_DIR() toperform the filtering.The synthesized speech is then converted to 16-bit integer representationand put out to a file.2.  How to Compile the CoderThis code is maintained with "make", which is a program formaintaining programs.  If your system runs UNIX, information isavailable in the "make" manual page.  If you are not planning to runthis on a UNIX machine, you will have to either use some softwaremanagement tool other than "make", or maintain the code yourself.Even if you don't use "make" to manage this code, it would be a goodidea to understand the file that "make" uses to maintain the code,called "makefile".  All of the source file dependencies are documentedin "makefile".  Notice, also, that the "makefile" defines "FTYPE" as"float" globally.  If you do not use make, you will have to include asimilar definition in your management tool.If you are on a UNIX machine, first make a subdirectory in thedirectory where you have the source code, and call the newsubdirectory "obj".  Then type "make uvselp".  The "make" program willcompile and link all the necessary object files and produce anexecutable file called "uvselp".If you have problems compiling, first check the makefile to insurethat the compilation statements in it make sense for your C compiler.The code is ANSI C compatible, and has been ported to as many othercompilers as we could get our hands on.3.  How to Run the CoderAfter compiling, the coder program may be run by typing "uvselp".  Thefirst prompt asks whether to run both the encoder and decoder or thedecoder only.  If you want to process speech and put out a codedspeech file, choose the encoder/decoder option.  If you want tosynthesize speech from a coded speech file which already exists,choose the decoder only option.  The format for the coded speech fileis documented below.After the initial prompt, you will be prompted for more information(see next section).Finally, you will be prompted for the names of input speech (or codedspeech) files, and output speech files.  The coder expects speech datain binary (Motorola, not Intel) format, with 16-bit samples.To make running the coder less tedious, you may specify an optionsfile when the coder is run.  The program will then read from this filerather than prompting the user.To use a ".prm" file, run the executable by typing "uvselp filename.prm",substituting your ".prm" filename.The following .prm files are provided   uvselp.prm  - runs encoded/decoder and produces a bstream file   synpf.prm   - runs decoder and produces a postfiltered output   synnpf.prm  - runs decoder and produces an unpostfiltered output  All these scripts use fixed filenames   INPUT - sampled input data   OUTPUT - nonpostfiltered output   OUTPUTPF - postfiltered output   BSTREAM - bstream file   LOG   - diagnostics file3.1  Coder options3.1.1  Put out codes in readable file (Encoder/decoder option only)This option is useful for visual inspection of the coded parameters.The format for one frame is:frameNumber R0 k1 k2 k3 k4 k5 k6 k7 k8 k9 k10lag code1 code2 gsp0 (of subframe 1)lag code1 code2 gsp0 (of subframe 2)lag code1 code2 gsp0 (of subframe 3)lag code1 code2 gsp0 (of subframe 4)3.1.2  Put out packed ASCII hex coded stream (Encoder/decoder option only)This option puts out the coded parameters in a packed ASCII-hexformat, one frame per line.  All of the coded parameters for one frameare packed into a single bit-stream according to their respective bitallocations:Bits:			Parameter:	1-6 (6)				k1	7-11 (5)			k2	12-16 (5)			k3	17-20 (4)			k4	21-24 (4)			k5	25-27 (3)			k6	28-30 (3)			k7	31-33 (3)			k8	34-36 (3)			k9	37-38 (2)			k10	39-43 (5)			R0	44-50 (7)			lag, subframe 1	51-58 (8)			gsp0, s.f. 1	59-65 (7)			vselp code1, s.f. 1	66-72 (7)			vselp code2, s.f. 1	73-79 (7)			lag, s.f. 2	80-87 (8)			gsp0, s.f. 2	88-94 (7)			vselp code1, s.f. 2	95-101 (7)			vselp code2, s.f. 2	102-108 (7)			lag, s.f. 3	109-116 (8)			gsp0, s.f. 3	117-123 (7)			vselp code1, s.f. 3	124-130 (7)			vselp code2, s.f. 3	131-137 (7)			lag, s.f. 4	138-145 (8)			gsp0, s.f. 4	146-152 (7)			vselp code1, s.f. 4	153-159 (7)			vselp code2, s.f. 4	The bits for each coded parameter are ordered MSB first to LSB last.This bit-stream is then sectioned into four bit hexadecimalrepresentation, and written out in ascii.  The final hexadecimal digitis padded with a zero.3.1.3  Calculate performance measures (Encoder/decoder option only)This options calculates and displays performance information such asSNR and weighted SNR.3.1.4  Apply post-filter to synthesisThis option allows you to include, or not to include, spectralpost-filtering.3.2  Floating point precisionAs mentioned above, the floating point type may be defined as "float"globally.  If more precision is required, this argument may be changedto "double".4.  Included speech filesTwo speech files have been included: feml1.sp and male1.sp.  Alsoincluded are the coded versions of these files: feml1.sc and male1.sc.These coded speech files are in the format mention above.  Decoded(re-synthesized) speech files are feml1.op, male1.op; and feml1.on,male1.on.  The first two were reconstructed using the spectral post-filter; the last two were reconstructed without post-filtering.Note that due to differences in compilers and machine architecture thereis no guarantee that your output matches the output files provided. However,there should be no perceptual differences.5. ModificationsThe source files were obtained from the IS85 document. The followingmodifications were made:  1)  The option for number of frames to process has been disabled (vselp.c)  2)  getp.c has been modified to read also the filenames from the *.prm file

⌨️ 快捷键说明

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