# IVoiceManager > Manages voice players and provides sound playback capabilities. `gg.lode.amplifierapi.api.manager.IVoiceManager` --- ## Signature ```java public interface IVoiceManager ``` --- ## Methods ### cleanup ```java void cleanup() ``` Cleans up voice manager resources. --- ### fetchOrCreateVoicePlayer ```java CompletableFuture<IVoicePlayer> fetchOrCreateVoicePlayer(Player player) ``` Fetches or creates voice player data for the given player. Returns asynchronously. | Parameter | Type | Description | |---|---|---| | `player` | `Player` | The player to fetch voice data for. | **Returns:** `CompletableFuture<IVoicePlayer>` — A future that resolves to the voice player. --- ### getVoicePlayer (by UUID) ```java @Nullable IVoicePlayer getVoicePlayer(UUID uniqueId) ``` Retrieves voice player data by UUID. | Parameter | Type | Description | |---|---|---| | `uniqueId` | `UUID` | The player's unique ID. | **Returns:** `IVoicePlayer` — The voice player, or `null` if not found. --- ### getVoicePlayer (by Player) ```java @Nullable IVoicePlayer getVoicePlayer(Player player) ``` Retrieves voice player data for an online player. | Parameter | Type | Description | |---|---|---| | `player` | `Player` | The online player. | **Returns:** `IVoicePlayer` — The voice player, or `null` if not found. --- ### isEnabled ```java boolean isEnabled() ``` Returns whether the voice manager is currently enabled. **Returns:** `boolean` — `true` if enabled. --- ### setEnabled ```java void setEnabled(boolean enabled) ``` Enables or disables the voice manager. | Parameter | Type | Description | |---|---|---| | `enabled` | `boolean` | `true` to enable. | --- ### playSound ```java void playSound(Location location, byte[] data) void playSound(Location location, byte[] data, float volume) void playSound(Location location, byte[] data, float volume, float distance) void playSound(Location location, byte[] data, float volume, float pitch, float distance) ``` Plays 16-bit PCM audio data at a world location. Overloads allow specifying volume, pitch, and audible distance. | Parameter | Type | Description | |---|---|---| | `location` | `Location` | The world location to play the sound at. | | `data` | `byte[]` | Raw 16-bit PCM audio data. | | `volume` | `float` | Volume multiplier. | | `pitch` | `float` | Pitch multiplier. | | `distance` | `float` | Maximum audible distance. | --- ### resetPlayer ```java CompletableFuture<Void> resetPlayer(Player player) ``` Resets all voice properties for a player back to defaults. Returns asynchronously. | Parameter | Type | Description | |---|---|---| | `player` | `Player` | The player to reset. | **Returns:** `CompletableFuture<Void>` — A future that completes when the reset is done. --- ### resetAll ```java CompletableFuture<Void> resetAll() ``` Resets all voice player data for every player. **Returns:** `CompletableFuture<Void>` — A future that completes when all players have been reset. --- ## Related Pages - [[IAmplifierAPI]] — Access via `getVoiceManager()` - [[IVoicePlayer]] — Individual voice player data