[Speex-dev] Integrating speex with VideoNet application: Constantbackground noise

Carine Liang carineliang at yahoo.com.sg
Mon Dec 25 23:40:32 PST 2006


Hi Jean-Marc,

Thanks. I've got the code for sampleenc and sampledec. But I didn't know how to verify whether the decoded file is correct.
So I tried to analyse the decoded output and compile with my input.

Test case: PCM samples, 8 bit, 8000 samples per sec. 
When I pulled all my input to 0s, after encode and decode, the output fluctuates around -0.12 to 0.2 (in float), so when finally cast to character, they are still 0. Hence I've hear no background sound at all. =>

When I set all my input values to 127 (max +ve value) and -128 (max -ve value), I heard a soft background noise. But still acceptable. 

When I use my actual input, the pounding background noise came back.
1. My input fluctuates around -128 and 127. 
2. The decoded output is highly random. Initially it has values close to 0, then slowly the value danced around in a wide range of -163 to 201.

When I commented out the encode and decode, I am able to hear the recorded sound without no background noise. 

Is my decoded output expected? Since I'm dealing with a 8 bit sample, am I right to say that I will not have the "big/little endian" issue?

What has gone wrong???


Regards,
Carine


----- Original Message ----
From: Jean-Marc Valin <jean-marc.valin at usherbrooke.ca>
To: Carine Liang <carineliang at yahoo.com.sg>
Cc: John Miles <jmiles at pop.net>; speex-dev at xiph.org
Sent: Monday, 25 December 2006 10:22:44 AM
Subject: Re: [Speex-dev] Integrating speex with VideoNet application: Constantbackground noise

Have you tried starting with sampleenc/sampledec instead of doing
everything from scratch. That and the manual should contain everything
that's needed.

    Jean-Marc

Carine Liang a écrit :
> Hi,
> 
> 
> 
> I'm still unable to get rid of the background noise though I've
> changed the PCM samples to 16 bit. I'm began to wonder if I can just
> take the PCM samples and encode them.
> 
> What my application tries to do is to record the voice from a
> microphone, encode it, send it via the socket to a peer, decode at
> the peer's side and play the voice. My application works fine without
> the codec but I need to achieve a lower data rate. Anyone has done
> that before?
> 
> Is there anyone who's deal with encoding and decoding PCM samples in
> windows?
> 
> Please help.
> 
> Carine
> 
> ----- Original Message ---- From: John Miles <jmiles at pop.net> To:
> Carine Liang <carineliang at yahoo.com.sg>; speex-dev at xiph.org Sent:
> Friday, 3 November 2006 12:32:43 AM Subject: RE: [Speex-dev]
> Integrating speex with VideoNet application: Constantbackground noise
> 
> 
> 
> 
> 
> DIV { MARGIN:0px;}
> 
> 
> 
> Yes, it's necessary; Speex will encode signed 16-bit PCM data and
> decode to the same format.  See the examples that come with it.
> 
> 
> 
> 8-bit audio is not something you would ever want to use.
> 
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> 
> _______________________________________________ Speex-dev mailing
> list Speex-dev at xiph.org 
> http://lists.xiph.org/mailman/listinfo/speex-dev






Send instant messages to your online friends http://asia.messenger.yahoo.com 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xiph.org/pipermail/speex-dev/attachments/20061225/913a9295/attachment.htm


More information about the Speex-dev mailing list