qixiaoning
2025-10-29 9b17a8dcbc1f94eb117a37b3b24ca9dae0d2d588
system-service/controllers/voice.go
@@ -1,12 +1,13 @@
package controllers
import (
   "basic.com/pubsub/protomsg.git"
   "basic.com/valib/bhomeclient.git"
   "encoding/json"
   "github.com/satori/go.uuid"
   "vamicro/system-service/models"
   "vamicro/system-service/service"
   "basic.com/pubsub/protomsg.git"
   "basic.com/valib/bhomeclient.git"
   uuid "github.com/satori/go.uuid"
)
type VoiceController struct{}
@@ -148,7 +149,7 @@
      audioPath, err := sv.UploadVoice(file.Bytes, filename)
      if err != nil {
         if err.Error() == "audio format error" {
            return &bhomeclient.Reply{Msg: "声音只允许mp3,wav,wma的格式"}
            return &bhomeclient.Reply{Msg: "声音只允许mp3,wav的格式"}
         } else {
            return &bhomeclient.Reply{Msg: "声音上传失败:" + err.Error()}
         }