我已经下载了示例胶囊并实现到我的胶囊中并且它正在工作,但现在我需要传递一些 id 并生成歌曲的内容。
所以我的意图followup
是
intent{
goal:PlaySongs
value-set:MultipleArtistId{$expr(singleArtistEvent.artistId)}
}
我的 PlaySongs 动作文件如下所示
action (PlaySongs) {
type (Search)
collect {
computed-input (songToPlay) {
description (Create the playlist to play)
type (audioPlayer.AudioInfo)
min (Required) max (One)
compute {
intent {
goal: GetMeArtistSong
value-set: MultipleArtistId
}
}
hidden
}
computed-input (play) {
description (By passing in the AudioInfo object to the PlayAudio action, we ask the client to play our sound.)
type (audioPlayer.Result)
compute {
intent {
goal: audioPlayer.PlayAudio
value: $expr(songToPlay)
}
}
hidden
}
}
output (Result)
}
GetMeArtistSong 动作文件如下所示
action (GetMeArtistSong) {
type(Search)
description (Artist Song)
collect {
input (artistId) {
type (MultipleArtistId)
min (Optional) max (One)
}
}
output (audioPlayer.AudioInfo)
}
我无法在 GetMeArtistSong js 文件中获取艺术家 ID。我做错了什么?隐藏是为了什么?请解释。