From a731e8c181f928d527874519c5e2c9dc770f4114 Mon Sep 17 00:00:00 2001 From: "carlos.meng" <7754760+meng_zhengwei@user.noreply.gitee.com> Date: Sat, 14 Jun 2025 17:53:10 +0800 Subject: [PATCH] =?UTF-8?q?docs=20(audio):=20=E5=BD=95=E9=9F=B3=E5=88=A0?= =?UTF-8?q?=E9=99=A4gain=E6=8E=A5=E5=8F=A3=EF=BC=8C=E6=96=B0=E5=A2=9Egain?= =?UTF-8?q?=5Fset=E5=92=8Cgain=5Fget=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 旧的gain接口不推荐客户使用,删除描述,新增gain_set和gain_get接口的描述 固件版本: N/A 是否需要文案翻译: 否 --- en/medialib/audio.Record.md | 25 +++++++++++++++++++++++-- zh/medialib/audio.Record.md | 27 ++++++++++++++++++++++++--- 2 files changed, 47 insertions(+), 5 deletions(-) diff --git a/en/medialib/audio.Record.md b/en/medialib/audio.Record.md index 50ae724..2e1b76c 100644 --- a/en/medialib/audio.Record.md +++ b/en/medialib/audio.Record.md @@ -296,7 +296,7 @@ This method sets the callback function for the end of the recording. | 0 | Start playback | | 3 | Playback ends | -### Record.gain +### Record.gain_set ```python Record.gain(code_gain,dsp_gain) @@ -304,7 +304,7 @@ Record.gain(code_gain,dsp_gain) This method sets the recording gain. -> Currently, only the EC600N/EC800N series modules support this function. +> Currently, only the EC200N/EC600N/EC800N/EC600S/EG915N/EC600M/EC800M/EG810M/EG800P series modules support this function. **Parameter:** @@ -315,6 +315,27 @@ This method sets the recording gain. `0` - Successful execution; `-1`- Failed execution. +### Record.gain_get + +```python +Record.gain_get() +``` + +This method obtains the set recording gain. + +> Currently, only the EC200N/EC600N/EC800N/EC600S/EG915N/EC600M/EC800M/EG810M/EG800P series modules support this function. + +**Parameter:** + +No parameter. + +**Return Value:** + +The return value is a tuple, with the form of:`(code_gain, dsp_gain)` + +- `code_gain` - Integer type. Uplink codec gain. +- `dsp_gain` - Integer type. Uplink digital gain. + ### Record.amrEncDtx_enable ```python diff --git a/zh/medialib/audio.Record.md b/zh/medialib/audio.Record.md index dec73c1..c62161d 100644 --- a/zh/medialib/audio.Record.md +++ b/zh/medialib/audio.Record.md @@ -252,15 +252,15 @@ def cb(audio_msg): | 0 | 录音开始 | | 3 | 录音结束 | -### `Record.gain` +### `Record.gain_set` ```python -Record.gain(code_gain,dsp_gain) +Record.gain_set(code_gain,dsp_gain) ``` 该方法用于设置录音增益。 -> 目前仅EC600N/EC800N系列模组支持该功能。 +> 目前仅EC200N/EC600N/EC800N/EC600S/EG915N/EC600M/EC800M/EG810M/EG800P系列模组支持该功能。 **参数描述:** @@ -271,6 +271,27 @@ Record.gain(code_gain,dsp_gain) `0` 表示成功,`-1`表示失败。 +### `Record.gain_get` + +```python +Record.gain_get() +``` + +该方法获取设置的录音增益。 + +> 目前仅EC200N/EC600N/EC800N/EC600S/EG915N/EC600M/EC800M/EG810M/EG800P系列模组支持该功能。 + +**参数描述:** + +无参数 + +**返回值描述:** + +返回值是一个元组,返回值形式为:`(code_gain, dsp_gain)` + +- `code_gain` - 上行编解码器增益。 +- `dsp_gain` - 上行数字增益。 + ### `Record.amrEncDtx_enable` ```python -- Gitee