Return to DDVPC HomePage
Return to CELP Coder Page
![]()
CELP Verion 3.3 C code
Beware, the speech generated by version 3.3 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.3 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.
The first option you have is whether to use the durbin routine in the linear predictive analysis to convert from autocorrelation coefficients to predictor coefficients. If you wish to use the durbin routine you need to compile the code with the DURBIN compile time option.
Secondly you must determine how you wish to perform the postfiltering of the synthesized speech. Postfiltering with sample-wise automatic gain control is the correct method, but block-wise automatic gain control is a faster method (and cannot be distinguished from sample-wise). The POSTFIL2 compile time option implements block wise AGC.
The third option is to determine how you want to code the LSFs. Version 3.2 of the CELP coder checks for monotonicity
based on a distance of 0 Hz between adjacent quantized LSFs, i.e. if lsf[i] <= lsf[i-1] then the quantized LSFs are adjusted. Recent research has shown that higher quality output speech is produced when adjacent quantized LSFs are at least 40 Hz apart. In order to use this criteria, you should compile the code using the NEW_LSF_CODE compile time option.
As a fourth option, you should decide whether you wish to use the output high pass filter or not. If this filter is not desired, use the STREAMLINE compile time option, otherwise, the output speech will be high pass filtered at 100 Hz.
As a fifth option, you can add additional processing to alter the linear predictive impulse response if the adaptive codebook delay is less than the subframe length. This option improves the quality of higher pitch talkers. In order to use this option, you should compile the code using the NEW_ACB compile time option.
In addition to the compiler options, you may find that the non-ANSI functions called in cli.c will cause some problems. Specifically, the getcwd() routine, whose function is not provided in ANSI libraries, is not compiled unless the "sun" variable is defined at the top of the file. This command returns the pathname of the default directory and is not required for operation.
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 [InputFileName] [OutputFileName] [-abcdemnprstw] or
celp [-p ParameterFileName] or
celp -h
ARGUMENTS:
InputFileName
Input file short data format (16-bit signed samples).
OutputFileName
Speech output file short data format (16-bit signed samples).
-p 'parameter file name'
Name of parameter file to read for option values. The parameter file
contains all of the options that you would ordinarily type in to the command
line. In addition, comments may be added by inserting a "#" at the
beginning of the line containing the comment. (default=CelpParms.par)
-h
Prints a list of all the CELP options.
-a T/F (T => TRUE, F => FALSE)
Perform or not perform analysis of an input speech file. If analysis
is not performed, a channel file must be read instead using the -c and -r
options. If analysis is not performed, then an input speech file should not be
specified. (default=TRUE)
-b 'bit error file name'
Name of bit error file to read. This option is provided so that the
user has the option to experiment with different error environments. Additional
code is required to use this option. (default=BitErrors.txt)
-c 'channel file name'
Input/Output channel file in hexadecimal or binary format. Channel
files generated from previous analysis runs are used as inputs to a "synthesis
only" run if the -r and -a options are used. During this mode, an input
speech file should not be declared. Channel files can be created using the -w
option. (default=ChanFile.hex)
-d 'edac params file name'
Name of error parameters file to read (edac will be performed). This
option requires additional code and is provided for experimentation with error
detection and correction schemes other than the FS1016 Hamming code.
-e error rate
Error rate is any number between 0 and 1. This option is used in
conjunction with the -t option to determine what type of errors are to be
simulated on the channel. (default=0.0)
-m T/F (T => TRUE, F => FALSE)
Perform or not perform smoothing of codebook parameters. If codebook
parameters are not smoothed in an error environment, the synthesized speech will
be corrupted. (default=TRUE)
-n T/F (T => TRUE, F => FALSE)
Perform or not perform parameter encoding. If parameter encoding is
not performed, then the "unquantized" (since CELP uses and
analysis-by-synthesis method, nearly all of the values are quantized during the
analysis process) values are passed directly to the synthesizer. The -w option
cannot be used if -n is used. (default=TRUE)
-r F/H/B (F => FALSE, H => hexadecimal, B => binary)
Read or not read channel file into synthesis in Hex or Binary format.
This option must be used when analysis is not being performed and cannot be
used is analysis is being performed. If this option is used, then no input
speech file should be specified. (default=FALSE)
-s T/F (T => TRUE, F => FALSE)
Perform or not perform synthesis. If synthesis is not performed,
then a channel file should be written using the -w option. If synthesis is not
performed, then an output speech file should not be specified. (default=TRUE)
-t C/B/L/O (C => clear, B => random bit, L => random
block, O => other)
Sets the type of channel that the bitstream will pass through. If
the "O" option is used, a bit error file name must be specified, and
code must be added to take advantage of the option. The "L" option
does not produce truly random block errors since the block size equals the frame
size. (default=C)
-w F/H/B (F => FALSE, H => hexadecimal, B => binary)
Write or not write channel file from analysis in Hex or Binary
format. This option is used in conjunction with the -c option. (default=FALSE)
EXAMPLES:
celp
This will provide you with usage information: Usage: celp
[InputFileName] [OutputFileName] [options]
celp -p [ParameterFileName]
celp -h for option information
celp -p celp.par
celp processes according to the information found in the celp.par
parameter file.
celp speech/dam27 dam27.48.spd -w h -c dam27_48.chan
celp
processes speech/dam27.spd into the output file dam27.48.spd, and writes the bit
stream file dam27_48.chan in hexadecimal format.
celp 512_dam27b -a f -r -c speech/512_dam27.chan
celp
synthesizes the speech/512_dam27.chan channel file into the output file
512_dam27b.spd.
SEE ALSO
cli.c
OTHER
-----
"celp_prof.txt" contains information concerning the execution times for the subroutines in CELP 3.3. This data may be useful in implementing CELP into communication devices.
This website is sponsored by ARCON Corporation for the DDVPC and as such must conform to DoD policies concerning websites. Please read this disclaimer for more information.
Comments concerning design and content of these pages should be sent to info@arcon.com. This page was last updated on 08-Nov-2001.