[xiph-cvs] cvs commit: speex/src speexdec.1 speexenc.1

Jean-Marc Valin jm at xiph.org
Fri Jan 10 17:24:46 PST 2003



jm          03/01/10 20:24:46

  Modified:    doc      manual.lyx
               libspeex speex_header.h
               src      speexdec.1 speexenc.1
  Log:
  misc.

Revision  Changes    Path
1.46      +193 -17   speex/doc/manual.lyx

Index: manual.lyx
===================================================================
RCS file: /usr/local/cvsroot/speex/doc/manual.lyx,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- manual.lyx	10 Jan 2003 07:27:53 -0000	1.45
+++ manual.lyx	11 Jan 2003 01:24:46 -0000	1.46
@@ -29,7 +29,7 @@
 
 The Speex Codec Manual
 \newline 
-(draft for Speex 1.0rc1)
+(for version 1.0rc1)
 \layout Author
 
 Jean-Marc Valin
@@ -215,6 +215,10 @@
 \end_inset 
 
 
+\layout Standard
+
+This section describes the basic ideas behind CELP.
+ Note that it's still incomplete.
 \layout Subsection
 
 Linear Prediction (LPC)
@@ -3153,25 +3157,60 @@
 \layout Subsection*
 
 Sampling rate
+\begin_inset LatexCommand \index{sampling rate}
+
+\end_inset 
+
+
 \layout Standard
 
 Speex is mainly designed for 3 different sampling rates: 8 kHz, 16 kHz,
  and 32 kHz.
- These are respectively refered to as narrowband, wideband and ultra-wideband.
+ These are respectively refered to as narrowband
+\begin_inset LatexCommand \index{narrowband}
+
+\end_inset 
+
+, wideband
+\begin_inset LatexCommand \index{wideband}
+
+\end_inset 
+
+ and ultra-wideband
+\begin_inset LatexCommand \index{ultra-wideband}
+
+\end_inset 
+
+.
  
 \layout Subsection*
 
 Quality
+\begin_inset LatexCommand \index{quality}
+
+\end_inset 
+
+
 \layout Standard
 
 Speex encoding is controlled most of the time by a quality parameter that
  range from 0 to 10.
-  In constant bit-rate (CBR) operation, the quality parameter is an integer,
- while for variable bit-rate (VBR), the parameter is a float.
+ In constant bit-rate
+\begin_inset LatexCommand \index{constant bit-rate}
+
+\end_inset 
+
+ (CBR) operation, the quality parameter is an integer, while for variable
+ bit-rate (VBR), the parameter is a float.
  
 \layout Subsection*
 
-Complexity (variable)
+Complexity
+\begin_inset LatexCommand \index{complexity}
+
+\end_inset 
+
+ (variable)
 \layout Standard
 
 With Speex, it is possible to vary the complexity allowed for the encoder.
@@ -3190,10 +3229,20 @@
  than at complexity 10, but the CPU requirements for complexity 10 is about
  5 time higher than for complexity 1.
  In practice, the best trade-off is between complexity 2 and 4, though higher
- settings are often useful when encoding non-speech sounds like DTMF tones.
+ settings are often useful when encoding non-speech sounds like DTMF
+\begin_inset LatexCommand \index{DTMF}
+
+\end_inset 
+
+ tones.
 \layout Subsection*
 
-Variable Bit-Rate (VBR)
+Variable Bit-Rate
+\begin_inset LatexCommand \index{variable bit-rate}
+
+\end_inset 
+
+ (VBR)
 \layout Standard
 
 Variable bit-rate (VBR) allows a codec to change its bit-rate dynamically
@@ -3218,7 +3267,12 @@
  channel.
 \layout Subsection*
 
-Average Bit-Rate (ABR)
+Average Bit-Rate
+\begin_inset LatexCommand \index{average bit-rate}
+
+\end_inset 
+
+ (ABR)
 \layout Standard
 
 Average bit-rate solves one of the problems of VBR, as it dynamically adjusts
@@ -3228,7 +3282,12 @@
  VBR with exactly the right quality setting to meet the target average bit-rate.
 \layout Subsection*
 
-Voice Activity Detection (VAD)
+Voice Activity Detection
+\begin_inset LatexCommand \index{voice activity detection}
+
+\end_inset 
+
+ (VAD)
 \layout Standard
 
 When enabled, voice activity detection detects whether the audio being encoded
@@ -3248,7 +3307,12 @@
  (CNG).
 \layout Subsection*
 
-Discontinuous Transmission (DTX)
+Discontinuous Transmission
+\begin_inset LatexCommand \index{discontinuous transmission}
+
+\end_inset 
+
+ (DTX)
 \layout Standard
 
 Discontinuous transmission is an addition to VAD operation, that allows
@@ -3258,6 +3322,11 @@
 \layout Subsection*
 
 Perceptual enhancement
+\begin_inset LatexCommand \index{perceptual enhancement}
+
+\end_inset 
+
+
 \layout Standard
 
 Perceptual enhancement is a part of the decoder which, when turned on, tries
@@ -3273,6 +3342,30 @@
 sounds
 \emph default 
  better (subjective improvement).
+\layout Subsection*
+
+Algorithmic delay
+\begin_inset LatexCommand \index{algorithmic delay}
+
+\end_inset 
+
+
+\layout Standard
+
+Every speech codec introduces a delay in the transmission.
+ For Speex, this delay is equal to the frame size, plus some amount of 
+\begin_inset Quotes eld
+\end_inset 
+
+look-ahead
+\begin_inset Quotes erd
+\end_inset 
+
+ required to process each frame.
+ In narrowband operation (8 kHz), the delay is 30 ms, while for wideband
+ (16 kHz), the delay is 34 ms.
+ These values don't account for the CPU time it takes to encode or decode
+ the frames.
 \layout Section
 \pagebreak_top 
 Command-line encoder/decoder
@@ -3292,6 +3385,7 @@
 speexdec
 \emph default 
 ).
+ This section describes how to use these tools.
 \layout Subsection
 
 
@@ -3304,7 +3398,20 @@
 
 \layout Standard
 
-The encoder takes the following options:
+The 
+\emph on 
+speexenc
+\emph default 
+ utility is used to create Speex files from raw PCM or wave files.
+ It can be used by calling: 
+\layout LyX-Code
+
+speexenc [options] input_file output_file
+\layout Standard
+
+The value '-' for input_file or output_file corresponds respectively to
+ stdin and stdout.
+ The valid options are:
 \layout Description
 
 --narrowband\SpecialChar ~
@@ -3417,7 +3524,20 @@
 
 \layout Standard
 
-The decoder takes the following options:
+The 
+\emph on 
+speexdec
+\emph default 
+ utility is used to decode Speex files and can be used by calling: 
+\layout LyX-Code
+
+speexdec [options] speex_file [output_file]
+\layout Standard
+
+The value '-' for input_file or output_file corresponds respectively to
+ stdin and stdout.
+ Also, when no output_file is specified, the file is played to the soundcard.
+ The valid options are:
 \layout Description
 
 --enh enable post-filter (default)
@@ -3600,7 +3720,7 @@
 #include <speex.h>
 \layout Standard
 
-You then need to declare a Speex bit-packing struct
+You also need to declare a Speex bit-packing struct
 \layout LyX-Code
 
 SpeexBits bits;
@@ -3630,7 +3750,8 @@
 speex_wb_mode
 \emph default 
 .
- You can get that value in the 
+ If you need to obtain the size of the frames that will be used by the decoder,
+ you can get that value in the 
 \emph on 
 frame_size
 \emph default 
@@ -3727,7 +3848,12 @@
  the encoder or the decoder):
 \layout Description
 
-SPEEX_SET_ENH** Set perceptual enhancer to on (1) or off (0) (integer)
+SPEEX_SET_ENH** Set perceptual enhancer
+\begin_inset LatexCommand \index{perceptual enhancement}
+
+\end_inset 
+
+ to on (1) or off (0) (integer)
 \layout Description
 
 SPEEX_GET_ENH** Get perceptual enhancer status (integer)
@@ -3788,7 +3914,12 @@
 SPEEX_SET_VBR* Set variable bit-rate (VBR) to on (1) or off (0) (integer)
 \layout Description
 
-SPEEX_GET_VBR* Get variable bit-rate (VBR) status (integer)
+SPEEX_GET_VBR* Get variable bit-rate
+\begin_inset LatexCommand \index{variable bit-rate}
+
+\end_inset 
+
+ (VBR) status (integer)
 \layout Description
 
 SPEEX_SET_VBR_QUALITY* Set the encoder VBR speech quality (integer 0 to
@@ -3820,6 +3951,43 @@
 SPEEX_GET_SAMPLING_RATE Get real sampling rate (integer in Hz)
 \layout Description
 
+SPEEX_RESET_STATE Reset the encoder/decoder state to its original state
+ (zeros all memories)
+\layout Description
+
+SPEEX_SET_VAD* Set voice activity detection
+\begin_inset LatexCommand \index{voice activity detection}
+
+\end_inset 
+
+ (VAD) to on (1) or off (0) (integer)
+\layout Description
+
+SPEEX_GET_VAD* Get voice activity detection (VAD) status (integer)
+\layout Description
+
+SPEEX_SET_DTX* Set discontinuous transmission
+\begin_inset LatexCommand \index{discontinuous transmission}
+
+\end_inset 
+
+ (DTX) to on (1) or off (0) (integer)
+\layout Description
+
+SPEEX_GET_DTX* Get discontinuous transmission (DTX) status (integer)
+\layout Description
+
+SPEEX_SET_ABR* Set average bit-rate
+\begin_inset LatexCommand \index{average bit-rate}
+
+\end_inset 
+
+ (ABR) to a value n in bits per second (integer in bps)
+\layout Description
+
+SPEEX_GET_ABR* Get average bit-rate (ABR) setting (integer in bps)
+\layout Description
+
 * applies only to the encoder
 \layout Description
 
@@ -5090,7 +5258,7 @@
 \begin_inset Quotes eld
 \end_inset 
 
-file format
+container format
 \begin_inset Quotes erd
 \end_inset 
 
@@ -5109,6 +5277,14 @@
  files (I prefer to call them just Speex files).
  One difference with Vorbis however, is that Speex is less tied with Ogg.
  Actually, if what you do is Voice of IP (VoIP), you don't need Ogg at all.
+\layout Subsection*
+
+What's the extension for Speex?
+\layout Standard
+
+Speex files have the .spx extension.
+ Note however that all the Speex tools (speexenc, speexdec) do not rely
+ on the extension at all so any extension will work.
 \layout Subsection*
 
 Can I use Speex for compressing music

<p><p>1.13      +1 -1      speex/libspeex/speex_header.h

Index: speex_header.h
===================================================================
RCS file: /usr/local/cvsroot/speex/libspeex/speex_header.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- speex_header.h	11 Nov 2002 06:05:22 -0000	1.12
+++ speex_header.h	11 Jan 2003 01:24:46 -0000	1.13
@@ -63,9 +63,9 @@
    int frame_size;             /**< Size of frames */
    int vbr;                    /**< 1 for a VBR encoding, 0 otherwise */
    int frames_per_packet;      /**< Number of frames stored per Ogg packet */
+   int extra_headers;          /**< Number of additionnal headers after the comments */
    int reserved1;              /**< Reserved for future use, must be zero */
    int reserved2;              /**< Reserved for future use, must be zero */
-   int reserved3;              /**< Reserved for future use, must be zero */
 } SpeexHeader;
 
 /** Initializes a SpeexHeader using basic information */

<p><p>1.7       +2 -2      speex/src/speexdec.1

Index: speexdec.1
===================================================================
RCS file: /usr/local/cvsroot/speex/src/speexdec.1,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- speexdec.1	20 Dec 2002 08:24:46 -0000	1.6
+++ speexdec.1	11 Jan 2003 01:24:46 -0000	1.7
@@ -1,7 +1,7 @@
 .\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.29.
-.TH SPEEXDEC "1" "December 2002" "speexdec version 1.0beta4" "User Commands"
+.TH SPEEXDEC "1" "December 2002" "speexdec version 1.0rc1" "User Commands"
 .SH NAME
-speexdec \- manual page for speexdec version 1.0beta4
+speexdec \- manual page for speexdec version 1.0rc1
 .SH SYNOPSIS
 .B speexdec
 [\fIoptions\fR] \fIinput_file.spx \fR[\fIoutput_file\fR]

<p><p>1.5       +2 -2      speex/src/speexenc.1

Index: speexenc.1
===================================================================
RCS file: /usr/local/cvsroot/speex/src/speexenc.1,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- speexenc.1	20 Dec 2002 08:24:46 -0000	1.4
+++ speexenc.1	11 Jan 2003 01:24:46 -0000	1.5
@@ -1,7 +1,7 @@
 .\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.29.
-.TH SPEEXENC "1" "December 2002" "speexenc version 1.0beta4" "User Commands"
+.TH SPEEXENC "1" "December 2002" "speexenc version 1.0rc1" "User Commands"
 .SH NAME
-speexenc \- manual page for speexenc version 1.0beta4
+speexenc \- manual page for speexenc version 1.0rc1
 .SH SYNOPSIS
 .B speexenc
 [\fIoptions\fR] \fIinput_file output_file\fR

<p><p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list