VoiceReact
VoiceReact is a real-time voice detection system that lets game characters react to player speech. Perfect for horror games where enemies hear you scream, stealth games with voice-based detection, and voice-controlled gameplay mechanics.
Use Cases
Horror Games
- Monsters hunt players who make noise
- Enemies react to screams and shouts
- Create tension through forced silence
Stealth Games
- Guards detect voice and investigate
- Quiet speech for team coordination
- Volume-based detection ranges
Multiplayer
- Voice activity indicators
- Proximity-based voice detection
- Network voice state synchronization
Puzzle & Interactive
- Voice-controlled mechanics
- Volume-based triggers
- Speech detection puzzles
Key Features
Simple Integration
Add voice detection to your game in minutes. Three core components:
- VoiceReactController - Detects player speech
- VoiceListener - Makes enemies hear the player
- VoiceReactManager - Coordinates all listeners efficiently
Flexible Detection
Choose sensitivity presets or customize thresholds:
- Very Sensitive - Horror games, detect whispers
- Balanced - General gameplay
- Less Sensitive - Noisy environments, require clear speech
Performance Optimized
- Throttled listener updates (30Hz default)
- Skip updates when player is silent
- Efficient batch processing for 50+ listeners
Audio Source Options
- Unity Microphone - Built-in, works everywhere
- Dissonance VoIP - Use existing voice chat as input
- Custom Providers - Integrate any audio source
Networking Ready
Generic networking hooks work with:
- Netcode for GameObjects
- Mirror
- Photon (PUN2, Fusion)
- Fish-Net
- Any custom solution
Threading Safe
Background audio processing with automatic main thread marshalling for Unity API calls.
Quick Example
using Peek.VoiceReact;
using UnityEngine;
public class EnemyAI : MonoBehaviour
{
private VoiceListener listener;
void Start()
{
listener = GetComponent<VoiceListener>();
listener.OnPlayerHeard.AddListener(OnHeardPlayer);
}
void OnHeardPlayer(Vector3 position, float volume)
{
// Player made noise - investigate their location
Debug.Log($"Heard player at {position} with volume {volume} dB");
InvestigatePosition(position);
}
}System Requirements
- Unity 2021.3 or newer
- Windows, macOS, Linux, iOS, Android
- Microphone input device
- Optional: Dissonance VoIP for multiplayer voice chat integration
What’s Next?
- Installation - Get VoiceReact into your project
- Getting Started - First working example in 5 minutes
- Voice Detection - Configure detection sensitivity
- Voice Listeners - Make enemies hear the player
Last updated on