You need to enable JavaScript to run this app.
导航
StartVoiceTalk - 开始语音对讲
最近更新时间:2025.06.06 14:20:33首次发布时间:2022.11.01 17:47:37
我的收藏
有用
有用
无用
无用

开始语音对讲。
有关接入语音对讲功能的详细步骤,参考 语音对讲功能接入指南

请求说明

  • 请求方式:POST
  • 请求地址:https://open.volcengineapi.com?Action=StartVoiceTalk&Version=2021-01-01

调试

请求参数

下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数

参数
类型
是否必填
示例值
描述
Action
String

StartVoiceTalk

要执行的操作,取值:StartVoiceTalk。

Version
String

2021-01-01

API的版本,取值:2021-01-01。

SpaceID
String

ddc05158-8424-4318-bd56-ddbce4xxxxxx

空间 ID,可通过调用 ListSpaces 接口获取

DeviceNSID
String

34020036991320xxxxxx

设备国标 ID,可通过调用 ListDevices 接口获取

Transport
String

tcp

媒体流传输方式,可选项:

  • tcp(默认)
  • udp

返回参数

下表仅列出本接口特有的返回参数。更多信息请参见返回结构

参数
类型
示例值
描述
AudioSendUrl
String

wss://audio_host/audio_locationxxxx

WebSocket 音频推流地址

请求示例

POST /?Action=StartVoiceTalk&Version=2021-01-01&SpaceID=ddc05158-8424-4318-bd56-ddbce4xxxxxx&DeviceNSID=34020036991320xxxxxx HTTP/1.1
Host: open.volcengineapi.com
Content-Type: application/json; charset=UTF-8
X-Date: 20241216T045746Z
X-Content-Sha256: 287e874e******d653b44d21e
Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20241216/cn-beijing/aiotvideo/request, SignedHeaders=host;x-content-sha256;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f

{}

返回示例

{
  "ResponseMetadata": {
    "RequestId": "202412161257501741242400743287C3",
    "Action": "StartVoiceTalk",
    "Version": "2021-01-01",
    "Service": "aiotvideo",
    "Region": "cn-beijing"
  },
  "Result": {
    "AudioSendUrl": "zB"
  }
}

错误码

下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。

状态码
错误码
错误信息
说明
500
InternalError.VoiceTalkDeviceFail

The request is failed due to start voice talk failed: code is not 200. 500 {"message":"sip.requesterror: request failed with reason 'not found (code 404)'"}.

500
ServiceBusy

The request is failed due to service busy.

500
Busy.VoiceTalkDeviceBusy

The request is failed due to start voice talk failed: code is not 200. 500 {"message":"voice talk notfiy fail: result:error, reason:voice talk is busy"}.