diff --git a/model.go b/model.go index af206ff..895d89c 100644 --- a/model.go +++ b/model.go @@ -91,6 +91,7 @@ type VoiceProcessingData struct { io.ReadCloser Client *http.Client + UserID string URL string File string diff --git a/node.go b/node.go index 8bcd4ea..0c1cdf7 100644 --- a/node.go +++ b/node.go @@ -208,8 +208,10 @@ func (node *Node) onEvent(v *fastjson.Value, msg []byte) error { track := jsonStringValue(v, "track") data := &VoiceProcessingData{ - URL: fmt.Sprintf("%s/audio/%s", node.config.REST, track), - File: track, + Client: node.client, + 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"))