Add missing UserID to VoiceProcessingData
This commit is contained in:
parent
7eae103756
commit
f9206c7c99
1
model.go
1
model.go
|
@ -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
|
||||||
|
|
||||||
|
|
6
node.go
6
node.go
|
@ -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"))
|
||||||
|
|
Loading…
Reference in New Issue