VoiceCommand Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
The command given to Cortana, using either speech or text, and routed to a background app.
The command must be declared in a Voice Command Definition (VCD) file registered by the app referred to in the command. See Launch a background app with voice commands for more info on creating and registering a Voice Command Definition (VCD) file for your app.
public ref class VoiceCommand sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class VoiceCommand final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class VoiceCommand
Public NotInheritable Class VoiceCommand
- Inheritance
- Attributes
Windows requirements
Device family |
Windows 10 (introduced in 10.0.10240.0)
|
API contract |
Windows.Foundation.UniversalApiContract (introduced in v1.0)
|
Remarks
Access VoiceCommand objects by calling GetVoiceCommandAsync on a VoiceCommandServiceConnection that references the appropriate Windows.ApplicationModel.AppService object.
Properties
CommandName |
Gets the value of the Name attribute for the Command element declared in the Voice Command Definition (VCD) file. |
Properties |
Gets a dictionary containing the semantic properties of the recognized phrase in the voice command. |
SpeechRecognitionResult |
Gets the SpeechRecognitionResult object representing the results returned by the voice command. |