- Home /
Microphone.GetComponent () not working + Microphone.devices empty?
I'm trying to get my Unity game to take voice commands as input. I'm trying to load in a microphone to record, but it is not working.
I declare my AudioSource and use GetComponent (). I then list through Microphone.devices to get the names of all available mics, but none exist.
Before I start the microphone recording, I use Microphone.Stop() to ensure that is isn't doing anything beforehand. When my game hits this code, it hangs forever. I believe that my AudioSource isn't looking at anything, so when I call Stop() it infinitely hangs.
I've ensured that my Unity settings allow audio settings. Does anyone know anything about this?
Lastly, Unity should be able to see at least 2 microphones. Both these microphones are listed in windows devices. Perhaps Unity doesn't have permissions to access?
Let me know, JP