[speex-dev] JSpeex help

marc at wimba.com marc at wimba.com
Fri Dec 5 00:21:52 PST 2003

    Hi Sanjiv,

    There does indeed appear to be some trouble with
the Javasound SPI encoder (the SPI decoder works well).
I am working on it, and hope to have a fix soon. In the
mean time, you can use the encoder outside of
JavaSound, that one works well (see the command line
encoder as example code of how to implement it).


    Marc Gimpel
    Head of research

<p>On Thu, 4 Dec 2003 12:31:50 -0500, "Sanjiv Desai"
wrote:X-Original-To: speex-dev-majordomo at xiph.org
X-Original-To: speex-dev at xiph.org
X-Original-To: speex-dev at xiph.org
From: "Sanjiv Desai" 
X-Priority: 3
Reply-To: speex-dev at xiph.org
X-Mailer: Microsoft Outlook Express 6.00.2800.1106
Old-Delivered-To: speex-dev at xiph.org
X-Mimeole: Produced By Microsoft MimeOLE V6.00.2800.1106
Date: Thu, 4 Dec 2003 12:31:50 -0500
Received: (cpmta 16638 invoked from network); 4 Dec
2003 09:39:23 -0800
Received: from (HELO
        by smtp.inbound.c003.snv.cp.net ( with
SMTP; 4 Dec 2003 09:39:23 -0800
Received: by motherfish-II.xiph.org (Postfix)
        id AC064532E15; Thu,
        4 Dec 2003 12:39:18 -0500 (EST)
Received: by motherfish-II.xiph.org (Postfix, from
userid 30)
        id 9C1E2532E19; Thu,
        4 Dec 2003 12:39:18 -0500 (EST)
Received: from motherfish-II.xiph.org (localhost
        by motherfish-II.xiph.org (Postfix) with ESMTP id
        for ; Thu,
        4 Dec 2003 12:39:18 -0500 (EST)
Received: from motherfish-II.xiph.org (localhost
        by motherfish-II.xiph.org (Postfix) with ESMTP id
        for ; Thu,
        4 Dec 2003 12:39:17 -0500 (EST)
Received: from astro.snellfamily.com
(astro.snellfamily.com [])
        by motherfish-II.xiph.org (Postfix) with ESMTP id
        for ; Thu,
        4 Dec 2003 12:32:00 -0500 (EST)
Received: from interact01 (unknown [])
        by astro.snellfamily.com (Postfix) with SMTP id
        for ; Thu,
        4 Dec 2003 12:31:53 -0500 (EST)
X-Msmail-Priority: Normal
Content-Type: multipart/alternative;
X-Tmda-Confirmed: Thu Dec 4 12:39:17 EST 2003
X-Received: 4 Dec 2003 17:39:23 GMT
Subject: [speex-dev] JSpeex help
Precedence: bulk
Delivered-To: wimba.com%marc at wimba.com
Delivered-To: speex-dev-outgoing at xiph.org
Delivered-To: speex-dev-majordomo at xiph.org
Delivered-To: speex-dev at xiph.org
MIME-Version: 1.0
Sender: owner-speex-dev at xiph.org

<p><p><p><p><p><p><p><p>I am not sure if this is right place to ask for 
help on jspeex or can some one suggest. I have tried on
jspeex sourceforge.net 
I am trying to use Pcm2SpeexAudioInputStream by 
creating it from tdl which received pcm_signed audio
data as 
follows:AudioFormat format = new AudioFormat 
(AudioFormat.Encoding.PCM_SIGNED, 8000, 16, 1, 2, 8000,
targetInfo = new DataLine.Info (TargetDataLine.class,
8000);TargetDataLine tdl = (TargetDataLine)
(targetInfo);AudioInputStream auin=new AudioInputStream 
(tdl);PipedOutputStream pout=new
pin=new PipedInputStream(pout);pcm2speex=new
Pcm2SpeexAudioInputStream (pin, 
ratio = t.bufferlength / t.framelength; byte[]
byte[t.framelength];while(true) {  int
n=auin.read(frame, 0, 
frame.length);  System.out.println(""+n+" bytes
pout.write(frame);  int m=pcm2speex.read();  
System.out.println(""+m+" bytes read - 2.");}
But, when I run, it waits in auin.read. I tried 
using speexEncoder to manually process data, but I get
only noise as compressed 
data. It took about 200 ms to encode each frame. Also,
I am wondering, if 
preprocessing setting like echo cancellation is
possible with this version. How 
can I check for silence when vad and dtx turned on. Is
it possible to control 
the length of silence before triggering dtx(end of
speech)? Is next version with 
floating point to int conversion, AGC, denoiser etc and
other features of speex 
1.1.3, going to be released soon?
I will appreciate any help on sample code to do 
real-time encoding from targetDataLine.
I have tried java sound spi provided, and tried 
using SpeexFormatConvertionProvider,
SpeexAudioFileWriter etc, but nothing seems 
to work. I know that its going to be some thing very
simple, I am missing or not 
using properly.

Marc Gimpel
Project Manager
--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'speex-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.

More information about the Speex-dev mailing list