stanford-oval / genie-toolkit

The Genie open source kit for voice assistant (formerly known as Almond)
Apache License 2.0
194 stars 35 forks source link

(Staging) "next" and "previous" should behave the same other working commands (i.e., "next song") #704

Closed tonyespinoza1 closed 2 years ago

tonyespinoza1 commented 3 years ago

simple: "next" should play the next song following the current behavior of "next song" and "another song" and "next please"

I'm editing this one to include "previous" as well.

play chopin

I played music by Frédéric Chopin on Spotify. next

I played music by Frédéric Chopin on Spotify. next

I played music by Frédéric Chopin on Spotify.

====
# main/6170879f-7cb1-4f0f-8ba7-058cdf82d79d
#! timestamp: 2021-07-18T03:13:45.357Z
U: play chopin
UT: $dialogue @org.thingpedia.dialogue.transaction.execute;
UT: @org.thingpedia.media-source.playable() filter contains(artists, null^^org.thingpedia.media-source:artist("chopin")) => @org.thingpedia.media-player.play(playable=id);
C: $dialogue @org.thingpedia.dialogue.transaction.execute;
C: @org.thingpedia.media-source(id="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza")).playable() filter contains(artists, "spotify:artist:7y97mc3bZRFXzT2szRM4L4"^^org.thingpedia.media-source:artist("Frédéric Chopin")) => @org.thingpedia.media-player(id="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza")).play(playable=id)
C: #[results=[
C:   { value="2faa93e1b2b45b85b02b90b497d311c37e7659e7", display="Soundworks’s Mac Pro", playable="spotify:track:2MSgFefjK0T7Iwjvr3OKqV"^^org.thingpedia.media-source:playable("Chopin: Nocturne No. 20 in C-Sharp Minor, Op. Posth."), __device="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza") },
C:   { value="2faa93e1b2b45b85b02b90b497d311c37e7659e7", display="Soundworks’s Mac Pro", playable="spotify:track:2NelosTe0arXp8sdQRfc1B"^^org.thingpedia.media-source:playable("Scherzo No. 3 in C-Sharp Minor, Op. 39, B. 125"), __device="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza") },
C:   { value="2faa93e1b2b45b85b02b90b497d311c37e7659e7", display="Soundworks’s Mac Pro", playable="spotify:track:5VT7oTL3YLT43geRPP2LYP"^^org.thingpedia.media-source:playable("Piano Sonata No. 2 in B-Flat Minor, Op. 35: III. Marche funèbre (Lento) (Orchestral Version)"), __device="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza") },
C:   { value="2faa93e1b2b45b85b02b90b497d311c37e7659e7", display="Soundworks’s Mac Pro", playable="spotify:track:56FgPusKrAOypfATcunNbB"^^org.thingpedia.media-source:playable("Nocturnes, Op. 9: No. 1, Larghetto in B-Flat Minor"), __device="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza") },
C:   { value="2faa93e1b2b45b85b02b90b497d311c37e7659e7", display="Soundworks’s Mac Pro", playable="spotify:track:4XZETVhfy6u2ikOFwYcXbD"^^org.thingpedia.media-source:playable("Nocturne No.2 In E Flat, Op.9 No.2"), __device="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza") },
C:   { value="2faa93e1b2b45b85b02b90b497d311c37e7659e7", display="Soundworks’s Mac Pro", playable="spotify:track:18GJzOA39ppNUjqaSSrdpu"^^org.thingpedia.media-source:playable("Nocturnes, Op. 15: No. 2 in F-Sharp Major"), __device="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza") },
C:   { value="2faa93e1b2b45b85b02b90b497d311c37e7659e7", display="Soundworks’s Mac Pro", playable="spotify:track:2VkB91yELC0iXDFcCBy5ck"^^org.thingpedia.media-source:playable("Nocturnes, Op. 9: No. 2, Andante in E-Flat Major"), __device="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza") },
C:   { value="2faa93e1b2b45b85b02b90b497d311c37e7659e7", display="Soundworks’s Mac Pro", playable="spotify:track:7G1k4wY4k25DBkJZ7BSWJJ"^^org.thingpedia.media-source:playable("Études, Op. 10: No. 3, Étude in E Major \"Tristesse\""), __device="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza") },
C:   { value="2faa93e1b2b45b85b02b90b497d311c37e7659e7", display="Soundworks’s Mac Pro", playable="spotify:track:38FT6Udxc1ReglJfFqEu1r"^^org.thingpedia.media-source:playable("Impromptu No. 3, Op. 51"), __device="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza") },
C:   { value="2faa93e1b2b45b85b02b90b497d311c37e7659e7", display="Soundworks’s Mac Pro", playable="spotify:track:3LNsWJM7YJP3JjZHBFFlnm"^^org.thingpedia.media-source:playable("Nocturne No. 19 in E Minor, Op. 72, No. 1"), __device="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza") }
C: ]]
C: #[count=48];
#! timestamp: 2021-07-18T03:13:47.378Z
A: I played music by Frédéric Chopin on Spotify.
AT: $dialogue @org.thingpedia.dialogue.transaction.sys_action_success;
#! timestamp: 2021-07-18T03:13:51.371Z
U: next
UT: $dialogue @org.thingpedia.dialogue.transaction.execute;
UT: @org.thingpedia.media-source(id="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza")).playable() filter contains(artists, "spotify:artist:7y97mc3bZRFXzT2szRM4L4"^^org.thingpedia.media-source:artist("Frédéric Chopin")) => @org.thingpedia.media-player.play(playable=id);
C: $dialogue @org.thingpedia.dialogue.transaction.execute;
C: @org.thingpedia.media-source(id="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza")).playable() filter contains(artists, "spotify:artist:7y97mc3bZRFXzT2szRM4L4"^^org.thingpedia.media-source:artist("Frédéric Chopin")) => @org.thingpedia.media-player(id="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza")).play(playable=id)
C: #[results=[
C:   { value="2faa93e1b2b45b85b02b90b497d311c37e7659e7", display="Soundworks’s Mac Pro", playable="spotify:track:2MSgFefjK0T7Iwjvr3OKqV"^^org.thingpedia.media-source:playable("Chopin: Nocturne No. 20 in C-Sharp Minor, Op. Posth."), __device="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza") },
C:   { value="2faa93e1b2b45b85b02b90b497d311c37e7659e7", display="Soundworks’s Mac Pro", playable="spotify:track:2NelosTe0arXp8sdQRfc1B"^^org.thingpedia.media-source:playable("Scherzo No. 3 in C-Sharp Minor, Op. 39, B. 125"), __device="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza") },
C:   { value="2faa93e1b2b45b85b02b90b497d311c37e7659e7", display="Soundworks’s Mac Pro", playable="spotify:track:5VT7oTL3YLT43geRPP2LYP"^^org.thingpedia.media-source:playable("Piano Sonata No. 2 in B-Flat Minor, Op. 35: III. Marche funèbre (Lento) (Orchestral Version)"), __device="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza") },
C:   { value="2faa93e1b2b45b85b02b90b497d311c37e7659e7", display="Soundworks’s Mac Pro", playable="spotify:track:56FgPusKrAOypfATcunNbB"^^org.thingpedia.media-source:playable("Nocturnes, Op. 9: No. 1, Larghetto in B-Flat Minor"), __device="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza") },
C:   { value="2faa93e1b2b45b85b02b90b497d311c37e7659e7", display="Soundworks’s Mac Pro", playable="spotify:track:4XZETVhfy6u2ikOFwYcXbD"^^org.thingpedia.media-source:playable("Nocturne No.2 In E Flat, Op.9 No.2"), __device="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza") },
C:   { value="2faa93e1b2b45b85b02b90b497d311c37e7659e7", display="Soundworks’s Mac Pro", playable="spotify:track:18GJzOA39ppNUjqaSSrdpu"^^org.thingpedia.media-source:playable("Nocturnes, Op. 15: No. 2 in F-Sharp Major"), __device="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza") },
C:   { value="2faa93e1b2b45b85b02b90b497d311c37e7659e7", display="Soundworks’s Mac Pro", playable="spotify:track:2VkB91yELC0iXDFcCBy5ck"^^org.thingpedia.media-source:playable("Nocturnes, Op. 9: No. 2, Andante in E-Flat Major"), __device="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza") },
C:   { value="2faa93e1b2b45b85b02b90b497d311c37e7659e7", display="Soundworks’s Mac Pro", playable="spotify:track:7G1k4wY4k25DBkJZ7BSWJJ"^^org.thingpedia.media-source:playable("Études, Op. 10: No. 3, Étude in E Major \"Tristesse\""), __device="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza") },
C:   { value="2faa93e1b2b45b85b02b90b497d311c37e7659e7", display="Soundworks’s Mac Pro", playable="spotify:track:38FT6Udxc1ReglJfFqEu1r"^^org.thingpedia.media-source:playable("Impromptu No. 3, Op. 51"), __device="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza") },
C:   { value="2faa93e1b2b45b85b02b90b497d311c37e7659e7", display="Soundworks’s Mac Pro", playable="spotify:track:3LNsWJM7YJP3JjZHBFFlnm"^^org.thingpedia.media-source:playable("Nocturne No. 19 in E Minor, Op. 72, No. 1"), __device="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza") }
C: ]]
C: #[count=48];
C: @org.thingpedia.media-source(id="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza")).playable() filter contains(artists, "spotify:artist:7y97mc3bZRFXzT2szRM4L4"^^org.thingpedia.media-source:artist("Frédéric Chopin")) => @org.thingpedia.media-player(id="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza")).play(playable=id)
C: #[results=[
C:   { value="2faa93e1b2b45b85b02b90b497d311c37e7659e7", display="Soundworks’s Mac Pro", playable="spotify:track:2MSgFefjK0T7Iwjvr3OKqV"^^org.thingpedia.media-source:playable("Chopin: Nocturne No. 20 in C-Sharp Minor, Op. Posth."), __device="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza") },
C:   { value="2faa93e1b2b45b85b02b90b497d311c37e7659e7", display="Soundworks’s Mac Pro", playable="spotify:track:2NelosTe0arXp8sdQRfc1B"^^org.thingpedia.media-source:playable("Scherzo No. 3 in C-Sharp Minor, Op. 39, B. 125"), __device="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza") },
C:   { value="2faa93e1b2b45b85b02b90b497d311c37e7659e7", display="Soundworks’s Mac Pro", playable="spotify:track:5VT7oTL3YLT43geRPP2LYP"^^org.thingpedia.media-source:playable("Piano Sonata No. 2 in B-Flat Minor, Op. 35: III. Marche funèbre (Lento) (Orchestral Version)"), __device="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza") },
C:   { value="2faa93e1b2b45b85b02b90b497d311c37e7659e7", display="Soundworks’s Mac Pro", playable="spotify:track:56FgPusKrAOypfATcunNbB"^^org.thingpedia.media-source:playable("Nocturnes, Op. 9: No. 1, Larghetto in B-Flat Minor"), __device="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza") },
C:   { value="2faa93e1b2b45b85b02b90b497d311c37e7659e7", display="Soundworks’s Mac Pro", playable="spotify:track:4XZETVhfy6u2ikOFwYcXbD"^^org.thingpedia.media-source:playable("Nocturne No.2 In E Flat, Op.9 No.2"), __device="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza") },
C:   { value="2faa93e1b2b45b85b02b90b497d311c37e7659e7", display="Soundworks’s Mac Pro", playable="spotify:track:18GJzOA39ppNUjqaSSrdpu"^^org.thingpedia.media-source:playable("Nocturnes, Op. 15: No. 2 in F-Sharp Major"), __device="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza") },
C:   { value="2faa93e1b2b45b85b02b90b497d311c37e7659e7", display="Soundworks’s Mac Pro", playable="spotify:track:2VkB91yELC0iXDFcCBy5ck"^^org.thingpedia.media-source:playable("Nocturnes, Op. 9: No. 2, Andante in E-Flat Major"), __device="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza") },
C:   { value="2faa93e1b2b45b85b02b90b497d311c37e7659e7", display="Soundworks’s Mac Pro", playable="spotify:track:7G1k4wY4k25DBkJZ7BSWJJ"^^org.thingpedia.media-source:playable("Études, Op. 10: No. 3, Étude in E Major \"Tristesse\""), __device="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza") },
C:   { value="2faa93e1b2b45b85b02b90b497d311c37e7659e7", display="Soundworks’s Mac Pro", playable="spotify:track:38FT6Udxc1ReglJfFqEu1r"^^org.thingpedia.media-source:playable("Impromptu No. 3, Op. 51"), __device="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza") },
C:   { value="2faa93e1b2b45b85b02b90b497d311c37e7659e7", display="Soundworks’s Mac Pro", playable="spotify:track:3LNsWJM7YJP3JjZHBFFlnm"^^org.thingpedia.media-source:playable("Nocturne No. 19 in E Minor, Op. 72, No. 1"), __device="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza") }
C: ]]
C: #[count=48];
#! timestamp: 2021-07-18T03:13:52.417Z
A: I played music by Frédéric Chopin on Spotify.
AT: $dialogue @org.thingpedia.dialogue.transaction.sys_action_success;
#! timestamp: 2021-07-18T03:14:05.120Z
U: next
UT: $dialogue @org.thingpedia.dialogue.transaction.execute;
UT: @org.thingpedia.media-source(id="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza")).playable() filter contains(artists, "spotify:artist:7y97mc3bZRFXzT2szRM4L4"^^org.thingpedia.media-source:artist("Frédéric Chopin")) => @org.thingpedia.media-player.play(playable=id);
====
gcampax commented 3 years ago

"Next" and "Previous" actually need to behave different than "next song" because they need to operate on the current skill, rather than unconditionally the music skill. @rhulkb27 is working on those commands.

tonyespinoza1 commented 3 years ago

behavior is quite different now with the same starting point on this issue:

====
# main/4ce661a0-cee9-479f-81f7-1ae4ebf495a2
#! timestamp: 2021-07-31T01:40:34.809Z
U: play chopin
UT: $dialogue @org.thingpedia.dialogue.transaction.execute;
UT: @org.thingpedia.media-source.playable() filter id =~ "chopin" => @org.thingpedia.media-player.play(playable=id);
C: $dialogue @org.thingpedia.dialogue.transaction.execute;
C: (@org.thingpedia.media-source(id="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza")).playable() filter id =~ "chopin")[1] => @org.thingpedia.media-player(id="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza")).play(playable=id)
C: #[results=[
C:   { device="55e94e7f-839e-4e71-913f-856ab9dc1ce2"^^org.thingpedia.media-player:device("MR alexa"), playable="spotify:track:2MSgFefjK0T7Iwjvr3OKqV"^^org.thingpedia.media-source:playable("Chopin: Nocturne No. 20 in C-Sharp Minor, Op. Posth."), __device="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza") }
C: ]];
#! timestamp: 2021-07-31T01:40:39.874Z
A: Did you mean get music that has name chopin and then play the id on Spotify?
A: I played Chopin: Nocturne No. 20 in C-Sharp Minor, Op. Posth. On Spotify.
AT: $dialogue @org.thingpedia.dialogue.transaction.sys_action_success;
#! timestamp: 2021-07-31T01:40:48.227Z
U: next
UT: $dialogue @org.thingpedia.dialogue.transaction.execute;
UT: @org.thingpedia.builtin.thingengine.builtin.faq_reply(question=enum general_help);

image

gcampax commented 2 years ago

These work now.