Share via


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 ref class VoiceCommandServiceConnection sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class VoiceCommandServiceConnection final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class VoiceCommandServiceConnection
Public NotInheritable Class VoiceCommandServiceConnection
Inheritance
Object Platform::Object IInspectable VoiceCommandServiceConnection
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Properties

Language

Gets the locale for the voice command.

Methods

FromAppServiceTriggerDetails(AppServiceTriggerDetails)

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

GetVoiceCommandAsync()

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

ReportFailureAsync(VoiceCommandResponse)

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

ReportProgressAsync(VoiceCommandResponse)

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

ReportSuccessAsync(VoiceCommandResponse)

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

RequestAppLaunchAsync(VoiceCommandResponse)

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

RequestConfirmationAsync(VoiceCommandResponse)

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

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

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

Applies to

See also