Is it Possible to use Java and send sounds through the microphone?

Is it Possible to use Java and send sounds through the microphone?
I mean like, if im in skype and i use STEREO MIX, i can actually send to the person whatever im hearing.

Is it possible to somehow, simulate my mic sound with java and make like, a soundboard with audios?

*Also, is it possible to use Libgdx for that?

You could probably receive microphone input through an API. However to send it so the other person can here it they would need your software downloaded and have that actively recieveing through wifi and then converting that data into sound. Could be done if you can find the api for the microphone

I just want to send some voices through the microphone with some audios i have.
To pretend its me speaking, but actually is just a .ogg or .mp3.

like this :

To hopefully it clear up where necessary:
You want to go between the mic, which turns acustic into digital information, and the program, Skype was your example, and either mix something into that input or replace it so that instead of the actual microphone input that modified/replaced input gets send to Skype?

Exactly.

Maybe you could somehow simulate your system a virtual microphone that takes input from your actual mic but outputs from a software and use this virtual mic as your Skype’s default microphone.
No idea how to do that though, sorry.

Im 100% sure it can be done with C++, but i dont know C++.
Im searching for some API to work with.

I think i have two options :

A) Create a virtual microphone like ManyCam Does

B)Hack the Driver/Audio somehow and replace the data ?

A) Well, maybe.
B) If the word “somehow” occurs you should probably not

Anyone have any ideas?

I don’t know how but, if there is a way I’d expect you to find it in one of these websites:

http://docs.oracle.com/javase/tutorial/sound/sampled-overview.html
http://www.jsresources.org/index.html

Why do you want to do this in java? If you want to create a soundboard, thats easy enough by just implementing sound playing when pressing on buttons. But simulating a microphone in java is not directly possible.

Just use the existing skype/os feature or google and install “virtual audio devices” to wire up a mixer.

An application that does that is “Scramby”. It creates a fake virtual microphone, which you can set as a microphone. It mainly used to distort your own voice kidnapper style.

maybe you can just play straight sounds too.
Other than that set recording device stereo mix or even line in

the main question is why do you need it, what exactly for and why do you want to program this, instead of using existing software ?

I’m still stuck at the concept of using a microphone for playback. Am I missing something? I can’t imagine that even if the mic line could be manipulated, the physical microphone itself could make an audible sound. Shall we also discuss using speakers as microphones? (Or maybe the NSA/CIA already do this… :persecutioncomplex: )

That was a joke.

Either the whole statement was the joke or you did absolutely not get what this is about. What is it?

Using speakers as microphones is actually possible and as easy as just connecting the speaker to the mic input…

If mics would produce sound if connected to a speaker out would probably depend on the type of mic – and of course on the wattage you try to put through ;D

You’re understanding it wrong philfrei, I did too, he just wants a virtual microphone and play sounds there
As in someone connects to you via skype, you can your virtual mic selected and instead of your voice you load in sound effects

Your answer is here: http://stackoverflow.com/questions/9115444/how-can-i-create-virtual-microphone-driver-by-using-java

I also don’t see any wrappers on a quick google search, you’ll have to make a JNI wrapper for something like this yourself.

Spam?

http://www.overclock.net/t/758794/virtual-microphone-software

Before making comments like that, use google and search/download manycam software.

“I can’t imagine that even if the mic line could be manipulated, the physical microphone itself could make an audible sound”

This is going to my signature.

I think your overreaction is far more face-palm worthy considering it was just a misunderstanding.

srsly.
dont you think “send sounds through the microphone” sounds like a microphone acting like speaker, starting to talk ?
Most people understood it like that :stuck_out_tongue: