DSPRelated.com
Forums

regarding speech.in file in G.729

Started by gupta ksrc November 7, 2002
hi everybody i have small doubt regarding g.729 implementation ...

while i am trying to simulate the code given by ITU with speech.in file(which is
given in g729tv2 folder of ITU site).
for g.729 standard implementation they given in ITU site as test
vector "speech.in" file..that i am sending ... i tried to open in dos
or
linux ...platforms...

it is showing some ascii characters ....and some sound is listened..

in standard they mentioned that input to g.729 encoder is 16 bit pcm
data from
8khz sampling rate of speech....i.e 128 Kbps ....

but this speech file consists of 3750 odd frames...

can we see this ascii symbols in binary(hexadecimal) format..

so that i can take only desired frames... and want to check at encoder
output

i.e bitstream file (what iam assuming is bitstream file consists of
only
bits...) parameters ... how to generate our own speech file..
or any already available speech files in net any source?

where exactly voicing and unvoiced decision taking place at encoder of g.729?
please help me..
thanking u all

GUPTA KSRC



hi,
you obviously cant read the .in file because it is in binary format, if u want
to see it in hex/decimal format, the easiest way is to dump the data in the
g.729 C code at the begining using the C file i/o after providing the correct
input file thru the command promt.
you were right about the speech.in file having bits, this is the input for the
encoder so it contains raw PCM samples. the out put of the encoder contains
parameters.
g.729 has 10 ms window per frame, and sampled at 8khz.. i.e, 10ms*8khz gives you
80 samples per frame.
the out put contains 80 words, made up of different parameters. see standard doc
for numbers of each parameters.
The best way to debug is on VC++, you can single step the entire c code and see
the out put of each line, function etc. so its easy for you to dump the required
variables and compare it with the assembly code (if you are writing assembly
code).
finally after every frame a speech.bit file is created, compare the one
generated by your C_code with the .bit file provided by the standard. IF there
are any probs in the c code it will be reflected here!
Regarding decission on voice/noise,this happens in the VAD function of
g.729B(g.729 doesn support VAD), depending on the voicing decission the algo
switches between Voice coding or dtx encoding.
Its easy to generate your own speech file, use some sound editing tools like
Cool edit or Goldwave, you can record and convert speech file to .pcm or any
other format. this file can be used to run on the C code, to validate you have
to run both encoder and decoder to assure that the code has passed your speech
file as you dont have any refernce outputs contrary to ITU standard speech
files, there are files available on the net. while recording take care u are
doing it in a noise free environ.

i hope this info was useful. write back if u have further doubts.

-Shashi

gupta ksrc <> wrote:
hi everybody i have small doubt regarding g.729 implementation ...

while i am trying to simulate the code given by ITU with speech.in file(which is
given in g729tv2 folder of ITU site).
for g.729 standard implementation they given in ITU site as test
vector "speech.in" file..that i am sending ... i tried to open in dos
or
linux ...platforms...

it is showing some ascii characters ....and some sound is listened..

in standard they mentioned that input to g.729 encoder is 16 bit pcm
data from
8khz sampling rate of speech....i.e 128 Kbps ....

but this speech file consists of 3750 odd frames...

can we see this ascii symbols in binary(hexadecimal) format..

so that i can take only desired frames... and want to check at encoder
output

i.e bitstream file (what iam assuming is bitstream file consists of
only
bits...) parameters ... how to generate our own speech file..
or any already available speech files in net any source?

where exactly voicing and unvoiced decision taking place at encoder of g.729?
please help me..
thanking u all

GUPTA KSRC
_____________________________________
Note: If you do a simple "reply" with your email client, only the author of this
message will receive your answer. You need to do a "reply all" if you want your
answer to be distributed to the entire group.

_____________________________________
About this discussion group:

To Join:

To Post:

To Leave:

Archives: http://www.yahoogroups.com/group/speechcoding

Other DSP-Related Groups: http://www.dsprelated.com Shashi Shankar.H ---------------------------------



Hi,

you can see the file in vc++. g.729 has 10 ms window per frame, and sampled at
8khz.. i.e, 10ms*8khz gives you 80 samples per frame i.e. the input of the
encoder is 80 words and the output of the encoder is 82 serial bits(bfi+ number
of speech bits). Now the file size of speech.in is 600,064 bytes i.e.300,032
words

since per frame it is 80 words the total no. of frames in the file is
300,032/80750 frames. I hope this answers your question. you can tap the input
and output

using fwrite() to a particular file.you can generate your own speech file,
using sound editing tools like Cool edit. The voicing and unvoicing decision
takes place in vad.c(In the function Makedec). if you want to know any further
details mail me back.

with regards

suma gupta ksrc <> wrote:
hi everybody i have small doubt regarding g.729 implementation ...

while i am trying to simulate the code given by ITU with speech.in file(which is
given in g729tv2 folder of ITU site).
for g.729 standard implementation they given in ITU site as test
vector "speech.in" file..that i am sending ... i tried to open in dos
or
linux ...platforms...

it is showing some ascii characters ....and some sound is listened..

in standard they mentioned that input to g.729 encoder is 16 bit pcm
data from
8khz sampling rate of speech....i.e 128 Kbps ....

but this speech file consists of 3750 odd frames...

can we see this ascii symbols in binary(hexadecimal) format..

so that i can take only desired frames... and want to check at encoder
output

i.e bitstream file (what iam assuming is bitstream file consists of
only
bits...) parameters ... how to generate our own speech file..
or any already available speech files in net any source?

where exactly voicing and unvoiced decision taking place at encoder of g.729?
please help me..
thanking u all

GUPTA KSRC
_____________________________________
Note: If you do a simple "reply" with your email client, only the author of this
message will receive your answer. You need to do a "reply all" if you want your
answer to be distributed to the entire group.

_____________________________________
About this discussion group:

To Join:

To Post:

To Leave:

Archives: http://www.yahoogroups.com/group/speechcoding

Other DSP-Related Groups: http://www.dsprelated.com