Add missing UserID to VoiceProcessingData

This commit is contained in:
Tyler 2019-10-13 22:58:25 -04:00
parent 7eae103756
commit f9206c7c99
2 changed files with 5 additions and 2 deletions

View File

@ -91,6 +91,7 @@ type VoiceProcessingData struct {
io.ReadCloser io.ReadCloser
Client *http.Client Client *http.Client
UserID string
URL string URL string
File string File string

View File

@ -208,8 +208,10 @@ func (node *Node) onEvent(v *fastjson.Value, msg []byte) error {
track := jsonStringValue(v, "track") track := jsonStringValue(v, "track")
data := &VoiceProcessingData{ data := &VoiceProcessingData{
URL: fmt.Sprintf("%s/audio/%s", node.config.REST, track), Client: node.client,
File: track, UserID: jsonStringValue(v, "userId"),
URL: fmt.Sprintf("%s/audio/%s", node.config.REST, track),
File: track,
} }
return player.handler.OnVoiceProcessed(player, data, v.GetBool("hotword"), v.GetBool("override")) return player.handler.OnVoiceProcessed(player, data, v.GetBool("hotword"), v.GetBool("override"))