-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #792 from stanford-oval/wip/volume-control
Extend the audio control protocol with the missing features
- Loading branch information
Showing
29 changed files
with
443 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
dataset @org.thingpedia.volume-control language "en" { | ||
|
||
action (p_name : String) := @org.thingpedia.volume-control(name=p_name).raise_volume() | ||
#_[utterances=["increase the volume of the ${p_name:const} device", | ||
"increase my ${p_name:const} device 's volume", | ||
"make the ${p_name:const} device louder"]]; | ||
|
||
action (p_name : String) := @org.thingpedia.volume-control(name=p_name).lower_volume() | ||
#_[utterances=["decrease the volume of my ${p_name:const} device", | ||
"decrease my ${p_name:const} device 's volume", | ||
"reduce the volume of the ${p_name:const} device", | ||
"reduce my ${p_name:const} device 's volume", | ||
"make the ${p_name:const} device softer"]]; | ||
|
||
action (p_name : String) := @org.thingpedia.volume-control(name=p_name).mute() | ||
#_[utterances=["mute my ${p_name:const} device", | ||
"silence my ${p_name:const} device 's volume", | ||
"turn off the volume of the ${p_name:const} device", | ||
"switch off the sound for my ${p_name:const} device", | ||
"mute my ${p_name:const} device 's sound", | ||
"make my ${p_name:const} device silent"]]; | ||
|
||
action (p_name : String) := @org.thingpedia.volume-control(name=p_name).unmute() | ||
#_[utterances=["unmute my ${p_name:const} device", | ||
"unmute the ${p_name:const} device 's volume", | ||
"unmute my ${p_name:const} device 's sound", | ||
"turn on the ${p_name:const} device sound", | ||
"stop muting my ${p_name:const} device"]]; | ||
|
||
action (p_name : String, p_volume : Number) := @org.thingpedia.volume-control(name=p_name).set_volume(volume=p_volume) | ||
#_[utterances=["turn my ${p_name:const} device sound to ${p_volume:const}", | ||
"set the ${p_name:const} device 's volume to ${p_volume:const}"]]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
abstract class @org.thingpedia.volume-control | ||
#_[thingpedia_name="Volume Control"] | ||
#_[thingpedia_description="Interface for Volume Control."] | ||
#_[description="Interface for Volume Control."] | ||
#[license="Apache-2.0"] | ||
#[license_gplcompatible=true] | ||
#[subcategory="home"] | ||
{ | ||
|
||
action raise_volume() | ||
#_[canonical=["increase the volume of the speaker", | ||
"increase my speaker 's volume", | ||
"make the speaker louder", | ||
"increase the speaker volume"]] | ||
#[confirm=false] | ||
#[doc="increase the volume of the speaker"]; | ||
|
||
action lower_volume() | ||
#_[canonical=["decrease the volume of my speaker", | ||
"decrease my speaker 's volume", | ||
"reduce the volume of the speaker", | ||
"reduce my speaker 's volume", | ||
"make the speaker softer"]] | ||
#[confirm=false] | ||
#[doc="decrease the volume of the speaker"]; | ||
|
||
action mute() | ||
#_[canonical=["mute my speaker", | ||
"silence my speaker 's volume", | ||
"turn off the volume of the speaker", | ||
"switch off the sound for my speaker", | ||
"mute my speaker 's sound", | ||
"make my speaker silent"]] | ||
#[confirm=false] | ||
#[doc="mute the speaker"]; | ||
|
||
action unmute() | ||
#_[canonical=["unmute my speaker", | ||
"unmute the speaker 's volume", | ||
"unmute my speaker 's sound", | ||
"turn on the speaker sound", | ||
"stop muting my speaker"]] | ||
#[confirm=false] | ||
#[doc="unmute the speaker"]; | ||
|
||
action set_volume(in req volume: Number #_[prompt="from 0 to 100, what volume do you want to set"] | ||
#_[canonical={ | ||
base=["volume", "value"], | ||
preposition=["to #"] | ||
}]) | ||
#_[canonical="set the volume of the speaker"] | ||
#[confirm=false] | ||
#[doc="set the speaker volume"]; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.