Displaying 20 results from an estimated 86 matches for "enc_state".
2008 Dec 11
1
preprocessor VAD only rocognize between silence and not silence
...VAD is a kludge */"
I've seem in te roadmap that you are testing a new VAD, but Im not sure
if im doing something wrong with the current.
Here is the code of the compressor:
if (inicializado == false)
{
bits = new SpeexBits;
speex_bits_init(bits);
enc_state = speex_encoder_init(&speex_nb_mode);
// obtenemos tama?o frame
speex_encoder_ctl(enc_state, SPEEX_GET_FRAME_SIZE, &frame_size);
// configuramos parametros
int complexity = 5;
speex_encoder_ctl(enc_state, SPEEX_SET_COMPLEXITY, &complexity);...
2004 Aug 06
2
Bitrate in encoder
Hi,
I'm using the latest version of libspeex (checked out today) and have
some problems with checking the target bitrate in the encoder. Calling:
peex_encoder_ctl(globals->enc_state,SPEEX_GET_BITRATE, &bitrate);
Seems to set bitrate to 24600 no matter what the qualitysetting is.. The
functions used previous to this call is:
peex_bits_init(&globals->bits);
globals->enc_state = speex_encoder_init(&speex_nb_mode);
speex_encoder_ctl(globals->enc_state,SPEEX_...
2009 Apr 13
0
encoding -> decoding doesnt work
...th 16 bits pcm.
I only want to encode it with speex and then decode it and write it back in
the same buffer.
no compiling errors and no errors during runtime, but from the sample of 5
seconds only a short noise is all I get.
I hope you have any ideas!
kind regards juergen
SpeexBits bits;
void *enc_state;
speex_bits_init(&bits);
const SpeexMode *mode;
mode = speex_lib_get_mode (SPEEX_MODEID_WB);
enc_state = speex_encoder_init(mode);
int frame_size = 0;
speex_encoder_ctl(enc_state,SPEEX_GET_FRAME_SIZE,&frame_size);
int tmp = 16000;
speex_encoder_ctl(enc_state, SPEEX_SET_SAMPLING...
2012 Mar 10
3
problem: The decoded frame is not as the original one
...hat the decoded frame is totally different from the original frame(see output below).What is the possible reason for this?.thanks for any help
#include<stdio.h>
#include"intel16.h"
#include <speex/speex.h>
#define FRAME_SIZE 160
#define MAX_NB_BYTES 25
SpeexBits bits;
void *enc_state;
int quality=4;??????
int nbBytes;
int byte_ptr;
int frame_size;
short frame[FRAME_SIZE];?
char outBuffer[20];
SpeexBits decBits;
void *dec_state;
short decFrame[FRAME_SIZE];
/*===========END ===============================*/
int z=0;
int frame_size;
int main (int argc,char **argv)
{
for( z=...
2005 Feb 09
2
encoding speex, (insanity looming)
...that I have been trying to get to work,
I have removed some of the code to make it easyer to see. Any help would
be wonderful, think of it as an heroic act by saving me from a mental
break down. :)
Thanks,
David.
==== sample code ====
...
// encoder
void *enc_state;
SpeexBits enc_bits;
// decoder
void *dec_state;
SpeexBits dec_bits
// quaility and rate
int quality = 8, rate = 16000;
// setup encoder
speex_bits_init(&enc_bits);
enc_state = speex_encoder_init(&speex_wb_mode);...
2005 Feb 22
1
Win CE playback error
...e mflops for using fixed point on a Win CE compared to using floating point?
Looking at the manual,
"In practice, frame_size will correspond to 20 ms when using 8, 16, or 32 kHz sampling
rate."
for a 8 kHz sampling, the framesize should be 320 right?
But when i use
speex_encoder_ctl(enc_state,SPEEX_GET_FRAME_SIZE,&frame_size)
The framesize i got is 160.
I am trying to encode the data which is contained as an unsigned char buffer[160] as mode 2 of 5,950 bps and stored as the same data type as unsigned char array after encoding
I have managed to link the libspeex_armce.lib file suc...
2004 Sep 29
1
ARM w/ assembly & fixed point crash
I've targeted Speex to run under eCos with Thumb interworking using
arm-elf-gcc 3.3.3
I'd written a small test case to verifiy the operation:
#include <speex/speex.h>
void
speex_test(void)
{
SpeexBits bits;
unsigned int frame_size;
void *enc_state;
float *speex_frame;
cyg_uint64 t1, t2;
int i;
speex_frame = (float *)0x00030000; /* Address of Speex data */
speex_bits_init(&bits);
printf("Initializing Speex encoder...");
enc_state = speex_encoder_init(&speex_nb_mode);
printf("done\n&quo...
2008 Dec 15
0
preprocessor VAD only rocognize between silence andnot silence
...wrong with the current.
>>>
>>> Here is the code of the compressor:
>>>
>>>
>>>
>>> if (inicializado == false)
>>> {
>>> bits = new SpeexBits;
>>> speex_bits_init(bits);
>>> enc_state = speex_encoder_init(&speex_nb_mode);
>>>
>>> // obtenemos tama?o frame
>>> speex_encoder_ctl(enc_state, SPEEX_GET_FRAME_SIZE,
>&frame_size);
>>>
>>> // configuramos parametros
>>> int complexity = 5;
&...
2004 Aug 06
0
Invalid mode encountered: corrupted stream?
...alid mode encountered: corrupted stream?"
"Invalid wideband mode encountered: corrupted stream?"
The stream is not corrupted but i wish to know what those warning mean to
correct my code.
My encode and decode routines are those (libspeex 1.1.4):
SpeexBits enc_bits, dec_bits;
void *enc_state, *dec_state;
static int enc_nbBytes = 0;
static int comp = 1, quality = 5;
static int vero = 1, falso = 0;
static int enc_bitrate = 8000;
void SpeexInit (void)
{
//ENCODER
speex_bits_init(&enc_bits);
enc_state = speex_encoder_init(&speex_nb_mode);
speex_encoder_ctl(enc_state,SPEEX_RES...
2005 Jan 25
1
Is SPEEX_GET_QUALITY implemented ?
...xenc.c
or speexdec.c.
I would appreciate any hints.
best regards,
Alain Aubord
---------------------------test.c---------------------------------------
#include <stdio.h>
#include <stdlib.h>
#include <speex/speex.h>
int main(int argc,char * args[]){
SpeexBits bits;
void *enc_state;
int Quality=9,tmp;
speex_bits_init(&bits);
enc_state=speex_encoder_init(&speex_uwb_mode);
speex_encoder_ctl(enc_state,SPEEX_SET_QUALITY,&Quality);
speex_encoder_ctl(enc_state,SPEEX_GET_QUALITY,&tmp);
printf("Quality is %d\n",tmp);
}
-----------------------...
2011 Jan 02
0
Newbie problem with encoding
...short[1024].
I have put the relevant code below with comments about what works and
what does not. Anything with a number in front is a question.
This is just test code to get things working:
int lib_speex_init() {
int quality = 5;
int rate = 16000;
int err;
// Setup for coding
enc_state = NULL;
speex_bits_init(&bits);
enc_state = speex_encoder_init(&speex_wb_mode);
speex_encoder_ctl(enc_state, SPEEX_SET_QUALITY, &quality);
speex_encoder_ctl(enc_state, SPEEX_SET_SAMPLING_RATE, &rate);
// Set up a resampler to resample to 16K which is wideband mod...
2005 Oct 09
0
Fw: problem in encoder/decoder
...,
I'm developing an app to broadcast voice over web. i tried to use speex and
download ver 1.04 documentation and use it to develop encoding and decoding
but after decoding voice is damaged i attach my encode/decode function.
BOOL EncodeSpeex(CVoiceMsg *pMsg)
{
SpeexBits bits;
void* enc_state;
// Initialize.
speex_bits_init(&bits);
enc_state = speex_encoder_init(&speex_nb_mode);
int frame_size = 0;
// get frame size.
speex_encoder_ctl(enc_state,SPEEX_GET_FRAME_SIZE,&frame_size);
int nbBytes = 0;
//unsigned char *input_frame,*encodedstr;
unsigned char *en...
2004 Aug 06
1
LIB usage
Hello,
I'm trying to use the speexlib but I just can't do it. I've made just like the
example (on the site) says. Some times I get SIGFAULT. Also, I'm reading the
input_frames from /dev/dsp (directly). What is missing here?
speex_bits_init(&bits);
enc_state = speex_encoder_init(&speex_nb_mode);
speex_encoder_ctl(enc_state, SPEEX_GET_FRAME_SIZE, &frame_size);
for(n=0; n<100; n++)
{
read_from_dev(fd1, (float *)input_frame, 1024);
speex_bits_reset(&bits);
speex_encode(enc_state, input_frame, &bits);
nBytesFrame...
2005 Feb 09
1
encoding speex, (insanity looming)
...39;, I'm having problems finding these functions in
the speex header. I am currenlty calling speex_encoder_init &
speex_decoder_init in my test code, I have repeated the relevent bits
of the example bellow. My version of speex is 1.1.6.
Thanks once again for your help,
David.
enc_state = speex_encoder_init(&speex_wb_mode);
speex_encoder_ctl(enc_state, SPEEX_SET_QUALITY, &quality);
speex_encoder_ctl(enc_state, SPEEX_SET_SAMPLING_RATE, &rate);
// setup decoder
speex_bits_init(&dec_bits);
dec_state = speex_decoder_init(&speex_wb_mod...
2006 May 21
2
Re: High pitched whine with Speex
...0.020 0.018 -0.001
Input: -0.000 0.000 0.000 0.000 -0.000
Out: -0.029 -0.008 0.020 0.018 -0.001
Input: -0.000 -0.000 -0.000 -0.000 0.000
Out: -0.029 -0.008 0.020 0.018 -0.001
My samples are 4 byte floats.
My sample rate is 8000
Here's pretty much all my speex code:
ENCODING INIT:
channel->enc_state=speex_encoder_init(&speex_nb_mode);
speex_encoder_ctl(channel->enc_state, SPEEX_GET_FRAME_SIZE,
&channel->speexOutgoingFrameSampleCount);
DECODING INIT:
channel->dec_state=speex_decoder_init(&speex_nb_mode);
speex_decoder_ctl(channel->dec_state, SPEEX_GET_FRAME_SIZE,
&...
2004 Aug 06
0
About sample code
I write a sample code like speex provide , as follows:
SpeeXCodec::SpeeXCodec()
{
rate = 8000;
speex_bits_init(&enbits);
speex_bits_init(&debits);
enc_state = speex_encoder_init(&speex_nb_mode);
dec_state = speex_decoder_init(&speex_nb_mode);
// set option for encoder
speex_encoder_ctl(enc_state, SPEEX_GET_FRAME_SIZE, &frame_size);
speex_encoder_ctl(enc_state, SPEEX_SET_COMPLEXITY, &complexity);
speex_encoder_ctl(enc_state, SPE...
2007 Aug 24
0
speex DTX chore
...n or off for the auto Gain control feature
// - dtx- 1 or 0, inicating on or off for the discontinious transmition feature
//
// RETURN VALUE: none
//
SpeexEncoder :: SpeexEncoder(int fs, int qlty, int vad, int denoise, int agc, int dtx)
{
speex_bits_init(&bits);
if(fs == 8000)
{
enc_state = speex_encoder_init(&speex_nb_mode);
}
else if(fs == 16000)
{
enc_state = speex_encoder_init(&speex_wb_mode);
}
else
{
MessageBox(NULL, "bad sampling frequency!", "SpeexEncoder", MB_OK | MB_ICONERROR);
}
int enc_frame;
speex_encoder_ct...
2011 Nov 28
1
Speex stereo encoding
Hi.
I trying to encode PCM16 8000Hz stereo data to speex and put it into the .flv file format. But at the output I can hear only noise. What I doing wrong? Here is the code:
void main()
{
SpeexBits bits;
void *enc_state;
int frame_size;
int quality = 10;
char cbits[MAX_FRAME_BYTES];
FILE *fin, *speex;
short input[MAX_FRAME_SIZE];
int nbBytes;
int channels = 0;
int format = 0;
int rate = 0;
spx_int32_t fileSize;
//Open input wav file and read wav header
fin = fopen(&quo...
2012 Mar 11
0
problem: The decoded frame is not as the original one
...hat the decoded frame is totally different from the original frame(see output below).What is the possible reason for this?.thanks for any help
#include<stdio.h>
#include"intel16.h"
#include <speex/speex.h>
#define FRAME_SIZE 160
#define MAX_NB_BYTES 25
SpeexBits bits;
void *enc_state;
int quality=4;??????
int nbBytes;
int byte_ptr;
int frame_size;
short frame[FRAME_SIZE];?
char outBuffer[20];
SpeexBits decBits;
void *dec_state;
short
decFrame[FRAME_SIZE];
/*===========END ===============================*/
int z=0;
int frame_size;
int main (int argc,char **argv)
{
for( z...
2005 Feb 09
0
encoding speex, (insanity looming)
...that I have been trying to get to work,
I have removed some of the code to make it easyer to see. Any help would
be wonderful, think of it as an heroic act by saving me from a mental
break down. :)
Thanks,
David.
==== sample code ====
...
// encoder
void *enc_state;
SpeexBits enc_bits;
// decoder
void *dec_state;
SpeexBits dec_bits
// quaility and rate
int quality = 8, rate = 16000;
// setup encoder
speex_bits_init(&enc_bits);
enc_state = speex_encoder_init(&speex_wb_mode);...