> ## Documentation Index
> Fetch the complete documentation index at: https://cometchat-22654f5b-docs-skills-v5-temp.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Sound Manager

> Manage CometChat Flutter UI Kit sounds for incoming and outgoing messages, calls, custom audio, playback, and stop controls.

<Accordion title="AI Integration Quick Reference">
  | Field   | Value                                                                                                                        |
  | ------- | ---------------------------------------------------------------------------------------------------------------------------- |
  | Package | `cometchat_chat_uikit`                                                                                                       |
  | Import  | `import 'package:cometchat_chat_uikit/cometchat_chat_uikit.dart';`                                                           |
  | Purpose | Manage CometChat Flutter UI Kit sounds for incoming and outgoing messages, calls, custom audio, playback, and stop controls. |
  | Related | [Events](/ui-kit/flutter/events)                                                                                             |
</Accordion>

## Overview

The `SoundManager` is a helper class responsible for managing and playing various types of audio in the CometChat V6 UI Kit. This includes sound events for incoming and outgoing messages and calls.

## Methods

### Play Sound

The SoundManager plays pre-defined or custom sounds based on user interactions with the chat interface.

<Tabs>
  <Tab title="Dart">
    ```dart theme={null}
    // Play default sounds:
    SoundManager().play(sound: Sound.incomingMessage);
    SoundManager().play(sound: Sound.outgoingMessage);
    ```
  </Tab>
</Tabs>

### Stop Sound

Stop any sound currently being played:

<Tabs>
  <Tab title="Dart">
    ```dart theme={null}
    SoundManager().stop();
    ```
  </Tab>
</Tabs>

## Usage

Play a custom sound:

<Tabs>
  <Tab title="Dart">
    ```dart theme={null}
    SoundManager().play(sound: Sound.outgoingMessage, customSound: "assetPath");
    ```
  </Tab>
</Tabs>

## Sound Enum Reference

| Sound                    | Asset                              |
| ------------------------ | ---------------------------------- |
| incomingMessage          | assets/sound/incoming\_message.wav |
| outgoingMessage          | assets/sound/outgoing\_message.wav |
| incomingMessageFromOther | assets/sound/incoming\_message.wav |
| outgoingCall             | assets/sound/outgoing\_call.wav    |
| incomingCall             | assets/sound/incoming\_call.wav    |

<Note>
  In V6, the `CometChatConversations` widget provides `disableSoundForMessages` and `customSoundForMessages` properties to control sound behavior at the widget level.
</Note>
