Introduction
VoicePatrol is a comprehensive voice moderation SDK that provides real-time analysis of voice communications in multiplayer games. It offers automated content moderation, age verification, player reporting, and voice analytics to create safer gaming environments.
Automatically detect harmful speech patterns, harassment, and inappropriate content
Estimate player age from voice samples for age-appropriate experiences
Capture audio evidence for manual moderation review
Analytics and insights from voice communications
Android, Windows, macOS, and Linux
Works with Vivox, Photon Voice, Dissonance, and custom solutions
Installation & Setup
Prerequisites
- Unity 2020.3 LTS or newer
- Target platforms: Android API 23+, Windows 10+, macOS 10.15+
- Microphone permissions on target platforms
- Internet access
Installation Steps
- Download the Package
- Download the VoicePatrol Unity package from your dashboard at dashboard.voicepatrol.dev - Import the Package
- Right-click in Unity Assets folder → Import
- Package → Custom Package...
- Select the VoicePatrol Unity package - Add to Scene
- Drag theVoicePatrol
prefab into your main/startup scene
- The prefab includes all necessary components and will persist across scenes - Configure Settings
- Select the VoicePatrol prefab in your scene
- In the Inspector, enter your API key from the VoicePatrol dashboard
- Configure optional features (Voice BI, Age Verification, Debug Logs)
Core Concepts
SDK Lifecycle
The VoicePatrol SDK follows a specific lifecycle pattern.
- Initialization: SDK starts and establishes server connections
- Muted State: SDK begins in muted state (no processing)
- Active State: SDK processes audio when unmuted
- Room Management: Optional room joining/leaving for context
- Shutdown: Proper cleanup when application closes
Audio Processing Pipeline
Microphone Input → Stream to Server → Audio Analysis → Violation Detection → Callback Events
Key Components
VoicePatrolWrapper: Main interface for all SDK operations
- Static methods for easy access from anywhere in your code
- Thread-safe event system for violation callbacks
- Automatic permission handling on Android
AudioCaptureProxy: Captures game audio for analysis
- Automatically attached to AudioListener components
- Captures mixed audio output for comprehensive monitoring
- Required for player reporting features
Permission Manager: Handles microphone permissions
- Automatic permission requests on Android
- Graceful degradation when permissions denied
- Platform-specific implementation
Install Guide
Video Guide (2 minutes)
Basic Integration (5 minutes)
1. Add the VoicePatrol prefab to your scene
2. Initialize in your game manager:
3. Handle muting based on your voice chat state:
4. Listen for violations:
Room Management
API Reference
VoicePatrolWrapper Static Methods
Initializes the VoicePatrol SDK
Parameters:
- token: Your VoicePatrol API key from the dashboard
- uniqueID: Optional custom user identifier (null = device ID)
- voiceBI: Optional flag to enable Business Intelligence tool
- ageVerification: Optional flag to enable age verification feature
- debugLogs: Optional flag to enable detailed debug logging
Returns: Status message indicating initialization result
Checks if the VoicePatrol SDK is currently running
Returns: True if SDK is running, false otherwise
Notifies the SDK when joining a multiplayer room
Parameters:
- roomId: The unique identifier for the room
Returns: Status message indicating room join result
Notifies the SDK when leaving a multiplayer room
Returns: Status message indicating room leave result
Stops the VoicePatrol SDK and releases resources
Returns: Status message indicating shutdown result
Do not call this unless explicitly required - instead, use SetMuted to control the state of VoicePatrol.
Toggles voice analysis and usage time incrementation
Parameters:
- value: True to mute, false to unmute
Returns: Status message indicating mute state change result
Setting the muted state is not computationally expensive - it simply sets an internal boolean flag that causes early returns in audio processing functions. You can call SetMuted() frequently without performance concerns.
Checks if VoicePatrol is currently muted
Returns: True if muted, false otherwise
Process a pre-recorded audio clip for testing or analysis
Parameters:
- audioClip: The audio clip to process
Returns: Status message indicating processing result
Audio clip must be uncompressed or load type set to Decompress On Load.
Submit the last 60 seconds of game audio as evidence for manual review
Parameters:
- reportedUniqueID: The unique identifier of the player being reported
Returns: Status message indicating whether the report submission started successfully
Attach custom JSON-serializable metadata (max 200 bytes) to audio submissions
Parameters:
- metadata: The JSON-serializable data
Returns: Status message indicating setting result
Example:
Event System
Violation Detection
Age Verification
Violation Labels
Voice Engine Integration
VoicePatrol works alongside your existing voice chat solution. The recommended approach is to check your voice engine's muted state once per second rather than every frame. Here are integration examples:
Advanced Features
Age Verification
When enabled, VoicePatrol analyzes the first 60 seconds of clear speech to estimate player age. The model returns specific age ranges: 0-5, 6-6, 7-7, 8-8, 9-11, 11-12, 13-15, 16-100.
Player Reporting System
Implement an evidence based reporting system:
How Player Reporting Works:
VoicePatrol continuously captures a rolling 60-second window of your game's mixed audio output - everything the player actually hears through their speakers or headphones. When SubmitPlayerReport() is called, it immediately uploads the last 60 seconds of captured audio as evidence.
This approach ensures reliable evidence collection because:
- No audio loss: Evidence is already captured before the report is made
- Complete context: Captures all audio the player heard, regardless of voice chat complexity
- Works with any setup: Proximity chat, team channels, spatial audio - if the player heard it, it's captured
The submitted audio file is tagged with the reported player's ID and sent for human moderation review in your dashboard.
Voice Business Intelligence
Track voice communication patterns and player sentiment:
Best Practices
Performance Optimization
Muting Logic - Check Voice Engine State Periodically
Setting the muted state is not computationally expensive - it simply sets an internal boolean flag that causes early returns in processing functions. Check your voice engine's muted state once per second rather than every frame:
Memory Management
Troubleshooting
Common Issues
Audio Clip Processing Fails.
Debug Information
Debug logs will show SDK initialization progress, audio device detection, age verification buffer status, player report uploads, and authentication issues. This information is essential for diagnosing microphone access problems, API key issues, and feature-specific troubleshooting.
Platform-Specific Notes
Android
- Requires API level 23 (Android 6.0) minimum
- Microphone permission automatically requested
- Supports ARM64 architecture
- Tested on various Android versions and devices
Windows/Mac/Linux
- No special permissions required
- Supports x64 architecture
- Tested with various audio drivers and hardware