语音消息

interface Voice {
    base64: null | string;
    length?: number;
    path: null | string;
    type: "Voice";
    url: null | string;
    voiceId: null | string;
}

Hierarchy

  • BaseSingleMessage
    • Voice

Properties

base64: null | string

语音的 Base64 编码

length?: number

返回的语音长度, 发送消息时可以不传

path: null | string

语音的路径,发送本地语音,路径相对于 JVM 工作路径(默认是当前路径,可通过 -Duser.dir=...指定),也可传入绝对路径。

type: "Voice"
url: null | string

语音的 URL,发送时可作网络语音的链接;接收时为腾讯语音服务器的链接,可用于语音下载

voiceId: null | string

语音的 voiceId,不为空时将忽略 url 属性

Generated using TypeDoc