## uni.getRecorderManager()
獲取全局唯一的錄音管理器 recorderManager。
**recorderManager 對象的方法列表**

**start(options) 說明**

其中,采樣率和碼率有一定要求,具體有效值如下:

**onStop(callback) 回調結果說明**

onFrameRecorded(callback) 回調結果說明

onError(callback) 回調結果說明

**示例**
```
<template>
<view>
<button @tap="startRecord">開始錄音</button>
<button @tap="endRecord">停止錄音</button>
<button @tap="playVoice">播放錄音</button>
</view>
</template>
const recorderManager = uni.getRecorderManager();
const innerAudioContext = uni.createInnerAudioContext();
innerAudioContext.autoplay = true;
export default {
data: {
text: 'uni-app',
voicePath: ''
},
onLoad() {
let self = this;
recorderManager.onStop(function (res) {
console.log('recorder stop' + JSON.stringify(res));
self.voicePath = res.tempFilePath;
});
},
methods: {
startRecord() {
console.log('開始錄音');
recorderManager.start();
},
endRecord() {
console.log('錄音結束');
recorderManager.stop();
},
playVoice() {
console.log('播放錄音');
if (this.voicePath) {
innerAudioContext.src = this.voicePath;
innerAudioContext.play();
}
}
}
}
```