---
title: "RecorderManager - Get the globally unique recorder manager"
---

## RecorderManager

### Description

Get the globally unique recorder manager

### Demo

<div style="display: flex; flex-direction: row; align-items: center; padding: 16px; background: #f9f9f9; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.05);">
    <img src="https://github.com/Tuya-Community/tuya-miniapp-demo/raw/master/qrCode/recorder.png?raw=true" style="width: 100px; height: 100px; border-radius: 8px; border: 1px solid #e8e8e8; box-shadow: 0 2px 4px rgba(0,0,0,0.1);"/>
    <div style="margin-left: 24px;">
        <div style="color: #262626; font-size: 16px; font-weight: 600; margin-bottom: 12px;">Scan with the Smart Life app to try it out</div>
        <a href="https://github.com/Tuya-Community/tuya-miniapp-demo/tree/master/recorderManager" style="font-size: 14px; color: #1890ff; text-decoration: none; display: inline-flex; align-items: center;">
            <span>Demo download URL</span>
            <span style="margin-left: 4px;">→</span>
        </a>
    </div>
</div>

### FAQ

#### Q: How should I configure encodeBitRate?

A: The supported encodeBitRate ranges for different sample rates are:

| Sample rate | Encode bit rate range |
| ------- | ---------------- |
| 8000Hz  | 16000~48000 bps  |
| 11025Hz | 16000~48000 bps  |
| 12000Hz | 24000~64000 bps  |
| 16000Hz | 24000~96000 bps  |
| 22050Hz | 32000~128000 bps |
| 24000Hz | 32000~128000 bps |
| 32000Hz | 48000~192000 bps |
| 44100Hz | 64000~320000 bps |
| 48000Hz | 64000~320000 bps |

Notes:

1. Invalid combinations of sample rate and encode bit rate will cause recording to fail. Configure values strictly according to the table above
2. Higher sample rates and encode bit rates are recommended for better audio quality
3. Higher encode bit rates produce larger file sizes. Choose appropriate parameters according to your actual needs

#### Q: How should I configure the input source specified by audioSource?

A: audioSource is used to specify the input source for recording and supports the following values:

iOS platform:

- auto: Automatically select the input source (default)
- buildInMic: Built-in phone microphone
- headsetMic: Wired headset microphone

Android platform:

- auto: Automatically select the input source (default)
- mic: Microphone (phone microphone or headset microphone)
- camcorder: Suitable for audio/video recording
- voice_communication: Suitable for real-time calls
- voice_recognition: Suitable for speech recognition

Recommendations:

1. It is recommended to use the default value auto, which adapts automatically to various scenarios
2. Support for input sources may vary across devices and OS versions
3. Thoroughly verify compatibility on target devices during development and testing
