Displaying 20 results from an estimated 200 matches similar to: "Conversion problem in encoding and decoding"
2005 Jan 04
0
Conversion problem in encoding and decoding
> short temp_short;
> float temp_float;
> float floatData[number_of_sample];
>
> for (int i=0; i < number_of_sample; i++)
> {
> memcpy(&temp_short, &src[i*2], 2);
> temp_float = temp_short;
> floatData[i] = temp_float;
> }
>
> yueweng
>
Thanks for the encoding code can yu plz send me the decoding code
for conversion from float array to
2004 Aug 06
1
openh323 conflict; can speex_encode take short?
openh323 speexcodec.cxx has:
BOOL SpeexCodec::EncodeFrame(BYTE * buffer, unsigned & length)
{
// convert PCM to float
float floatData[SAMPLES_PER_FRAME];
PINDEX i;
for (i = 0; i < SAMPLES_PER_FRAME; i++)
floatData[i] = sampleBuffer[i];
// encode PCM data in sampleBuffer to buffer
speex_bits_reset(bits);
speex_encode(coder_state, floatData, bits);
2004 Dec 28
5
Sound distorted after normalized.
> 16 bit ints have a range of -32768 to 32767. If you divide
> -32768 by 32767.0 you end up with -1.00003051850948 which
> is a bad thing.
>
> Try normalizing with a value of 32768.0.
No. Speex expects values in the +-32767 range, not +-1.0. Just
converting from int16 to float *is* the right thing to do.
Jean-Marc
--
Jean-Marc Valin <Jean-Marc.Valin@USherbrooke.ca>
2005 Apr 26
2
100% CPU usage
Hi Jean,
> > > Well, just trace it, how many times are you
> calling
> > > speex_decode_int()?
> >
> > Maximum is 51 times per second. Will this cause
> any
> > CPU high utilization?
>
> That's normal... What CPU are you using? If it's a
> fixed-point CPU, then
> the reason is probably just the fact that the packet
> loss
2005 Apr 18
3
speex voice seems to be bit breaking over long distance.
Hi,
Ok, what you suggest sound logical to me. Currently, I
have done a small trick to prevent this problem. What
I did is that whenever windows request a voice packet
from me and if I do not have the voice packet, I
repeat the previous packet. Hence, all the breaking
portion is filled with previous packet. This trick
seems to work so far. I am not sure what is the side
effect.
I think jitter
2004 Dec 28
1
How to convert from Microsft PCM 16bit to float
Dear all,
I have one simple question. I understand that
speex_encode and speex_decode takes float * as an
arguement to encode and decode the sound. However,
when I get the PCM data from the sound card under
win32, it is a just 16 bit array. May I know how do I
convert this 16 bit value to speex float format and to
convert back? Is there got any routine to do this?
YueWeng
2004 Dec 30
2
Speex sound a little artificial?
Hi all,
I have deploy speex 1.1.6 in my application. With no
option set, I can hear that the voice sounds a little
bit artificial like robot. Any idea what causes this?
I use openh323 with speex, but it seems ok. Is it
neccessary for me to use more other filter prior to
encode the sound or after decode my sound?
yueweng
__________________________________
Do you Yahoo!?
Yahoo! Mail -
2005 Jan 05
4
Encoding and decoding problem in speex 1.0.4
Hi,
I am using the speex 1.0.4 library from Windows.
I have posted my problem before but didn't get a solution. I am doing an
VOIP project
in which i am recording sound and streaming it to the peer. I wanted to
encode and decode
wav files that brought me to this site.
I am recording sound in the following format:-
m_WaveFormatEx.wFormatTag = WAVE_FORMAT_PCM;
2004 Dec 28
2
Sound distorted after normalized.
Dear all,
First, my aim is to achieve VoIP using VBR and DTX
under Win32.
I face a problem using speex 1.0.4 and need some help.
My voice is ok and no background noise when I do NOT
normalize 16 bit value to floating value. Normalized
means dividing the 16 bit value by 32767. Turning on
VBR is also ok but DTX has no effect.
However, the speak is has a continous background beep
sound AFTER I
2005 Feb 17
1
Hellolololo... effect in long distance?
Hi,
Have anyone using speex experience the following
effect:
When I say "hello", it will be become
"hellololololololo....". This does not always
happened. The chance of happen is quite random. This
effect does not happen in my LAN. It only happen when
ping time is about 500 milisecond or more.
Is it a speex problem? Any suggestion how to resolve
this issue?
Thanks in
2005 Apr 26
1
100% CPU usage
Dear all,
I am using speex 1.17 at this moment, everything works
great.
However, I face a problem when no packet arrived from
network for a few second, my CPU usage is 100%. I step
though my code and seems that (not confirmed) the
speaker callback WaveOutCallback() function which call
speex_decode_int(decoder_state, NULL, shortData)
(when no data arrived for PLC purpose) seems to
consume a
2004 Dec 31
2
Speex sound a little artificial?
Hi,
> 1) Normal given the bandwidth/bit-rate used
Do you mean the bit-rate that I should set in the
speex codec?
> 2) A conditioning problem with your audio (i.e. DC
> not removed)
What is DC?
YueWeng
__________________________________
Do you Yahoo!?
Yahoo! Mail - now with 250MB free storage. Learn more.
http://info.mail.yahoo.com/mail_250
2004 Dec 30
2
echo cancellation
I'm going to test the echo cancellation...
but before doing something wrong, i want to know what is the right way
to use it...
-------------------------------------------------------------------------------------
short * speakerSample; //will contain what the speakers are going to play
short * microphoneSample; //what the microphone is going to register
short* cancelledSample; //the ouput
2011 Jun 18
3
how to subtract one string from another in R
Dear R Group
Here is what i am trying to do.. but couldnt figure out how..
string<-"ABC DEFG HIJKLM NOPQ RSTUV WXY"
string1<-substr(string,1,4)
I want to create an R object string 2 ( following the logic shown).. R does
not allow string subtraction.. any suggestions how to achieve this?
string2<-string-string1 (it should now hold "DEFG HIJKLM NOPQ RSTUV WXY"
I
2011 Apr 10
4
Password-protect R script files
There was a question in R forum very long time back.. on how to protect R
Script files from inadvertent editing by users.
There is a way to do this from within R, atleast in Windows XP I have tried
this and it certainly works , The method is very different from the OS
based folder protection route, however making available such a method in
the open forum would only kill the very spirit of R.
2011 Aug 04
2
random value generation with added constraint.
Hi
I am looking at generating a random dataset of say 100 values fitting in a
normal distribution of a given mean and SD, I am aware of rnorm
function. However i am trying to build into this function one added
constraint that all the random value generated should also obey the
constraint that they only take values between say X to X+25
How do i do this in R?
Any help would be highly appreciated,.
2012 Nov 15
3
GUI Development reg
Dear R Group
I have a character vector from which I want to select a few elements and
create a new character vector.
I need a GUI to do this in R Script.
Can someone help?
a<-c("A","B","C","D","E")
## I want to have a GUI in R that will display elements in "object a" as
a drop down list.. from there I want to be able to select a
2005 May 04
0
Speex over 56.6K modem
I use Speex with dialup modem users. Even if the dialup modem
is "56K", you should assume that upstream bandwidth available is
only 20-30kbps at the most. I use 16kHz wideband mode and VBR
quality 2. Also, I send 80ms (4 frames) per packet, because
there is an overhead of approximately 33 bytes per packet
due to UDP (8 bytes), IP (20 bytes), and PPP (~5 bytes) headers.
If you
2005 Apr 18
0
speex voice seems to be bit breaking over long distance.
> Ok, what you suggest sound logical to me. Currently, I
> have done a small trick to prevent this problem. What
> I did is that whenever windows request a voice packet
> from me and if I do not have the voice packet, I
> repeat the previous packet. Hence, all the breaking
> portion is filled with previous packet. This trick
> seems to work so far. I am not sure what is the
2017 Jul 13
2
Help with R script
Dear R-help Group
Scenario 1:
I have a text file running to 1000 of lines...that
is like as follows:
[922] "FieldName: Wk3PackSubMonth"
[923] "FieldValue: Apr"
[924] "FieldName: Wk3PackSubYear"
[925] "FieldValue: 2017"
[926] "FieldName: Wk3Code1"
[927] "FieldValue: "
[928] "FieldValue: K4"
[929] "FieldName: