VoiceCommandServiceConnection VoiceCommandServiceConnection VoiceCommandServiceConnection VoiceCommandServiceConnection VoiceCommandServiceConnection Class

Definition

The background app service connection to Cortana.

Used to retrieve the voice command from Cortana and present messages that are spoken by Cortana and shown on the Cortana canvas.

public : sealed class VoiceCommandServiceConnection
struct winrt::Windows::ApplicationModel::VoiceCommands::VoiceCommandServiceConnection
public sealed class VoiceCommandServiceConnection
Public NotInheritable Class VoiceCommandServiceConnection
// This class does not provide a public constructor.
Attributes

Windows 10 requirements

Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Properties

Language Language Language Language Language

Gets the locale for the voice command.

Methods

FromAppServiceTriggerDetails(AppServiceTriggerDetails) FromAppServiceTriggerDetails(AppServiceTriggerDetails) FromAppServiceTriggerDetails(AppServiceTriggerDetails) FromAppServiceTriggerDetails(AppServiceTriggerDetails) FromAppServiceTriggerDetails(AppServiceTriggerDetails)

Retrieves a VoiceCommandServiceConnection object from the AppServiceTriggerDetails that contains info associated with the background task for the app service.

GetVoiceCommandAsync() GetVoiceCommandAsync() GetVoiceCommandAsync() GetVoiceCommandAsync() GetVoiceCommandAsync()

Retrieves the voice command that the user submitted to Cortana by voice or text.

ReportFailureAsync(VoiceCommandResponse) ReportFailureAsync(VoiceCommandResponse) ReportFailureAsync(VoiceCommandResponse) ReportFailureAsync(VoiceCommandResponse) ReportFailureAsync(VoiceCommandResponse)

Sends a response to Cortana indicating the voice command has failed.

ReportProgressAsync(VoiceCommandResponse) ReportProgressAsync(VoiceCommandResponse) ReportProgressAsync(VoiceCommandResponse) ReportProgressAsync(VoiceCommandResponse) ReportProgressAsync(VoiceCommandResponse)

Sends a response to Cortana indicating voice command is being processed.

ReportSuccessAsync(VoiceCommandResponse) ReportSuccessAsync(VoiceCommandResponse) ReportSuccessAsync(VoiceCommandResponse) ReportSuccessAsync(VoiceCommandResponse) ReportSuccessAsync(VoiceCommandResponse)

Sends a response to Cortana indicating the voice command has succeeded.

RequestAppLaunchAsync(VoiceCommandResponse) RequestAppLaunchAsync(VoiceCommandResponse) RequestAppLaunchAsync(VoiceCommandResponse) RequestAppLaunchAsync(VoiceCommandResponse) RequestAppLaunchAsync(VoiceCommandResponse)

Sends a response to Cortana indicating the command should be handled by the app in the foreground.

RequestConfirmationAsync(VoiceCommandResponse) RequestConfirmationAsync(VoiceCommandResponse) RequestConfirmationAsync(VoiceCommandResponse) RequestConfirmationAsync(VoiceCommandResponse) RequestConfirmationAsync(VoiceCommandResponse)

Sends a response to Cortana indicating the voice command requires confirmation.

RequestDisambiguationAsync(VoiceCommandResponse) RequestDisambiguationAsync(VoiceCommandResponse) RequestDisambiguationAsync(VoiceCommandResponse) RequestDisambiguationAsync(VoiceCommandResponse) RequestDisambiguationAsync(VoiceCommandResponse)

Sends a response to Cortana indicating the voice command returned more than one result and requires the user to select one.

Events

VoiceCommandCompleted VoiceCommandCompleted VoiceCommandCompleted VoiceCommandCompleted VoiceCommandCompleted

Event raised when the voice command is completed and the background app service is about to be terminated.

See also