Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question Help Needed: Unity Audio Output to Microphone Issues and Alternative Solutions

Discussion in 'Audio & Video' started by JamBurFox, Apr 29, 2023.

  1. JamBurFox

    JamBurFox

    Joined:
    Apr 2, 2018
    Posts:
    2
    Hey everyone,

    Just posting this as I'm in need of some assistance / guidance with Unity audio. To summarize, my aim is to output audio directly into the microphone.

    Initially, I used audio routing software like VoiceMeeter to route Unity's output into the microphone. However, this method presented some issues. I discovered that Windows program-specific default devices were not compatible with Unity. Whenever I tried to set the default output device for this specific Unity application, it would reset it back to the system default device upon reloading. Despite displaying the same (wrong) device, I had to switch it between another device and back during runtime to make it work. As this process is highly inconvenient, I am seeking an alternative solution.

    I attempted this on three different computers, and they all had the same issue. Thus, I assume this is an engine issue that I am unable to modify.

    And for the other options I am considering but have been unable to resolve:
    • The ability to choose the output device directly in Unity, allowing me to incorporate a dropdown where the user can select their desired output device.
    • The ability to output audio directly from Unity into the microphone, allowing me to bypass audio routing altogether.

    I have investigated all of these possibilities but have been unable to locate a solution. If anyone can offer guidance or suggest other alternative solutions to my goal, I would be very grateful.

    Thank you for your attention :)
     
  2. SeventhString

    SeventhString

    Unity Technologies

    Joined:
    Jan 12, 2023
    Posts:
    305
    Hi @JamBurFox ,

    It's my sad duty to tell you that Unity can't do this. In its current state, you can't even select the output device at all (whether by code or project settings, etc). It will always go to the system default output. Internally we're looking at our options to improve this.

    Then, faking Unity's audio output as microphone input for other devices is even more out of reach, as it would be a really specialized audio feature from a software that would be able to expose virtual microphone devices to the system. It is unlikely, to say the least, that Unity will ever develop such a feature, as the main goal of the Editor is to offer every feature for every platform. I (am 100% certain) doubt that we'll every get into this because of the challenge it would represent to research and integrate this on Windows, Mac, Linux, XBox, PlayStation, Switch, Android, iOS, etc...

    If you every get this to work within Unity for at least Windows, Mac & Linux, please reach out to me as I would be super interested to see how you did it, and probably be really impressed with your perseverance on such a tough ask.

    Cheers
     
  3. JamBurFox

    JamBurFox

    Joined:
    Apr 2, 2018
    Posts:
    2
    Ahh, that's too bad to hear. I was under the impression that this was out of Unity's capability, but just wanted to check with the community to see if anyone had solutions I haven't thought of.

    I can still achieve this effect with virtual audio cables. I just need to do a bit of manual setup each time I launch the application, which I was hoping I could avoid by handling this inside unity.

    But anyway, thanks for the response :)
     
    SeventhString likes this.