Installation
VoiceReact is distributed as a Unity package. Follow the steps below to install it in your project.
Prerequisites
- Unity 2021.3 or newer
- A microphone input device for testing
Installation Steps
1. Import VoiceReact Package
Import the VoiceReact .unitypackage file into your Unity project:
- Open your Unity project
- Go to Assets > Import Package > Custom Package
- Select the VoiceReact package file
- Click Import in the import dialog (import all files)
VoiceReact will be installed to Assets/VoiceReact/.
2. Verify Installation
Check that VoiceReact installed correctly:
- Look for Tools > VoiceReact in the Unity menu bar
- You should see menu items:
- Quick Setup Scene
- Control Panel
- Welcome Window
If you see these menu items, VoiceReact is installed successfully.
3. Quick Setup (Recommended)
The fastest way to set up a scene:
- Go to Tools > VoiceReact > Quick Setup Scene
- This automatically adds:
- VoiceReact Manager (required coordinator)
- VoiceReact Controller on your player (voice detection)
- Configures everything with sensible defaults
You’re ready to use VoiceReact.
Manual Setup
If you prefer manual setup or need custom configuration:
Add VoiceReact Manager
The manager is required for VoiceReact to function:
- Create an empty GameObject in your scene
- Name it “VoiceReact Manager”
- Add the VoiceReactManager component
- Leave all settings at defaults (they’re already optimized)
Add Player Voice Detection
Add voice detection to your player:
- Select your player GameObject
- Add the VoiceReactController component
- This automatically adds the required MicrophoneInputHandler component
- Configure detection preset (default: Balanced)
Add Listener to Enemy
Make an enemy hear the player:
- Select an enemy GameObject
- Add the VoiceListener component
- Set Base Hearing Range (e.g., 10 meters)
- Hook the OnPlayerHeard event to your AI script
Optional Components
Dissonance Integration
If you’re using Dissonance VoIP for multiplayer voice chat:
-
Add the scripting define symbol VOICEREACT_DISSONANCE:
- Go to Edit > Project Settings > Player
- Expand Other Settings
- Find Scripting Define Symbols
- Add
VOICEREACT_DISSONANCE - Click Apply
-
On your MicrophoneInputHandler:
- Set Provider Type to Dissonance
- Assign your DissonanceComms component reference
-
VoiceReact will now use Dissonance’s microphone input instead of Unity’s built-in Microphone API
This lets you use the same microphone input for both voice chat and gameplay mechanics.
Project Settings
VoiceReact includes project-wide defaults that apply to all components:
- Go to Edit > Project Settings > VoiceReact
- Configure default settings:
- Default microphone device
- Sample rate (16000 Hz recommended)
- Detection presets
- Listener hearing ranges
- Logging verbosity
All new VoiceReact components will inherit these defaults, saving you configuration time.
Microphone Permissions
Standalone (Windows/Mac/Linux)
Unity automatically requests microphone permission. No special setup needed.
Mobile (iOS/Android)
Add microphone permission to your project:
iOS:
- Go to Edit > Project Settings > Player > iOS > Other Settings
- Add to Microphone Usage Description:
This game uses your microphone for voice-reactive gameplay mechanics.
Android:
- Go to Edit > Project Settings > Player > Android > Other Settings
- Ensure Microphone is checked under Required Permissions
Verification
Test your installation:
- Enter Play mode
- Check the Console for VoiceReact initialization logs
- Speak into your microphone
- You should see:
- VoiceReact Manager initialization
- MicrophoneInputHandler starting
- Voice detection when you speak
If you see errors, check:
- VoiceReactManager exists in scene
- Microphone device is connected
- Microphone permissions are granted
Troubleshooting
”VoiceReactManager is REQUIRED but not found”
You need to add VoiceReactManager to your scene:
- Use Tools > VoiceReact > Quick Setup Scene, or
- Manually add it following steps above
”No microphone devices available”
Check that:
- A microphone is connected to your computer
- Microphone permissions are granted (especially on macOS)
- No other application is exclusively using the microphone
”Multiple instances detected”
You have more than one VoiceReactManager in the scene. There should only be one per scene.