speaker.go 1.1 KB

123456789101112131415161718192021222324252627
  1. package model
  2. type SpeakerInfo struct {
  3. Name string `yaml:"name"`
  4. Ip string `yaml:"ip"`
  5. Branch byte `yaml:"branch"`
  6. }
  7. type PlayReq struct {
  8. Url string //要播放的⽹络⾳频 http/https/rtsp等⾳频地址
  9. Text string //要播放的⽂本内容
  10. Vcn string // 发⾳⼈ xiaofeng xiaoyan
  11. Speed int //发⾳速度 0-100 默认50
  12. Volume int //⾳量 0-100 默认50
  13. Rdn string //数字发⾳ 0 数值优先, 1 完全数值, 2 完全字符串, 3 字符串优先 默认2
  14. Rcn string //数字1 的中⽂发⾳ 0:表示发⾳为yao 1:表示发⾳为yi 默认0
  15. Reg byte //英⽂发⾳ 0:⾃动识别英语单词; 1:逐个字⺟发⾳
  16. Sync bool //true: 同步模式,语⾳播放完毕后再响应; false:即时响应(不等待播放完成)
  17. Queue bool //true: 队列模式,如果当前有语⾳在播放,则加到队列排队播放
  18. Loop LoopInfo
  19. }
  20. type LoopInfo struct {
  21. Duration int // 循环(重复)播放时⻓(秒)选填
  22. Times int // 循环(重复)播放次数(次)选填
  23. Gap int // 循环(重复)播放中的间歇时间(秒)
  24. }