From 29b8be0b4b8e9d33f0cdb34bd3db0b0143c9f87a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jimmy=20Luo=28=E7=BD=97=E6=9D=A8=E6=9D=A8=29?= Date: Fri, 20 May 2022 16:54:59 +0800 Subject: [PATCH] update audio(audio_record()) --- en-us/api/QuecPythonClasslib.md | 13 +++++++++---- zh-cn/api/QuecPythonClasslib.md | 12 +++++++++--- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/en-us/api/QuecPythonClasslib.md b/en-us/api/QuecPythonClasslib.md index e7533eb..9905603 100644 --- a/en-us/api/QuecPythonClasslib.md +++ b/en-us/api/QuecPythonClasslib.md @@ -3872,22 +3872,27 @@ Note: The BC25PA platform does not support this module function. > **import audio** > -> **record = audio.Record()** +> **record = audio.Record(device)** + +Without parameter, the handset is used for playback by default; with parameter, the playback device is set as parameter. + +Note: with parameter, the parameter should be the same as that set by audio.audio(). * Parameter - * None +| Parameter | Parameter Type | Description | +| --------- | -------------- | ------------------------------------------------------------ | +| device | int | Output channel
0 - handset
1 - earphone
2 - speaker | * Return Value * 0 Successful execution * -1 Failed execution - * Example ```python import audio -record_test = audio.Record() +record_test = audio.Record()#Without parameter, use the handset to play ``` diff --git a/zh-cn/api/QuecPythonClasslib.md b/zh-cn/api/QuecPythonClasslib.md index fd21f32..6fdf9bd 100644 --- a/zh-cn/api/QuecPythonClasslib.md +++ b/zh-cn/api/QuecPythonClasslib.md @@ -4393,11 +4393,17 @@ dial_play_ec600u() > **import audio** > -> **record = audio.Record()** +> **record = audio.Record(device)** + +不带参数时,默认使用听筒播放;带参数时,设置播放的设备。 + +注意:带参数时,参数应与audio.audio()设置的参数一致。 * 参数 - 无 +| 参数 | 参数类型 | 参数说明 | +| ------ | -------- | ----------------------------------------------- | +| device | int | 输出通道
0 - 听筒
1 - 耳机
2 - 喇叭 | * 返回值 @@ -4407,7 +4413,7 @@ dial_play_ec600u() ```python import audio -record_test = audio.Record() +record_test = audio.Record()#不传参数,使用听筒播放 ```