Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes I/O and Streams and the fly likes Detecting sound from microphone using Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "Detecting sound from microphone using Java" Watch "Detecting sound from microphone using Java" New topic
Author

Detecting sound from microphone using Java

Chris Chan
Greenhorn

Joined: Jul 10, 2013
Posts: 3

Hello there!

I'm running this simple code that simply listens to my microphone and prints out bytes.

Problem:
It listens to the microphone for any changes correctly on
java version "1.6.0_43"

but it doesn't listen to the microphone for any changes correctly on
java version "1.7.0_25"

Both version compile and run fine.

Example Output using Java 1.6
5172 1
5196 2
5103 3
2859 4
2549 5
2742 6
3112 7
5028 8
4515 9
3856 10
5189 11
5080 12
5165 13
4925 14

When it drops down to around 2500 that's when there was sound going into the microphone.

Example Output using Java 1.7
5652 1
5655 2
5699 3
6081 4
6213 5
5972 6
5907 7
5828 8
5931 9
6187 10
6015 11
5949 12
6196 13

It no longer detects any noise from the microphone.




Any ideas?
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4523
    
    5

Please BeForthrightWhenCrossPostingToOtherSites <- link


luck, db
There are no new questions, but there may be new answers.
Chris Chan
Greenhorn

Joined: Jul 10, 2013
Posts: 3
Darryl Burke wrote:Please BeForthrightWhenCrossPostingToOtherSites <- link


Sure no problem,

http://www.javaprogrammingforums.com/file-i-o-other-i-o-streams/30388-detecting-sound-microphone-using-java-issue-specific-java-versions.html#post117343

http://www.java-forums.org/new-java/79985-detecting-sound-microphone-using-java-issue-java-versions.html#post346338

http://www.dreamincode.net/forums/topic/324610-detecting-sound-from-microphone-using-java-issue-with-java-versions/

http://forums.devshed.com/java-help-9/detecting-sound-from-microphone-using-java-issue-with-java-versions-948331.html

http://stackoverflow.com/questions/17582460/detecting-sound-from-microphone-using-java-issue-with-java-versions
Chris Chan
Greenhorn

Joined: Jul 10, 2013
Posts: 3
Solved,

The issue wasn't with Java versions, I'm not sure what went wrong but it works fine after I reinstalled my audio drivers.

Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Detecting sound from microphone using Java
 
Similar Threads
How to convert a text into an audio file?
Problem~~
Java Sound distorted/choppy/repeating on playback
Applet not working
Quit audio before application exits.