Forum Discussion
ssRoundtable
6 years agoHonored Guest
Unable to access and utilize the microphone on the Quest to affect game objects in Unity
Hello,
I am trying to access the Quest (or GO) microphone to affect game objects or trigger events in Unity. I am able to use the microphone to make an object move on it's Y axis based on the loudness value of the microphone input when playing the unity editor. But, once I build my project and load it on the Quest or GO, it does not respond. It does show the mic as the selected device and it shows the Microhpone.isRecording to be true, but there is no change in the loudness value. View this recording to see what I'm talking about: https://drive.google.com/file/d/1XcV6vAeV5ITTlq1TAO_QSHCGJWyo0-di/view?usp=sharing
I do have "Can Own Microphone" enabled on the LocalAvatar as well.
Attached is the script I'm using to control the game object and microphone. And here is the android manifest I am using:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.roundtable.macys" xmlns:tools="http://schemas.android.com/tools" android:installLocation="auto">
<supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" android:anyDensity="true" />
<application android:theme="@StyLe/UnityThemeSelector" android:icon="@Mipmap/app_icon" android:label="@String/app_name">
<activity android:name="com.unity3d.player.UnityPlayerActivity" android:label="@String/app_name" android:screenOrientation="landscape" android:launchMode="singleTask" android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale|layoutDirection|density" android:hardwareAccelerated="false">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
</activity>
<meta-data android:name="unity.build-id" android:value="54caf677-6455-44f1-9ddc-a5a0c33548ad" />
<meta-data android:name="unity.splash-mode" android:value="0" />
<meta-data android:name="unity.splash-enable" android:value="False" />
</application>
<uses-feature android:glEsVersion="0x00020000" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MICROPHONE" />
<uses-feature android:name="android.hardware.microphone" android:required="true" />
<uses-feature android:name="android.hardware.touchscreen" android:required="false" />
<uses-feature android:name="android.hardware.touchscreen.multitouch" android:required="false" />
<uses-feature android:name="android.hardware.touchscreen.multitouch.distinct" android:required="false" />
<uses-feature android:name="android.hardware.vr.headtracking" android:required="true" android:version="1" />
</manifest>
Any help is greatly appreciated!
I am trying to access the Quest (or GO) microphone to affect game objects or trigger events in Unity. I am able to use the microphone to make an object move on it's Y axis based on the loudness value of the microphone input when playing the unity editor. But, once I build my project and load it on the Quest or GO, it does not respond. It does show the mic as the selected device and it shows the Microhpone.isRecording to be true, but there is no change in the loudness value. View this recording to see what I'm talking about: https://drive.google.com/file/d/1XcV6vAeV5ITTlq1TAO_QSHCGJWyo0-di/view?usp=sharing
I do have "Can Own Microphone" enabled on the LocalAvatar as well.
Attached is the script I'm using to control the game object and microphone. And here is the android manifest I am using:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.roundtable.macys" xmlns:tools="http://schemas.android.com/tools" android:installLocation="auto">
<supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" android:anyDensity="true" />
<application android:theme="@StyLe/UnityThemeSelector" android:icon="@Mipmap/app_icon" android:label="@String/app_name">
<activity android:name="com.unity3d.player.UnityPlayerActivity" android:label="@String/app_name" android:screenOrientation="landscape" android:launchMode="singleTask" android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale|layoutDirection|density" android:hardwareAccelerated="false">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
</activity>
<meta-data android:name="unity.build-id" android:value="54caf677-6455-44f1-9ddc-a5a0c33548ad" />
<meta-data android:name="unity.splash-mode" android:value="0" />
<meta-data android:name="unity.splash-enable" android:value="False" />
</application>
<uses-feature android:glEsVersion="0x00020000" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MICROPHONE" />
<uses-feature android:name="android.hardware.microphone" android:required="true" />
<uses-feature android:name="android.hardware.touchscreen" android:required="false" />
<uses-feature android:name="android.hardware.touchscreen.multitouch" android:required="false" />
<uses-feature android:name="android.hardware.touchscreen.multitouch.distinct" android:required="false" />
<uses-feature android:name="android.hardware.vr.headtracking" android:required="true" android:version="1" />
</manifest>
Any help is greatly appreciated!
8 Replies
- ApprovedAnonymousI also encountered this problem. If you turn on the microphone, you will get stuck. Have you solved it?
- ssRoundtableHonored GuestNope. Can't figure it out. I even switched to the OVRMicInput component included in the Oculus integeration. Same result. It works fine in the unity editor, but zero response when built and loaded on the GO or Quest.
- ssRoundtableHonored GuestTo further the confusion... if you load the demo scene from the Oculus Integration for LipSync, it works just fine. Meaning that somehow that example scene is accessing the mic. However, if you run the demo for voice modulation in the Oculus Integration, it does NOT work. I guess I'll have to hack the LipSync scripts to make them work. Unless someone from Oculus could actually chime in here.
- ssRoundtableHonored GuestOk, I have this working now by manipulating the LipSyncMicInput script. I just deleted all the other components. Not sure why that script works and the regular OVRMicInput script doesnt work though.
- aguirreduranExplorer
Hello, can you share the code with us, I have the same issue, I modified the LipSyncMicInput script but i had an empty list od Microphone devices
- ApprovedAnonymousThank you very much. It's helpful to me. Is OVRLipSyncMicInput the only one? Because I found that I also mounted OVRLipSyncContext and found the same problem.
- ApprovedAnonymousThank you very much. I've settled it.
- justin_luoHonored Guestcan you post your code for the updated LipSyncMicInput script? I'm having issues with mine, the main being that it seems like the built in microphone starts recording automatically
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 1 year ago
- 4 years ago