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

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:

[quote]dont you think “send sounds through the microphone” sounds like a microphone acting like speaker, starting to talk ?
Most people understood it like that Tongue
[/quote]
That is what I was thinking when I wrote that. It’s not entirely far-fetched as a possibility. I think a couple others also noted that the microphone can be made to vibrate and make a signal, although it isn’t very efficient. I have a vague memory of hearing this done once on some crude equipment. And Java has some capabilities about identifying and accessing different lines.

I wasn’t intending to be sarcastic, except maybe to poke at some folks that actually do think we are being taped via our speakers by the government. I’ve run across a few people like that.

I clicked an appreciation for Cero earlier for explaining the question. Thanks again.

Ah well, not every post is a success. I’ll accept a face palm.

It’s probably not going to help in this particular case, but you could make use of JACK. However, it’s designed for pro-audio so on Windows it will only work with software using ASIO. On OSX it should do this job fine - software like SoundPimp uses it for a similar purpose in Java. Works on Linux too, though PulseAudio (so JavaSound) also allows this for “consumer” software.

I’m the author of the Java bindings for JACK. If you’re interested you can find them at https://github.com/jaudiolibs/ along with a range of other audio libraries. More info about JACK, Java and the JAudioLibs audioservers at http://praxisintermedia.wordpress.com/2013/11/06/jaudiolibs-audioservers-a-portaudio-esque-java-api/

Not far-fetched at all - see http://youtu.be/JbIiUYf7oYM You can also do the reverse.

That’s cool. Never tried that.
However when I was young I plugged a headphone in my mic in port and tried it. You had to yell but it works.
Although I would think that both reverse method damage the hardware, since your are forcing the membrane to do something its not designed for… but maybe I’m wrong and its just natural induction or something

Using a speaker or headset in an unpowered microphone jack does not harm it. Dont know about phantom powered iinputs. Using a microphone as speaker probably would harm it.

oh wait … this one goes in your mouth …