Mic Input for everyone

This project is no longer being developed (as open source):
However the latest open source build is still available on the wiki and you are free to use code however you want. Note that the wiki version still contains memory leaks, bugs and other un-optimized parts:
http://wiki.unity3d.com/index.php/Mic_Input

The new closed source version, which is completely renewed and up to date can be found here:

Thank you very much for your contribution. :slight_smile:

nice work you have there, you do have some issues with your script but that can be easily fixed :slight_smile: try going over your script again and optimizing it

Could you be more specific? Aside from some grammar mistakes i did not notice any errors, the script is running as supposed to on my system.

Alright so the first part is:

if(Microphone.IsRecording)

And it should look like this:

if (Microphone.IsRecording(null))

In you script you haven’t told the script what microphone it needs to look for, since I set it to null, it looks for the default microphone.

http://docs.unity3d.com/Documentatio...Recording.html

As you see in that documentation at the top it states;
static bool IsRecording(string deviceName);

You haven’t input the string into your script.

Try searching for other things, I am currently in the process of converting your scrip to C# and optimizing it. you did a good job, just look over your script and make sure everything works how the scripting reference is

It is meant to only use the default mic. The ref reads that if you leave it blank it will always point out to the default input device, which is what needs to be used in order to pull the data in. But since you took the trouble pointing it out i’l give it a spin and look in the profiler for any difference in memory/performance. I tested it on different machines and on all devices the default mic is selected as planned. If I disable all my mic inputs it will stop the script as planned. When I disable the default mic it automatically switches to the next one available, because the OS sets it up that way.

But thx for converting it, good luck, i’l search for the other hick ups you hinted at and update the wiki page accordingly.

Edit: Quote from the ref “Passing null or an empty string will pick the default device”. so writing null or nothing will be the same. It will select the default.

Edit:
You where right, there was a script killing bug, thx! fixed it. I searched the docs thoroughly and there is no need to add the null function. The script now runs perfectly I will update the wiki. I’l also expand the script to let the user choose its device.

I fixed the bugs and expended the functionality of the script, with manual device selection and error logging.

You helped me allot by just letting me re-watch my own script, so i put credits for your help on the wiki page.
Thx.

greetings