待机功能基本实现

This commit is contained in:
2024-11-06 15:44:35 +08:00
parent 8e2bf7f59b
commit ab0678aa3b
14 changed files with 317 additions and 151 deletions

View File

@@ -8,7 +8,7 @@ import (
"time"
)
func TickerAction(t *tts.AliTTS) leaf.HandlerFunc {
func TickerAction() leaf.HandlerFunc {
return func(c *leaf.Context) {
pm := leaf.Value[*schema.PlayModal](c, PayloadJSONKey)
@@ -50,7 +50,7 @@ func TickerAction(t *tts.AliTTS) leaf.HandlerFunc {
//TODO: 屏幕打印
}
if to, ok := ttsMap[s]; ok {
t.Sound(to.Value)
tts.DefaultTTS.Sound(to.Value)
}
}
}