search for: getsamplerate

Displaying 6 results from an estimated 6 matches for "getsamplerate".

Did you mean: setsamplerate
2010 May 06
1
Encoding a wave file with a bad header
...with zero lengths in the header would it impact the compression at all? Here's what I'm doing during compression in Java: AudioFormat wavFormat = ais.getFormat(); AudioFormat speexFormat = new AudioFormat(SpeexEncoding.SPEEX_Q5, wavFormat.getSampleRate(), -1, // sample size in bits wavFormat.getChannels(), -1, // frame size -1, // frame rate false); // little endian AudioInputStream spx = AudioSystem.getAudioInputStream(...
2007 Jun 24
0
JSpeex help
...n. > > I'm using the following code to capture audio: > > ======= > > // open line > line = (TargetDataLine)AudioSystem.getLine( dataLineInfo ); > line.open( format ); > line.start(); > > // write audio capture to buffer (ostream) > int buffSize = (int)format.getSampleRate() * format.getFrameSize(); > byte buffer[] = new byte[buffSize]; > > ostream = new ByteArrayOutputStream(); > > while( state == 1 ) > { > int count = line.read( buffer , 0 , buffer.length ); > > if( count > 0 ) > ostream.write( buffer , 0 , count ); > } > >...
2008 Jan 07
0
JSpeex - Unsupported conversion
...quot;Exception: " + e.getMessage()); e.printStackTrace(); return; } AudioFormat srcFormat = audioInputStream.getFormat(); AudioFormat targetFormat = new AudioFormat(SpeexEncoding.SPEEX_Q3, srcFormat.getSampleRate(), -1, // sample size in bits srcFormat.getChannels(), -1, // frame size -1, // frame rate srcFormat.isBigEndian()); AudioInputStream audioInputS...
2008 Jan 08
0
JSpeex - Unsupported conversion
...getMessage()); > e.printStackTrace (); > return; > } > AudioFormat srcFormat = audioInputStream.getFormat(); > > AudioFormat targetFormat = > new AudioFormat(SpeexEncoding.SPEEX_Q3 , > srcFormat.getSampleRate(), > -1, // sample size in bits > srcFormat.getChannels(), > -1, // frame size > -1, // frame rate > srcFormat.isBigEndian()); > AudioInput...
2008 Dec 17
0
help with jspeex
...eex.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.getChannels(), -1, // frame size -1, // frame rate srcFormat.isBigEndian()); AudioInputStream audioInputStream2 = AudioSystem.g...
2010 Mar 20
0
Decode file written from JSpeex using C/C++ API?
...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, // frame size -1, // frame rate false); // little endian ais = AudioSystem.getAudioInputStream(speexFormat, ais); AudioSystem.write(ais, SpeexFileFormatType.SPE...