Voiceover
The VoiceOverPlugin provides functionality for managing voice-over audio in a dill-pixel application. It handles playing, pausing, resuming and stopping voice-over audio with support for localization and queueing.
Core Features
1. Voice-over Queue Management
The plugin maintains two queues:
_queue
: Active voice-over queue_pausedQueue
: Queue for paused voice-overs
2. Play Modes
Supports three play modes:
-
append
: Adds voice-over to end of queue -
override
: Stops current and plays new if priority is >= current -
new
: Only plays ifpriority
>current.priority
3. Localization Support
The plugin supports localization by loading locale-specific voice-over files.
Key Methods
Playing Voice-overs
Control Methods
Events/Signals
The plugin emits signals for various voice-over states:
Auto-cleanup
The plugin automatically handles cleanup in these scenarios:
- Scene changes
- When stopping voice-overs
Integration Example
Here’s how to integrate voice-over controls in a scene:
Error Handling
The plugin includes comprehensive error handling and logging:
- Skips duplicate voice-overs Handles priority conflicts
- Manages early completion scenarios
- Provides detailed logging in development mode
Best Practices
- Handle localization through options rather than manually appending locale codes
- Clean up signal connections when destroying scenes
- Use priority system for managing voice-over interruptions
- Implement proper UI feedback for voice-over states (e.g., updating pause/resume button text)
Captions Integration
Voiceovers in dill-pixel can be paired with captions. See the Captions documentation for more information.