public void startRecording() { line.start(); }
/** * Starts the recording. To accomplish this, (i) the line is started and (ii) the thread is started. */ public void start() { m_line.start(); super.start(); }
/** * Starts the recording. To accomplish this, (i) the line is started and (ii) the thread is started. */ public void start() { m_line.start(); super.start(); }
/** * Starts the recording. To accomplish this, (i) the line is started and (ii) the thread is started. */ public void start() { m_line.start(); super.start(); }
/** * Starts the recording. To accomplish this, (i) the line is started and (ii) the thread is started. */ public void start() { m_line.start(); super.start(); }
/** * Starts the recording. To accomplish this, (i) the line is started and (ii) the thread is started. */ public void start() { /* * Starting the TargetDataLine. It tells the line that we now want to read data from it. If this method isn't called, we * won't be able to read data from the line at all. */ m_line.start(); /* * Starting the thread. This call results in the method 'run()' (see below) being called. There, the data is actually read * from the line. */ super.start(); }
/** * Starts the recording. To accomplish this, (i) the line is started and (ii) the thread is started. */ public void start() { /* * Starting the TargetDataLine. It tells the line that we now want to read data from it. If this method isn't called, we * won't be able to read data from the line at all. */ m_line.start(); /* * Starting the thread. This call results in the method 'run()' (see below) being called. There, the data is actually read * from the line. */ super.start(); }
/** * Starts the recording. To accomplish this, (i) the line is started and (ii) the thread is started. */ public void start() { /* * Starting the TargetDataLine. It tells the line that we now want to read data from it. If this method isn't called, we * won't be able to read data from the line at all. */ m_line.start(); /* * Starting the thread. This call results in the method 'run()' (see below) being called. There, the data is actually read * from the line. */ super.start(); }
/** * Starts the recording. To accomplish this, (i) the line is started and (ii) the thread is started. */ public void start() { /* * Starting the TargetDataLine. It tells the line that we now want to read data from it. If this method isn't called, we * won't be able to read data from the line at all. */ m_line.start(); /* * Starting the thread. This call results in the method 'run()' (see below) being called. There, the data is actually read * from the line. */ super.start(); }
/** * Starts the recording. To accomplish this, (i) the line is started and (ii) the thread is started. */ public void start() { /* * Starting the TargetDataLine. It tells the line that we now want to read data from it. If this method isn't called, we * won't be able to read data from the line at all. */ m_line.start(); /* * Starting the thread. This call results in the method 'run()' (see below) being called. There, the data is actually read * from the line. */ super.start(); }
/** * Starts the recording. To accomplish this, (i) the line is started and (ii) the thread is started. */ public void start() { /* * Starting the TargetDataLine. It tells the line that we now want to read data from it. If this method isn't called, we * won't be able to read data from the line at all. */ m_line.start(); /* * Starting the thread. This call results in the method 'run()' (see below) being called. There, the data is actually read * from the line. */ super.start(); }
/** * Starts the recording. To accomplish this, (i) the line is started and (ii) the thread is started. */ public void start() { /* * Starting the TargetDataLine. It tells the line that we now want to read data from it. If this method isn't called, we * won't be able to read data from the line at all. */ m_line.start(); /* * Starting the thread. This call results in the method 'run()' (see below) being called. There, the data is actually read * from the line. */ super.start(); }
/** * Starts the recording. To accomplish this, (i) the line is started and (ii) the thread is started. */ public void start() { /* * Starting the TargetDataLine. It tells the line that we now want to read data from it. If this method isn't called, we * won't be able to read data from the line at all. */ m_line.start(); /* * Starting the thread. This call results in the method 'run()' (see below) being called. There, the data is actually read * from the line. */ super.start(); }
public JavaSoundAudioRecorder (int samplingRate, boolean isMono) { try { AudioFormat format = new AudioFormat(Encoding.PCM_SIGNED, samplingRate, 16, isMono ? 1 : 2, isMono ? 2 : 4, samplingRate, false); line = AudioSystem.getTargetDataLine(format); line.open(format, buffer.length); line.start(); } catch (Exception ex) { throw new GdxRuntimeException("Error creating JavaSoundAudioRecorder.", ex); } }
public JavaSoundAudioRecorder (int samplingRate, boolean isMono) { try { AudioFormat format = new AudioFormat(Encoding.PCM_SIGNED, samplingRate, 16, isMono ? 1 : 2, isMono ? 2 : 4, samplingRate, false); line = AudioSystem.getTargetDataLine(format); line.open(format, buffer.length); line.start(); } catch (Exception ex) { throw new GdxRuntimeException("Error creating JavaSoundAudioRecorder.", ex); } }
public JavaSoundAudioRecorder (int samplingRate, boolean isMono) { try { AudioFormat format = new AudioFormat(Encoding.PCM_SIGNED, samplingRate, 16, isMono ? 1 : 2, isMono ? 2 : 4, samplingRate, false); line = AudioSystem.getTargetDataLine(format); line.open(format, buffer.length); line.start(); } catch (Exception ex) { throw new GdxRuntimeException("Error creating JavaSoundAudioRecorder.", ex); } }
public JavaSoundAudioRecorder (int samplingRate, boolean isMono) { try { AudioFormat format = new AudioFormat(Encoding.PCM_SIGNED, samplingRate, 16, isMono ? 1 : 2, isMono ? 2 : 4, samplingRate, false); line = AudioSystem.getTargetDataLine(format); line.open(format, buffer.length); line.start(); } catch (Exception ex) { throw new GdxRuntimeException("Error creating JavaSoundAudioRecorder.", ex); } }
@Override public void run() { byte[] data = new byte[microphone.getBufferSize()]; out = new ByteArrayOutputStream(); try { microphone.flush(); microphone.start(); while (!done) { int numBytesRead = microphone.read(data, 0, data.length); if (numBytesRead != -1) { out.write(data, 0, numBytesRead); } else { break; } } microphone.stop(); out.flush(); } catch (IOException e) { e.printStackTrace(); } synchronized (lock) { lock.notify(); } } }
logger.info("DataStartSignal added"); try { audioLine.start(); while (!done) { Data data = readData(currentUtterance);
TargetDataLine mic = (TargetDataLine) AudioSystem.getLine(info); mic.open(audioFormat); mic.start(); input = new AudioInputStream(mic); } catch (LineUnavailableException e) {