Displaying 5 results from an estimated 5 matches for "getaudioinputstream".
2008 Jan 07
0
JSpeex - Unsupported conversion
..." SpeexSave in.wav out.wav
Exception in thread "main" java.lang.IllegalArgumentException: Unsupported
conversion: SPEEX_quality_3, 44100.0 Hz, -1 bit, stereo, audio data from
PCM_SIGNED, 44100.0 Hz, 16 bit, stereo, little-endian, audio data
at
javax.sound.sampled.AudioSystem.getAudioInputStream(AudioSystem.java:571)
at SpeexSave.main(SpeexSave.java:36)
And here is my program:
import java.io.*;
import javax.sound.sampled.*;
// Speex imports.
import org.xiph.speex.*;
import org.xiph.speex.spi.*;
class SpeexSave {
public static void main(String args[]) {
if (args....
2008 Jan 08
0
JSpeex - Unsupported conversion
...gt; Exception in thread "main" java.lang.IllegalArgumentException:
> Unsupported
> conversion: SPEEX_quality_3, 44100.0 Hz, -1 bit, stereo, audio data
> from
> PCM_SIGNED, 44100.0 Hz, 16 bit, stereo, little-endian, audio data
> at
> javax.sound.sampled.AudioSystem.getAudioInputStream(AudioSystem.java:
> 571)
> at SpeexSave.main(SpeexSave.java:36)
>
>
> And here is my program:
>
> import java.io.*;
> import javax.sound.sampled.*;
>
> // Speex imports.
> import org.xiph.speex.*;
> import org.xiph.speex.spi.*;
>
> class SpeexSave {...
2008 Dec 17
0
help with jspeex
hello
i use the java lib jspeex from http://jspeex.sourceforge.net/
now i use this java code to encode to speex
audioInputStream = AudioSystem.getAudioInputStream(srcFile);
AudioFormat srcFormat = audioInputStream.getFormat();
AudioFormat targetFormat =
new AudioFormat(SpeexEncoding.SPEEX_VBR8 ,
srcFormat.getSampleRate(),
-1, // sample size in bits
srcFormat.getChannel...
2010 Mar 20
0
Decode file written from JSpeex using C/C++ API?
...ough idea how to decode a raw stream. (I'm assuming the sampledec source works with raw speex audio samples and doesn't handle ogg containers.) I've also managed to compress a wave file and output a .spx file using JSpeex and the following Groovy code:
AudioInputStream ais = AudioSystem.getAudioInputStream(new File("16Bitprompt.wav"));
AudioFormat wavFormat = ais.getFormat();
AudioFormat speexFormat =
new AudioFormat(SpeexEncoding.SPEEX_Q5,
wavFormat.getSampleRate(),
-1, // sample size in bits
wavFormat.getChannels(),
-1,...
2010 May 06
1
Encoding a wave file with a bad header
...Format.getSampleRate(),
-1, // sample size in bits
wavFormat.getChannels(),
-1, // frame size
-1, // frame rate
false); // little endian
AudioInputStream spx = AudioSystem.getAudioInputStream(speexFormat, ais);
AudioSystem.write(spx, SpeexFileFormatType.SPEEX, getOutputStream());
I then use speex C library to decompress on the receiving end. In one case where audio comes from a certain source (headers are properly formed) the compression/decompression works but in another case...