2

I'm working on a little science project, and I really want to record audio from an audio input and a program running on my computer, how to do this in Java? It would be awesome if the bit rate for example is customizable somehow. Files like .mp3 or similar would be awesome, it shouldn't be a problem if it's any different file type, because it could be converted.

I've heard about a Java Sound API but I don't really get how to really record audio with this API.

Thanks in advance, Tim Visée

Tim Visée
  • 2,988
  • 4
  • 45
  • 55
  • 2
    you can see: http://docs.oracle.com/javase/tutorial/sound/capturing.html - capturing audio; and http://stackoverflow.com/questions/4826169/record-voice-with-java, to record input from a microphone. – sissi_luaty Mar 06 '13 at 14:20
  • I will take a look at it really quick. One quick question, is it possible to record audio from a program with the methods you send in your first link? – Tim Visée Mar 06 '13 at 14:23
  • 1
    That's more difficult, and I don't know how to do that and if it's possible with those methods... sorry! – sissi_luaty Mar 06 '13 at 14:25
  • Ok np, thanks for your solution anyway ;) – Tim Visée Mar 06 '13 at 14:26
  • 1
    No, it is not possible to record audio from a program in Java, although you might get it to work ons some platforms. Check out http://www.jsresources.org/ for more sample code. – Bjorn Roche Mar 06 '13 at 17:33
  • I think it's probably that I've to use something like native coding for my audio card, but that's too much work for the project haha. – Tim Visée Mar 06 '13 at 19:10

0 Answers0