This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Beginning Java and the fly likes Java Media Audio (Record sound Example) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Java Media Audio (Record sound Example)" Watch "Java Media Audio (Record sound Example)" New topic
Author

Java Media Audio (Record sound Example)

Ackshat Sharma
Greenhorn

Joined: Sep 03, 2011
Posts: 22
Can anyone here tell me the example of how to record sound from a microphone or other device using java? I searched on Google but there is no example as such provided . please help
dennis deems
Ranch Hand

Joined: Mar 12, 2011
Posts: 808
Have a look at the Java Sound API. http://download.oracle.com/javase/6/docs/api/javax/sound/sampled/package-summary.html
Ackshat Sharma
Greenhorn

Joined: Sep 03, 2011
Posts: 22
@Dennis , It will be easy to understand a pre-written example code , I already checked all documents on oracle and other forums even here on javaranch (copy paste that code shows a no. of errors(cannot resolve) on an IDE like Myeclipse and netbeans), so please if your have done this earlier paste your example code... Thanks a lot
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38472
    
  23
And welcome to the Ranch
Ackshat Sharma
Greenhorn

Joined: Sep 03, 2011
Posts: 22
getting a desired reply will be a warm welcome.
Tina Smith
Ranch Hand

Joined: Jul 21, 2011
Posts: 171
    
    5

The Java Sound Demo has example code to play and record sound clips. And no, it's not the easiest library to work with. But at least it's more flexible than the Clip class (for playing sound).

http://www.oracle.com/technetwork/java/index-139508.html


Everything is theoretically impossible, until it is done. ~Robert A. Heinlein
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38472
    
  23
Ackshat Sharma wrote:. . . It will be easy to understand a pre-written example code . . .
Disagree. It usually takes a lot of effort to understand pre-written code. And we don’t supply ready-made code.
Ackshat Sharma
Greenhorn

Joined: Sep 03, 2011
Posts: 22
Thanks Mr. Campbell, fully agree with you but I said "pre-written code example" an example is meant to be understand which is short and simple showing simplest implementation, and ofcourse Mr. Campbell it is difficult to understand a pre-written code which is not an example .
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java Media Audio (Record sound Example)