4.8k_CELP

所属分类:语音合成
开发工具:Visual C++
文件大小:107KB
下载次数:26
上传日期:2013-08-22 15:45:17
上 传 者pudnlcd
说明:  语音CELP压缩解压源代码(C语音)
(* 4800 bps CELP Characteristics * * Spectrum Pitch Code Book * ------------- --------------- ----------------- * Update 30 ms 30/4 = 7.5 ms 30/4 = 7.5 ms * ll=240 lp=60 l=60 * * Order 10 256 (max) x 60 512 (max) x 60 * 1 gain 1 gain * * Analysis Open loop Closed loop Closed loop * Correlation Modified MSPE MSPE VQ * 30 ms Hamming VQ, weight=0.8 weight=0.8 * no preemphasis range 20 to 147 shift by 2 * 15 Hz BW exp (w/ fractions) 77 sparsity * * Bits per 34 indep LSP index: 8+6+8+6 index: 9*4 * Frame [3444433333] gain(-1,2): 5*4 gain(+/-): 5*4 * * Bit Rate 1133.3 bps 1600 bps 1866.67 bps * * NOTE: The remaining 200 bps are used as follows: 1 bit per frame * for synchronizatio)

文件列表:
4.8k_celp (0, 2004-07-16)
4.8k_celp\actorc.c (3004, 1993-07-27)
4.8k_celp\autodbn.c (3398, 1993-07-27)
4.8k_celp\autohf.c (3398, 1993-07-27)
4.8k_celp\autohfr.c (4098, 1993-07-27)
4.8k_celp\biterror.c (1970, 1993-07-27)
4.8k_celp\bitperm.h (819, 1993-07-27)
4.8k_celp\bitprot.h (53, 1993-07-27)
4.8k_celp\bwexp.c (1763, 1993-07-27)
4.8k_celp\cbsearch.c (5981, 1993-07-27)
4.8k_celp\ccsub.h (1060, 1993-07-27)
4.8k_celp\celp.c (31482, 1993-08-03)
4.8k_celp\cgain.c (9749, 1993-08-02)
4.8k_celp\cli.c (26317, 1993-08-02)
4.8k_celp\clip.c (1096, 1993-07-27)
4.8k_celp\codebook.h (5515, 1993-07-27)
4.8k_celp\confg.c (1814, 1993-07-27)
4.8k_celp\cor.c (1663, 1993-07-27)
4.8k_celp\csub.c (3230, 1993-07-27)
4.8k_celp\dcodcbg.c (1720, 1993-07-27)
4.8k_celp\dcodcbi.c (1629, 1993-07-27)
4.8k_celp\dcodpg.c (1686, 1993-07-27)
4.8k_celp\dcodtau.c (2737, 1993-07-27)
4.8k_celp\delay.c (5404, 1993-07-27)
4.8k_celp\delaynr.c (8567, 1993-07-27)
4.8k_celp\dist.c (3284, 1993-07-27)
4.8k_celp\disto.c (2853, 1993-07-27)
4.8k_celp\durbin.c (2309, 1993-07-27)
4.8k_celp\find.c (3079, 1993-07-27)
4.8k_celp\gaincode.c (5434, 1993-07-27)
4.8k_celp\ham.c (975, 1993-07-27)
4.8k_celp\hamming.c (8664, 1993-07-27)
4.8k_celp\hexline.c (2640, 1993-07-27)
4.8k_celp\impulse.c (1398, 1993-07-27)
4.8k_celp\intanaly.c (3668, 1993-07-27)
4.8k_celp\intsynth.c (4061, 1993-07-27)
4.8k_celp\iodisk.c (2733, 1993-07-27)
4.8k_celp\ldelay.c (3566, 1993-07-27)
4.8k_celp\ldelnr.c (6575, 1993-07-27)
4.8k_celp\lsp34.c (5154, 1993-07-27)
... ...

Note******* For this PC release, no provision has been made, other than changing file names to fit within DOS filename constraints, to run on a DOS system. This code was written to run on a Sun Workstation, and can be easily made to run on any UNIX based system. A small amount of work is needed to make the code runable on a PC system. CELP Version 3.2 C code Beware, the speech generated by version 3.2 C code and 3.2 FORTRAN code does not match exactly. However, this slight mismatch appears to be within the arithmetic precision difference expected between compiled FORTRAN and C. INSTALLATION, EDITING FILES, COMPILATION and LINKING ---------------------------------------------------- This directory contains CELP Version 3.2 written in C. All of the code necessary to make CELP is in this directory. There are a couple of things that need to be done before compiling the code. First, you need to decide whether you wish to run the old version of calculating lsps and quantizing them or do you want to run a quicker version that calculates the lsps and quantizes them in the same routine (Lionel Wolovitz's code). If you want to run the old version then all the code is in place. If you wish to use the quicker version (there is a slight degradation in the speech quality with this version) then you need to: %cp celp_pctolsp3.c celp.c %cp specdist_pctolsp3.c specdist.c. ***Note for this release only one version of celp has been included. The other versions referred to here can be created with the code enclosed and changing a few calls with respect to pc to lsp conversion..... Note: The degradation incurred by using pctolsp3.c is due to a more coarse search (for zero crossings) than is used by pctolsp2.c. Simply searching a grid formed by the quantized values is not sufficient for maintaining an accurate representation of spectral information. The minimal search we suggest is a grid of quantized values and two interpolated values between each quantized value in order not to miss any zero crossings in the method of searching employed by pctolsp3.c. The second thing you need to do is find out whether your C library contains the nint function for rounding floating point numbers to integers. If your C library does contain nint then you need to do nothing. If your C library does not have a nint function then a round function is provided with the C code. All that has to be done to implement the round function is to substitute round for nint in the following files: FILE NUMBER OF OCCURENCES -------------------------------------- celp.c 2 cgain.c 7 cli.c 3 smoothcbgain.c 1 smoothtau.c 1 The third option you have is whether to use the durbin routine in the autohf.c file. If you wish not to use the durbin routine you need to make sure the call to autohf in celp.c is correct. The file celp_pctolsp2.c has the correct code for not using the durbin routine. You will also need to: %cp autohf_reg.c autohf.c The fourth option is whether to use recursive/non-recursive delay routines. If you choose to use the non-recursive routines you must fix the calls/references in the following files: pitchvq.c psearch.c makefile If you plan on using the makefile provided then you will have to replace the pathname for the disk_io routine on the SGIO_LIB option and set whatever CFLAGS are necessary. A couple of compilations can be omitted depending on what round routine you are using and which pctolsp routine you choose. If you are using nint then all references to round in the makefile may be deleted. If you are using the old version of pctolsp then all references to pctolsp3 can be deleted from makefile. If you choose to use the newer version then you can delete the references to pctolsp2 from the makefile (do not delete lsp34 - you need this). At this point you can make celp. %make celp EXECUTION --------- CELP COMMAND NAME: celp - execute the CELP coder The celp command generates a code-excited-linear-prediction processed output file from an input file. SYNOPSIS: celp [-i ifile] [-o ofile] [-p pfile] [-q qfile] [-m mfile] [-l lfile] or celp [-c chan] [-o ofile] ARGUMENTS: -i Input file short data format (16-bit signed samples). For defaults, see celp.c data statements. -o Speech output file (.spd) short data format (16-bit signed samples) and bit stream channel file (.chan). For defaults, see celp.c data statements. -p Parameter file specifying celp characteristics. For defaults, see celp.c data statements. Parameters are stored in a ascii text file in the order below with one number per line i.e.,: 512 [ncsize = Code book size] 60 [l = Code word length] 240 [ll = LPC analysis frame size] 10 [no = LPC filter order] 60 [lp = Pitch analysis frame size] 1 [np = Pitch order] 0.8 [gamma = Noise weighting factor] 1.0 [scale = Input speech scaling factor] 1.0 [descale = Output speech scaling factor] 0.0 [ber = % bit error rate] 1 [mxsw = modified excitation logical switch] 0.0 [prewt = prefilter logical switch] hier [pstype = type of fractional pitch search] -q Quantization characteristics file. For defaults, see celp.c data statements. The file has 3 sections: cbgain, pitch, and spectrum. Each section type is followed by a quantization type, which can be one of the following: "max", "uniform", "vq", "log", "opt", or "none". If the quantization type is not "none", then the next line is the bit allocation; i.e.: cbgain none [unquantized cbgain] pitch max [Max quantization] 8 6 5 [8 bit delay, 6 bit delta delay, 5 bit gain] spectrum kang [Kang's quantization] 3 4 4 4 4 3 3 3 3 3 [lsp1=3,...,lsp10=3] -m Mask file specifying bit protection when introducing bit errors to the unpermuted bit stream. (Note, this protection is separate from the Hamming FEC.) Each line of the mfile corresponds to a bit (i.e., 144 lines) where each line is a 1 (protected) or 0 (not protected). See description in biterror.c. -l Log file output containing run time information. Defaults to appending to a file called "celp.log". If the file name "none" is specified, no log file is generated. -c Input channel file (.chan) hexadecimal format. Channel files generated from previous analysis runs are used as imputs to a "synthesis only" run. During this mode, the -i switch is invalid. EXAMPLES: celp This causes celp to process ifile.spd into ofile.spd (and a nonpostfiltered output in ofilenpf.spd) using the defaults specified by the FORTRAN data statements in celp.c, writes the bit stream file ofile.chan and generates a log appended to the file "celp.log". (If SUNGRAPH is enabled, a set of files, with .sg_data extension, as defined in sungraph_open.com is generated.) celp -i speech/dam27 -o dam27.48 -p celp48.p -q celp48.q -l log celp processes speech/dam27.spd into the normal, highpassed and nonpostfiltered output, dam27.48.spd, dam27_48hpf.spd and dam27_48npf.spd, respectively, writes the bit stream file dam27_48.chan and appends log information to a file called log. The celp parameters specified by celp48.p and quantization characteristics of celp48.q are used. (If SUNGRAPH is enabled, a set of files, with .sg_data extension, as defined in sungraph_open.com is generated.) celp -c speech/512_dam27.chan -o 512_dam27b celp synthesizes speech/512_dam27.chan channel file into the normal, highpassed and nonpostfiltered output, 512_dam27b.spd, 512_dam27bhpf.spd and 512_dam27bnpf.spd, respectively. SEE ALSO cli.c EXECUTION OF SEPARATE SYNTHESIZER --------------------------------- In order to run the synthesizer only compile celp without the -DANALY option in the makefile. (Separate analysis is not provided since the combined analyzer and synthesizer generates a bit stream channel file.) The celp command syntax for synthesis only is: celp [-c chan] [-o ofile] where: chan is input.chan ascii hex bit stream channel file ofile is ofile.spd speech file (postfiltered) SEE ALSO makefile

近期下载者

相关文件


收藏者