播放文字转语音(TTS)
controller-event-play
指令简介
voice支持:
Cherry、Serena、Ethan、Chelsie、Momo、Vivian、Moon、Maia、Kai、Nofish、Bella、Jennifer、
Ryan、Katerina、Aiden、Mia、Mochi、Bellona、Vincent、Bunny、Neil、Elias、Arthur、Nini、
Ebona、Seren、Pip、Stella、Bodega、Sonrisa、Alek、Dolce、Sohee、Ono_Anna、Lenn、Emilien、
Andre、Radio_Gol、Jada、Dylan、Li、Marcus、Roy、Peter、Sunny、Eric、Rocky、Kiki
TTS调用次数说明:
1.每台设备默认享有 1000次 免费TTS调用额度,该额度由我方统一付费调用千问接口提供。
2.超出额度后,如需继续使用,请自行开通千问(通义千问)服务,获取专属AppID和密钥,后续我们将提供接口,用户可配置替换对应参数,恢复TTS调用。
3.设置次数限制旨在合理分配资源,避免因个别滥用影响整体服务稳定性,感谢您的理解与配合。
向设备发送指令
服务端向设备订阅topic发送消息
{
"action" : "tts-play",
"messageId" : "202201241610366046",
"text" : "好好学习,天天向上",
"type" : "event",
"voice" : "Cherry"
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
action |
String |
学习红外码指令默认填"learn" |
tts-play |
| 2 |
messageId |
String |
业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。
|
202201241610366046 |
| 3 |
text |
String |
文字转语音文本 |
好好学习,天天向上 |
| 4 |
type |
String |
固定值"xxx" |
event |
| 5 |
voice |
String |
通义大模型,千问TTS 音色选择 |
Cherry |
{
"commandName" : "controller-event-play",
"mac" : "4CEBD60BFD62",
"message" : "https://smart-bird-oss.smart-bird.cn/geek-open/2026/01/19/1942138687270720.wav",
"messageId" : "202201241610366046",
"source" : "command",
"success" : true
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
commandName |
String |
指令名称 |
controller-event-play |
| 2 |
mac |
String |
wifi设备MAC地址或4G设备的IMEI号,唯一标识 |
4CEBD60BFD62 |
| 3 |
message |
String |
执行结果描述:对命令执行结果的文本说明。执行完成且无异常:ok ;如果出现异常,返回异常结果描述。 |
https://smart-bird-oss.smart-bird.cn/geek-open/2026/01/19/1942138687270720.wav |
| 4 |
messageId |
String |
业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。
|
202201241610366046 |
| 5 |
source |
String |
指令回复“command" |
command |
| 6 |
success |
boolean |
执行结果,执行成功:true;执行失败:false |
true |
音频播放器-加音量
player-add-vol
指令简介
加音量
向设备发送指令
服务端向设备订阅topic发送消息
{
"action" : "player-add-vol",
"messageId" : "202201241610366046",
"type" : "event"
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
action |
String |
指令 |
player-add-vol |
| 2 |
channel |
String |
通道 |
left |
| 3 |
freq |
int |
频率,单位(Khz) |
31 |
| 4 |
gain |
int |
增益,单位dB,范围-13到13。 |
-13 |
| 5 |
messageId |
String |
消息ID字段 |
202201241610366046 |
| 6 |
type |
String |
type |
event |
{
"commandName" : "controller-event-player-add-vol",
"mac" : "fc012cd18460",
"message" : "vol:70",
"messageId" : "202201241610366046",
"source" : "command",
"success" : true
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
channel |
String |
左右 |
left |
| 2 |
commandName |
String |
指令名称 |
controller-event-player-add-vol |
| 3 |
freq |
int |
频率,单位(Khz) |
31 |
| 4 |
gain |
int |
增益,单位dB,范围-13到13。 |
-13 |
| 5 |
mac |
String |
wifi设备MAC地址或4G设备的IMEI号,唯一标识 |
fc012cd18460 |
| 6 |
message |
String |
执行返回结果 |
vol:70 |
| 7 |
messageId |
String |
消息ID字段 |
202201241610366046 |
| 8 |
name |
String |
歌曲名字 |
001.mp3 |
| 9 |
size |
int |
歌曲大小(单位字节) |
12099546 |
| 10 |
source |
String |
指令回复“command" |
command |
| 11 |
success |
boolean |
执行结果 |
true |
删除SD卡歌曲文件
player-delete
指令简介
删除播放歌曲时中断音乐,非播放歌曲时不中断音乐
向设备发送指令
服务端向设备订阅topic发送消息
{
"action" : "player-delete",
"messageId" : "1241610366046",
"name" : "周杰伦.flac",
"type" : "event"
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
action |
String |
指令名称 |
player-delete |
| 2 |
messageId |
String |
消息ID字段 |
1241610366046 |
| 3 |
name |
String |
音频名 |
周杰伦.flac |
| 4 |
type |
String |
类型 |
event |
{
"commandName" : "controller-event-player-delete",
"mac" : "4CEBD60BFD62",
"message" : "delete success",
"messageId" : "202201241610366046",
"source" : "command",
"success" : true
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
commandName |
String |
指令名称 |
controller-event-player-delete |
| 2 |
mac |
String |
wifi设备MAC地址或4G设备的IMEI号,唯一标识 |
4CEBD60BFD62 |
| 3 |
message |
String |
执行返回结果 |
delete success |
| 4 |
messageId |
String |
消息ID字段 |
202201241610366046 |
| 5 |
source |
String |
指令回复“command" |
command |
| 6 |
success |
boolean |
执行结果 |
true |
下载在线音频文件到SD卡(http)
player-download
指令简介
http下载在线音频文件到SD卡
向设备发送指令
服务端向设备订阅topic发送消息
{
"action" : "download",
"filepath" : "/sdcard/music/饿狼传说.mp3",
"messageId" : "202201241610366046",
"type" : "event",
"url" : "http://smart-bird-oss.smart-bird.cn/music/2025/%E9%A5%BF%E7%8B%BC%E4%BC%A0%E8%AF%B4.mp3"
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
action |
String |
指令名称 |
download |
| 2 |
filepath |
String |
文件保存的路径和名字 |
/sdcard/music/饿狼传说.mp3 |
| 3 |
messageId |
String |
消息ID字段 |
202201241610366046 |
| 4 |
type |
String |
类型 |
event |
| 5 |
url |
String |
下载的http地址 |
http://smart-bird-oss.smart-bird.cn/music/2025/%E9%A5%BF%E7%8B%BC%E4%BC%A0%E8%AF%B4.mp3 |
{
"commandName" : "controller-event-httpDownload",
"mac" : "4CEBD60BFD62",
"message" : "download start",
"messageId" : "202201241610366046",
"source" : "command",
"success" : true
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
commandName |
String |
指令名称 |
controller-event-httpDownload |
| 2 |
mac |
String |
wifi设备MAC地址或4G设备的IMEI号,唯一标识 |
4CEBD60BFD62 |
| 3 |
message |
String |
执行返回结果 |
download start |
| 4 |
messageId |
String |
消息ID字段 |
202201241610366046 |
| 5 |
source |
String |
指令回复“command" |
command |
| 6 |
success |
boolean |
执行结果 |
true |
播放在线音频(http)
player-http-play
指令简介
播放云端指定的音频
向设备发送指令
服务端向设备订阅topic发送消息
{
"action" : "player-http-play",
"messageId" : "202201241610366046",
"type" : "event",
"url" : "https://megface.x1.smart-bird.cn/sunday.mp3"
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
action |
String |
指令名称 |
player-http-play |
| 2 |
messageId |
String |
消息ID字段 |
202201241610366046 |
| 3 |
type |
String |
类型 |
event |
| 4 |
url |
String |
播放的音频网址 |
https://megface.x1.smart-bird.cn/sunday.mp3 |
{
"commandName" : "controller-event-play",
"mac" : "4CEBD60BFD62",
"message" : "https://megface.x1.smart-bird.cn/sunday.mp3",
"messageId" : "202201241610366046",
"source" : "command",
"success" : true
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
commandName |
String |
指令名称 |
controller-event-play |
| 2 |
mac |
String |
wifi设备MAC地址或4G设备的IMEI号,唯一标识 |
4CEBD60BFD62 |
| 3 |
message |
String |
执行返回结果 |
https://megface.x1.smart-bird.cn/sunday.mp3 |
| 4 |
messageId |
String |
消息ID字段 |
202201241610366046 |
| 5 |
source |
String |
指令回复“command" |
command |
| 6 |
success |
boolean |
执行结果 |
true |
播放在线音频(http)并下载
player-http-play-save
指令简介
播放云端音频文件,并下载到SD卡保存
向设备发送指令
服务端向设备订阅topic发送消息
{
"action" : "player-http-play-save",
"messageId" : "202201241610366046",
"name" : "test_output.mp3",
"type" : "event",
"url" : "https://megface.x1.smart-bird.cn/sunday.mp3"
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
action |
String |
指令名称 |
player-http-play-save |
| 2 |
messageId |
String |
消息ID字段 |
202201241610366046 |
| 3 |
name |
String |
保存到SD卡上的名字 |
test_output.mp3 |
| 4 |
type |
String |
类型 |
event |
| 5 |
url |
String |
播放的音频网址 |
https://megface.x1.smart-bird.cn/sunday.mp3 |
{
"commandName" : "controller-event-play",
"mac" : "4CEBD60BFD62",
"message" : "start",
"messageId" : "202201241610366046",
"source" : "command",
"success" : true
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
commandName |
String |
指令名称 |
controller-event-play |
| 2 |
mac |
String |
wifi设备MAC地址或4G设备的IMEI号,唯一标识 |
4CEBD60BFD62 |
| 3 |
message |
String |
执行返回结果 |
start |
| 4 |
messageId |
String |
消息ID字段 |
202201241610366046 |
| 5 |
source |
String |
指令回复“command" |
command |
| 6 |
success |
boolean |
执行结果 |
true |
音频播放器-音频信息查询
player-info
指令简介
音频信息查询
向设备发送指令
服务端向设备订阅topic发送消息
{
"action" : "player-info",
"messageId" : "202201241610366046",
"type" : "event"
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
action |
String |
指令名称 |
player-info |
| 2 |
messageId |
String |
消息ID字段 |
202201241610366046 |
| 3 |
type |
String |
类型 |
event |
{
"commandName" : "controller-event-player-info",
"eq" :
{
"channel" : "left",
"freq" : 31,
"gain" : -13
},
"fileCount" : 1,
"mac" : "4CEBD60BFD62",
"messageId" : "202201241610366046",
"player-mode" : "ListLoopPlay",
"sdCardFreeSpace" : 256,
"sdCardTotalSpace" : 512,
"sdCardUsage" : 26,
"songs" :
{
"name" : "001.mp3",
"size" : 12099546
},
"source" : "command",
"vol" : 60
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
001.MP3 |
String |
歌曲名字 |
|
| 2 |
channel |
String |
左右通道 |
left |
| 3 |
commandName |
String |
指令名称 |
controller-event-player-info |
| 4 |
eq |
Object |
eq值,channel(right):表示右通道;freq(16000):表示16Khz;gain(0):表示增益为0 |
|
| 5 |
fileCount |
int |
文件数量 |
1 |
| 6 |
freq |
int |
频率,单位(hz) |
31 |
| 7 |
gain |
int |
增益,单位dB,范围-13到13。 |
-13 |
| 8 |
mac |
String |
wifi设备MAC地址或4G设备的IMEI号,唯一标识 |
4CEBD60BFD62 |
| 9 |
messageId |
String |
消息ID字段 |
202201241610366046 |
| 10 |
name |
String |
歌曲名字 |
001.mp3 |
| 11 |
player-mode |
String |
播放器模式:"OnePlay","OneLoopPlay","ListPlay","ListLoopPlay", |
ListLoopPlay |
| 12 |
sdCardFreeSpace |
int |
内存卡剩余空间,单位:MB |
256 |
| 13 |
sdCardTotalSpace |
int |
内存卡总大小,单位:MB |
512 |
| 14 |
sdCardUsage |
int |
内存卡使用率,单位:% |
26 |
| 15 |
size |
int |
歌曲大小(单位字节) |
12099546 |
| 16 |
songs |
Object |
所有歌曲信息 |
|
| 17 |
source |
String |
指令回复“command" |
command |
| 18 |
vol |
int |
音量大小,单位:0-100 |
60 |
音频播放器-切换下一曲
player-next
指令简介
切换下一曲
向设备发送指令
服务端向设备订阅topic发送消息
{
"action" : "player-next",
"messageId" : "202201241610366046",
"type" : "event"
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
action |
String |
指令名称 |
player-next |
| 2 |
messageId |
String |
消息ID字段 |
202201241610366046 |
| 3 |
type |
String |
类型 |
event |
{
"commandName" : "controller-event-player-next",
"mac" : "4CEBD60BFD62",
"message" : "file://sdcard/music/014.mp3",
"messageId" : "202201241610366046",
"source" : "command",
"success" : true
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
commandName |
String |
指令名称 |
controller-event-player-next |
| 2 |
mac |
String |
wifi设备MAC地址或4G设备的IMEI号,唯一标识 |
4CEBD60BFD62 |
| 3 |
message |
String |
执行返回结果 |
file://sdcard/music/014.mp3 |
| 4 |
messageId |
String |
消息ID字段 |
202201241610366046 |
| 5 |
source |
String |
指令回复“command" |
command |
| 6 |
success |
boolean |
执行结果 |
true |
音频播放器-暂停播放
player-pause
指令简介
暂停播放
向设备发送指令
服务端向设备订阅topic发送消息
{
"action" : "player-pause",
"messageId" : "202201241610366046",
"type" : "event"
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
action |
String |
指令名称 |
player-pause |
| 2 |
messageId |
String |
消息ID字段 |
202201241610366046 |
| 3 |
type |
String |
类型 |
event |
{
"commandName" : "controller-event-player-pause",
"mac" : "4CEBD60BFD62",
"message" : "pause",
"messageId" : "202201241610366046",
"source" : "command",
"success" : true
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
commandName |
String |
指令名称 |
controller-event-player-pause |
| 2 |
mac |
String |
wifi设备MAC地址或4G设备的IMEI号,唯一标识 |
4CEBD60BFD62 |
| 3 |
message |
String |
执行返回结果 |
pause |
| 4 |
messageId |
String |
消息ID字段 |
202201241610366046 |
| 5 |
source |
String |
指令回复“command" |
command |
| 6 |
success |
boolean |
执行结果 |
true |
播放SD卡音频
player-play
指令简介
开始播放SD卡音频
向设备发送指令
服务端向设备订阅topic发送消息
{
"action" : "player-play",
"messageId" : "202201241610366046",
"type" : "event"
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
action |
String |
指令名称 |
player-play |
| 2 |
messageId |
String |
消息ID字段 |
202201241610366046 |
| 3 |
type |
String |
类型 |
event |
{
"commandName" : "controller-event-player-play",
"mac" : "4CEBD60BFD62",
"message" : "resume",
"messageId" : "202201241610366046",
"source" : "command",
"success" : true
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
commandName |
String |
指令名称 |
controller-event-player-play |
| 2 |
mac |
String |
wifi设备MAC地址或4G设备的IMEI号,唯一标识 |
4CEBD60BFD62 |
| 3 |
message |
String |
执行返回结果 |
resume |
| 4 |
messageId |
String |
消息ID字段 |
202201241610366046 |
| 5 |
source |
String |
指令回复“command" |
command |
| 6 |
success |
boolean |
执行结果 |
true |
音频播放器-切换上一曲
player-prev
指令简介
切换上一曲
向设备发送指令
服务端向设备订阅topic发送消息
{
"action" : "player-prev",
"messageId" : "202201241610366046",
"type" : "event"
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
action |
String |
指令名称 |
player-prev |
| 2 |
messageId |
String |
消息ID字段 |
202201241610366046 |
| 3 |
type |
String |
类型 |
event |
{
"commandName" : "controller-event-player-prev",
"mac" : "4CEBD60BFD62",
"message" : "file://sdcard/music/test.mp3",
"messageId" : "202201241610366046",
"source" : "command",
"success" : true
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
commandName |
String |
指令名称 |
controller-event-player-prev |
| 2 |
mac |
String |
wifi设备MAC地址或4G设备的IMEI号,唯一标识 |
4CEBD60BFD62 |
| 3 |
message |
String |
执行返回结果,播放的歌曲地址 |
file://sdcard/music/test.mp3 |
| 4 |
messageId |
String |
消息ID字段 |
202201241610366046 |
| 5 |
source |
String |
指令回复“command" |
command |
| 6 |
success |
boolean |
执行结果 |
true |
播放SD卡音频-指定文件
player-sd-play
指令简介
播放SD卡内指定的音频文件
向设备发送指令
服务端向设备订阅topic发送消息
{
"action" : "player-sd-play",
"messageId" : "202201241610366046",
"name" : "test2.mp3",
"type" : "event"
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
action |
String |
指令名称 |
player-sd-play |
| 2 |
messageId |
String |
消息ID字段 |
202201241610366046 |
| 3 |
name |
String |
音频名字 |
test2.mp3 |
| 4 |
type |
String |
类型 |
event |
{
"commandName" : "controller-event-play",
"mac" : "4CEBD60BFD62",
"message" : "file://sdcard/music/test2.mp3",
"messageId" : "202201241610366046",
"source" : "command",
"success" : true
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
commandName |
String |
指令名称 |
controller-event-play |
| 2 |
mac |
String |
wifi设备MAC地址或4G设备的IMEI号,唯一标识 |
4CEBD60BFD62 |
| 3 |
message |
String |
执行返回结果 |
file://sdcard/music/test2.mp3 |
| 4 |
messageId |
String |
消息ID字段 |
202201241610366046 |
| 5 |
source |
String |
指令回复“command" |
command |
| 6 |
success |
boolean |
执行结果 |
true |
音频播放器-设置EQ值
player-set-eq
指令简介
设置20个eq值,第一个表示左声道31hz的 ,第二个表示左声道62hz的.。。。 第十个表示右声道31hz的.。。。
向设备发送指令
服务端向设备订阅topic发送消息
{
"action" : "player-set-eq",
"eq-value" : [-13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13],
"messageId" : "202201241610366046",
"type" : "event"
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
action |
String |
学习红外码指令默认填"learn" |
player-set-eq |
| 2 |
messageId |
String |
业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。
|
202201241610366046 |
| 3 |
type |
String |
固定值"xxx" |
event |
{
"commandName" : "controller-event-player-set-eq",
"mac" : "fc012cd18460",
"message" : "eq success",
"messageId" : "202201241610366046",
"source" : "command",
"success" : true
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
commandName |
String |
指令名称 |
controller-event-player-set-eq |
| 2 |
mac |
String |
wifi设备MAC地址或4G设备的IMEI号,唯一标识 |
fc012cd18460 |
| 3 |
message |
String |
执行结果描述:对命令执行结果的文本说明。执行完成且无异常:ok ;如果出现异常,返回异常结果描述。 |
eq success |
| 4 |
messageId |
String |
业务流水号。由请求方生成的唯一标识,响应方原样回显,用于请求与响应的关联匹配。
|
202201241610366046 |
| 5 |
source |
String |
指令回复“command" |
command |
| 6 |
success |
boolean |
执行结果,执行成功:true;执行失败:false |
true |
音频播放器-设置播放模式
player-set-mode
指令简介
1. 单曲播放(OnePlay):播放当前曲目一次后停止
2. 单曲循环(OneLoopPlay):持续循环播放当前曲目
3. 列表播放(ListPlay):按顺序完整播放全部曲目一遍,播放结束后停止
4. 列表循环播放(ListLoopPlay):按顺序播放曲目,播放至最后一首后自动回到第一首循环播放
补充说明:SD 卡文件排序规则,以文件创建 / 写入时间为准,先拷贝存入的文件排列在前。
向设备发送指令
服务端向设备订阅topic发送消息
{
"action" : "player-set-mode",
"messageId" : "202201241610366046",
"player-mode" : "ListLoopPlay",
"type" : "event"
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
action |
String |
指令名称 |
player-set-mode |
| 2 |
messageId |
String |
消息ID字段 |
202201241610366046 |
| 3 |
player-mode |
String |
播放器模式:"OnePlay","OneLoopPlay","ListPlay","ListLoopPlay", |
ListLoopPlay |
| 4 |
type |
String |
类型 |
event |
{
"commandName" : "controller-event-player-set-mode",
"mac" : "fc012cd18460",
"message" : "ok",
"messageId" : "202201241610366046",
"source" : "command",
"success" : true
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
001.MP3 |
String |
歌曲名字 |
|
| 2 |
channel |
String |
左右通道 |
left |
| 3 |
commandName |
String |
指令名称 |
controller-event-player-set-mode |
| 4 |
freq |
int |
频率,单位(Khz) |
31 |
| 5 |
gain |
int |
增益,单位dB,范围-13到13。 |
-13 |
| 6 |
mac |
String |
wifi设备MAC地址或4G设备的IMEI号,唯一标识 |
fc012cd18460 |
| 7 |
message |
String |
执行返回结果 |
ok |
| 8 |
messageId |
String |
消息ID字段 |
202201241610366046 |
| 9 |
name |
String |
歌曲名字 |
013.mp3 |
| 10 |
size |
int |
歌曲大小(单位字节) |
9828332 |
| 11 |
source |
String |
指令回复“command" |
command |
| 12 |
success |
boolean |
执行结果 |
true |
音频播放器-设置音量
player-set-vol
指令简介
设置音量
向设备发送指令
服务端向设备订阅topic发送消息
{
"action" : "player-set-vol",
"messageId" : "202201241610366046",
"type" : "event",
"value" : 40
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
action |
String |
指令名称 |
player-set-vol |
| 2 |
messageId |
String |
消息ID字段 |
202201241610366046 |
| 3 |
type |
String |
类型 |
event |
| 4 |
value |
int |
音量值 |
40 |
{
"commandName" : "controller-event-player-set-vol",
"mac" : "fc012cd18460",
"message" : "vol:60",
"messageId" : "202201241610366046",
"source" : "command",
"success" : true
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
001.MP3 |
String |
歌曲名字 |
|
| 2 |
channel |
String |
左右通道 |
left |
| 3 |
commandName |
String |
指令名称 |
controller-event-player-set-vol |
| 4 |
freq |
int |
频率,单位(Khz) |
31 |
| 5 |
gain |
int |
增益,单位dB,范围-13到13。 |
-13 |
| 6 |
mac |
String |
wifi设备MAC地址或4G设备的IMEI号,唯一标识 |
fc012cd18460 |
| 7 |
message |
String |
执行返回结果 |
vol:60 |
| 8 |
messageId |
String |
消息ID字段 |
202201241610366046 |
| 9 |
name |
String |
歌曲名字 |
001.mp3 |
| 10 |
size |
int |
歌曲大小(单位字节) |
12099546 |
| 11 |
source |
String |
指令回复“command" |
command |
| 12 |
success |
boolean |
执行结果 |
true |
音频播放器-停止播放
player-stop
指令简介
停止播放
向设备发送指令
服务端向设备订阅topic发送消息
{
"action" : "player-stop",
"messageId" : "202201241610366046",
"type" : "event"
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
action |
String |
指令名称 |
player-stop |
| 2 |
messageId |
String |
消息ID字段 |
202201241610366046 |
| 3 |
type |
String |
类型 |
event |
{
"commandName" : "controller-event-player-stop",
"mac" : "4CEBD60BFD62",
"message" : "stop success",
"messageId" : "202201241610366046",
"source" : "command",
"success" : true
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
commandName |
String |
指令名称 |
controller-event-player-stop |
| 2 |
mac |
String |
wifi设备MAC地址或4G设备的IMEI号,唯一标识 |
4CEBD60BFD62 |
| 3 |
message |
String |
执行返回结果 |
stop success |
| 4 |
messageId |
String |
消息ID字段 |
202201241610366046 |
| 5 |
source |
String |
指令回复“command" |
command |
| 6 |
success |
boolean |
执行结果 |
true |
音频播放器-减音量
player-sub-vol
指令简介
减音量
向设备发送指令
服务端向设备订阅topic发送消息
{
"action" : "player-sub-vol",
"messageId" : "202201241610366046",
"type" : "event"
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
action |
String |
指令名称 |
player-sub-vol |
| 2 |
messageId |
String |
消息ID字段 |
202201241610366046 |
| 3 |
type |
String |
类型 |
event |
{
"commandName" : "controller-event-player-sub-vol",
"mac" : "fc012cd18460",
"message" : "vol:50",
"messageId" : "202201241610366046",
"source" : "command",
"success" : true
}
字段属性
| # |
字段名称 |
字段类型 |
字段说明 |
示例值 |
| 1 |
001.MP3 |
String |
歌曲名字 |
|
| 2 |
channel |
String |
左右通道 |
left |
| 3 |
commandName |
String |
指令名称 |
controller-event-player-sub-vol |
| 4 |
freq |
int |
频率,单位(Khz) |
31 |
| 5 |
gain |
int |
增益,单位dB,范围-13到13。 |
-13 |
| 6 |
mac |
String |
wifi设备MAC地址或4G设备的IMEI号,唯一标识 |
fc012cd18460 |
| 7 |
message |
String |
执行返回结果 |
vol:50 |
| 8 |
messageId |
String |
消息ID字段 |
202201241610366046 |
| 9 |
source |
String |
指令回复“command" |
command |
| 10 |
success |
boolean |
执行结果 |
true |