[Speex-dev] Programming questions
rhino64 at freesurf.ch
rhino64 at freesurf.ch
Mon Jan 17 00:44:44 PST 2005
Hi All,
I am quite new to voice encoding and to Speex library. I have some
programming questions that I am not able to answer even after having read
the documentation (from the start to the end an from the end to the start)
and by reading the sample code (provided in the documentation) and the
speexdec.c and speexenc.c programs.
I am currently working on an interface between Java code and C code for
using the C version of Speex library inside Java programs.
I have to encode a stream with 44100 Khz 16 bits Stereo and I would encode
it by using packets containing a duration of about 1/10 sec of unencoded
speech (this value is not fixed and will be an integer multiple of the
Speex encoder frame size to have a duration of about 1/10 of a second).
The duration imposed by the Speex encoder frame size is a little too short
for the application.
My problems are the following:
0) Is it possible to manipulate voice data representing more than
the frame size of encoder (this seems possible in Speex Java code
used until now).
1) How can I specify to the encoder that I use 16 bits stereo data ?
The ctl function allows only to set the sampling rate. I have
found nowhere some details. In speexenc.c I have seen the use
of some related to stereo functions but without understanding
well how to use them.
2) What is exactly the frame size ? It is an integer representing
a number of sample or a number of bytes or even a number of
shorts (in sampleenc.c this seems to be a number of shorts)
3) How (if this is possible) to decode a certain amount (known) of
coded data if these coded data represent more than the frame size
of encoder. This situation arise when the coded data for a
duration greater than the frame size of decoder are used. Should
I call some integer number of times the decoding procedure (like
it is done in the java code of Speex).
4) What is the difference "SPEEX_GET_FRAME_SIZE" and
"SPEEX_MODE_FRAME_SIZE" operations. This should not be identical
since these operations are provided by two different functions
but I don't see any explanation of a difference in the
documentation.
Iwould greatly appreciate If somebody has some answer to these questions.
Thanks and best regards,
Alain Aubord
More information about the Speex-dev
mailing list