Class VoiceControlManagerClient

    Definition

    Namespace:
    Tizen.Uix.VoiceControlManager
    Assembly:
    Tizen.Uix.VoiceControlManager.dll

    Voice Control Manager Class

    public static class VoiceControlManagerClient
    Inheritance
    object
    VoiceControlManagerClient

    Properties

    View Source

    AudioType

    Sets or Gets the Audio In Type. The Values of the strings can be "VC_AUDIO_ID_BLUETOOTH" or "VC_AUDIO_ID_MSF"

    Declaration
    public static string AudioType { get; set; }
    Property Value
    Type Description
    string
    Exceptions
    Type Condition
    System.InvalidOperationException

    This exception can be due to invalid state.

    System.ArgumentException

    This exception can be due to an invalid parameter.

    System.UnauthorizedAccessException

    This exception can be due to permission denied.

    System.NotSupportedException

    The required feature is not supported.

    View Source

    CurrentLanguage

    Gets the current language. A language is specified as an ISO 3166 alpha-2 two letter country-code followed by ISO 639-1 for the two-letter language code. For example, "ko_KR" for Korean, "en_US" for American English. An empty string is returned in case of some internal error.

    Declaration
    public static string CurrentLanguage { get; }
    Property Value
    Type Description
    string

    The current language in voice control.

    Exceptions
    Type Condition
    System.InvalidOperationException

    This exception can be due to an invalid state.

    System.UnauthorizedAccessException

    This exception can be due to permission denied.

    System.NotSupportedException

    The required feature is not supported.

    View Source

    RecognitionMode

    Sets or Gets the recognition mode.

    Declaration
    public static RecognitionModeType RecognitionMode { get; set; }
    Property Value
    Type Description
    RecognitionModeType
    Exceptions
    Type Condition
    System.InvalidOperationException

    This exception can be due to an invalid state.

    System.ArgumentException

    This exception can be due to an invalid parameter.

    System.UnauthorizedAccessException

    This exception can be due to permission denied.

    System.NotSupportedException

    The required feature is not supported.

    View Source

    RecordingVolume

    Gets the microphone volume during recording.

    Declaration
    public static float RecordingVolume { get; }
    Property Value
    Type Description
    float
    Exceptions
    Type Condition
    System.InvalidOperationException

    This exception can be due to an invalid state.

    System.UnauthorizedAccessException

    This exception can be due to permission denied.

    System.NotSupportedException

    The required feature is not supported.

    View Source

    ServiceState

    Gets the current state of the voice control service.

    Declaration
    public static ServiceState ServiceState { get; }
    Property Value
    Type Description
    ServiceState

    The current state of the voice control service.

    Exceptions
    Type Condition
    System.InvalidOperationException

    This can occur due to the following reasons:

    1. This exception can be due to an invalid state.
    2. This exception can be due to operation failed.
    System.UnauthorizedAccessException

    This exception can be due to permission denied.

    System.NotSupportedException

    The required feature is not supported.

    View Source

    State

    Gets the current state of the voice control client.

    Declaration
    public static State State { get; }
    Property Value
    Type Description
    State

    The current state of the voice control client.

    Exceptions
    Type Condition
    System.InvalidOperationException

    This exception can be due to an invalid state.

    System.UnauthorizedAccessException

    This exception can be due to permission denied.

    System.NotSupportedException

    The required feature is not supported.

    Methods

    View Source

    Cancel()

    Cancels recognition.

    Declaration
    public static void Cancel()
    Exceptions
    Type Condition
    System.InvalidOperationException

    This can occur due to the following reasons:

    1. This exception can be due to an invalid state.
    2. This exception can be due to operation failed.
    3. This exception can be due to progress to ready is not finished.
    4. This exception can be due to progress to recording is not finished.
    5. This exception can be due to progress to processing is not finished.
    System.TimeoutException

    This exception can be due to no answer from service.

    System.UnauthorizedAccessException

    This exception can be due to permission denied.

    System.NotSupportedException

    The required feature is not supported.

    View Source

    ClearCommands()

    Clears commands.

    Declaration
    public static void ClearCommands()
    Exceptions
    Type Condition
    System.InvalidOperationException

    This exception can be due to invalid state.

    System.UnauthorizedAccessException

    This exception can be due to permission denied.

    System.NotSupportedException

    The required feature is not supported.

    View Source

    Deinitialize()

    Deinitialize the voice control manager.

    Declaration
    public static void Deinitialize()
    Exceptions
    Type Condition
    System.InvalidOperationException

    This exception can be due to an invalid state.

    System.UnauthorizedAccessException

    This exception can be due to permission denied.

    System.NotSupportedException

    The required feature is not supported.

    View Source

    DisableCommandType(CommandType)

    Disable command type as candidate command.

    Declaration
    public static void DisableCommandType(CommandType cmdType)
    Parameters
    Type Name Description
    CommandType cmdType

    Command Type

    Exceptions
    Type Condition
    System.InvalidOperationException

    This can occur due to the following reasons:

    1. This exception can be due to an invalid state.
    2. This exception can be due to operation failed.
    System.TimeoutException

    This exception can be due to no answer from service.

    System.ArgumentException

    This exception can be due to an invalid parameter.

    System.UnauthorizedAccessException

    This exception can be due to permission denied.

    System.NotSupportedException

    The required feature is not supported.

    View Source

    DoAction(SendEventType, string)

    Request to do action as if utterence is spoken.

    Declaration
    public static void DoAction(SendEventType type, string sendEvent)
    Parameters
    Type Name Description
    SendEventType type

    Event type

    string sendEvent

    The string for send event

    Exceptions
    Type Condition
    System.InvalidOperationException

    This can occur due to the following reasons:

    1. This exception can be due to an invalid state.
    2. This exception can be due to operation failed.
    System.ArgumentException

    This exception can be due to an invalid parameter.

    System.UnauthorizedAccessException

    This exception can be due to permission denied.

    System.NotSupportedException

    The required feature is not supported.

    View Source

    EnableCommandType(CommandType)

    Enable command type as candidate command.

    Declaration
    public static void EnableCommandType(CommandType cmdType)
    Parameters
    Type Name Description
    CommandType cmdType

    Command Type

    Exceptions
    Type Condition
    System.InvalidOperationException

    This can occur due to the following reasons:

    1. This exception can be due to an invalid state.
    2. This exception can be due to operation failed.
    System.TimeoutException

    This exception can be due to no answer from service.

    System.UnauthorizedAccessException

    This exception can be due to permission denied.

    System.NotSupportedException

    The required feature is not supported.

    View Source

    GetCurrentCommands()

    Retrieves all available commands.

    Declaration
    public static IEnumerable<VoiceCommand> GetCurrentCommands()
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<T><VoiceCommand>

    The Command List else null in case of no System Commands

    Exceptions
    Type Condition
    System.InvalidOperationException

    This can occur due to the following reasons:

    1. This exception can be due to an invalid state.
    2. This exception can be due to operation failed.
    System.UnauthorizedAccessException

    This exception can be due to permission denied.

    System.NotSupportedException

    The required feature is not supported.

    View Source

    GetPrivateData(string)

    Gets private data between app and engine.

    Declaration
    public static string GetPrivateData(string key)
    Parameters
    Type Name Description
    string key

    Private key

    Returns
    Type Description
    string

    Private data

    Exceptions
    Type Condition
    System.InvalidOperationException

    This exception can be due to an invalid state.

    System.ArgumentException

    This exception can be due to an invalid parameter.

    System.UnauthorizedAccessException

    This exception can be due to permission denied.

    System.NotSupportedException

    The required feature is not supported.

    View Source

    GetSupportedLanguages()

    Retrieves all the supported languages. A language is specified as an ISO 3166 alpha-2 two letter country-code followed by ISO 639-1 for the two-letter language code. For example, "ko_KR" for Korean, "en_US" for American English.

    Declaration
    public static IEnumerable<string> GetSupportedLanguages()
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<T><string>

    List of strings for supported languages.

    Exceptions
    Type Condition
    System.InvalidOperationException

    This exception can be due to an invalid state.

    System.UnauthorizedAccessException

    This exception can be due to permission denied.

    System.NotSupportedException

    The required feature is not supported.

    View Source

    Initialize()

    Initialize voice control manager.

    Declaration
    public static void Initialize()
    Exceptions
    Type Condition
    System.InvalidOperationException

    This can occur due to the following reasons:

    1. This exception can be due to out of memory.
    2. This exception can be due to operation failed.
    System.UnauthorizedAccessException

    This exception can be due to permission denied.

    System.NotSupportedException

    The required feature is not supported.

    View Source

    IsSupportedCommandFormat(CommandFormat)

    Checks whether the command format is supported.

    Declaration
    public static bool IsSupportedCommandFormat(CommandFormat format)
    Parameters
    Type Name Description
    CommandFormat format

    The command format

    Returns
    Type Description
    bool

    The result status, true if supported

    Exceptions
    Type Condition
    System.InvalidOperationException

    This exception can be due to an invalid state.

    System.ArgumentException

    This exception can be due to an invalid parameter.

    System.UnauthorizedAccessException

    This exception can be due to permission denied.

    System.NotSupportedException

    The required feature is not supported.

    View Source

    Prepare()

    Connects the voice control service.

    Declaration
    public static void Prepare()
    Exceptions
    Type Condition
    System.InvalidOperationException

    This exception can be due to an invalid state.

    System.UnauthorizedAccessException

    This exception can be due to permission denied.

    System.NotSupportedException

    The required feature is not supported.

    View Source

    SendSpecificEngineRequest(string, string, string)

    Sends the specific engine request to the vc-service.

    Declaration
    public static void SendSpecificEngineRequest(string engineAppId, string evt, string request)
    Parameters
    Type Name Description
    string engineAppId

    A specific engine's app id

    string evt

    A engine service user request event

    string request

    A engine service user request text

    Exceptions
    Type Condition
    System.InvalidOperationException

    This can occur due to the following reasons:

    1. This exception can be due to an invalid state.
    2. This exception can be due to operation failed.
    System.ArgumentException

    This exception can be due to an invalid parameter.

    System.UnauthorizedAccessException

    This exception can be due to permission denied.

    System.NotSupportedException

    The required feature is not supported.

    View Source

    SetCommands(VoiceCommandsGroup)

    Sets system or exclusive commands.

    Declaration
    public static void SetCommands(VoiceCommandsGroup commands)
    Parameters
    Type Name Description
    VoiceCommandsGroup commands

    Command list

    Exceptions
    Type Condition
    System.InvalidOperationException

    This exception can be due to invalid state.

    System.ArgumentException

    This exception can be due to an invalid parameter.

    System.UnauthorizedAccessException

    This exception can be due to permission denied.

    System.NotSupportedException

    The required feature is not supported.

    View Source

    SetCommandsFromFile(string, CommandType)

    Sets commands from file.

    Declaration
    public static void SetCommandsFromFile(string path, CommandType type)
    Parameters
    Type Name Description
    string path

    File Path

    CommandType type

    Command type

    Exceptions
    Type Condition
    System.InvalidOperationException

    This exception can be due to invalid state.

    System.ArgumentException

    This exception can be due to an invalid parameter.

    System.UnauthorizedAccessException

    This exception can be due to permission denied.

    System.NotSupportedException

    The required feature is not supported.

    View Source

    SetPrivateData(string, string)

    Sets private data between app and engine.

    Declaration
    public static void SetPrivateData(string key, string data)
    Parameters
    Type Name Description
    string key

    Private key

    string data

    Private data

    Exceptions
    Type Condition
    System.InvalidOperationException

    This can occur due to the following reasons:

    1. This exception can be due to an invalid state.
    2. This exception can be due to operation failed.
    System.ArgumentException

    This exception can be due to an invalid parameter.

    System.UnauthorizedAccessException

    This exception can be due to permission denied.

    System.NotSupportedException

    The required feature is not supported.

    View Source

    SetPrivateDataProviderDelegate(PrivateDataProvider)

    Sets the delegate for setting private data.

    Declaration
    public static void SetPrivateDataProviderDelegate(VoiceControlManagerClient.PrivateDataProvider privateDataDelegate)
    Parameters
    Type Name Description
    VoiceControlManagerClient.PrivateDataProvider privateDataDelegate

    The delegate for setting private data

    Exceptions
    Type Condition
    System.InvalidOperationException

    This exception can be due to an invalid state.

    System.ArgumentException

    This exception can be due to an invalid parameter.

    System.UnauthorizedAccessException

    This exception can be due to permission denied.

    System.NotSupportedException

    The required feature is not supported.

    View Source

    SetRecognizedCommandsSelectionDelegate(SelectRecognizedCommandsDelegate)

    Sets the delegate for setting valid commands.

    Declaration
    public static void SetRecognizedCommandsSelectionDelegate(VoiceControlManagerClient.SelectRecognizedCommandsDelegate recognizedCommandsDelegate)
    Parameters
    Type Name Description
    VoiceControlManagerClient.SelectRecognizedCommandsDelegate recognizedCommandsDelegate

    The delegate for setting valid commands.

    Exceptions
    Type Condition
    System.InvalidOperationException

    This exception can be due to an invalid state.

    System.ArgumentException

    This exception can be due to an invalid parameter.

    System.UnauthorizedAccessException

    This exception can be due to permission denied.

    System.NotSupportedException

    The required feature is not supported.

    View Source

    Start(bool)

    Starts recognition.

    Declaration
    public static void Start(bool exclusiveCommandOption)
    Parameters
    Type Name Description
    bool exclusiveCommandOption

    Exclusive command option

    Exceptions
    Type Condition
    System.InvalidOperationException

    This can occur due to the following reasons:

    1. This exception can be due to an invalid state.
    2. This exception can be due to operation failed.
    3. This exception can be due to progress to recording is not finished.
    System.TimeoutException

    This exception can be due to no answer from service.

    System.UnauthorizedAccessException

    This exception can be due to permission denied.

    System.NotSupportedException

    The required feature is not supported.

    View Source

    StartFeedback()

    Starts getting TTS feedback streaming data from the buffer.

    Declaration
    public static void StartFeedback()
    Exceptions
    Type Condition
    System.InvalidOperationException

    This exception can be due to an invalid state.

    System.UnauthorizedAccessException

    This exception can be due to permission denied.

    System.NotSupportedException

    The required feature is not supported.

    View Source

    Stop()

    Stop recognition.

    Declaration
    public static void Stop()
    Exceptions
    Type Condition
    System.InvalidOperationException

    This can occur due to the following reasons:

    1. This exception can be due to an invalid state.
    2. This exception can be due to operation failed.
    3. This exception can be due to progress to ready is not finished.
    4. This exception can be due to progress to recording is not finished.
    5. This exception can be due to progress to processing is not finished.
    System.TimeoutException

    This exception can be due to no answer from service.

    System.UnauthorizedAccessException

    This exception can be due to permission denied.

    System.NotSupportedException

    The required feature is not supported.

    View Source

    StopFeedback()

    Stops getting and removes TTS feedback streaming data from the buffer.

    Declaration
    public static void StopFeedback()
    Exceptions
    Type Condition
    System.InvalidOperationException

    This exception can be due to an invalid state.

    System.UnauthorizedAccessException

    This exception can be due to permission denied.

    System.NotSupportedException

    The required feature is not supported.

    View Source

    Unprepare()

    Disconnects the voice control service.

    Declaration
    public static void Unprepare()
    Exceptions
    Type Condition
    System.InvalidOperationException

    This exception can be due to an invalid state.

    System.UnauthorizedAccessException

    This exception can be due to permission denied.

    System.NotSupportedException

    The required feature is not supported.

    Events

    View Source

    AllRecognitionResultReceived

    Called when client gets the all recognition results from vc-daemon.

    Declaration
    public static event EventHandler<AllRecognitionResultEventArgs> AllRecognitionResultReceived
    Event Type
    Type Description
    System.EventHandler<TEventArgs><AllRecognitionResultEventArgs>
    Exceptions
    Type Condition
    System.UnauthorizedAccessException

    This exception can be due to permission denied.

    System.NotSupportedException

    The required feature is not supported.

    View Source

    ConversationRequested

    Event to be called when conversation requests.

    Declaration
    public static event EventHandler<ConversationRequestedEventArgs> ConversationRequested
    Event Type
    Type Description
    System.EventHandler<TEventArgs><ConversationRequestedEventArgs>
    Exceptions
    Type Condition
    System.UnauthorizedAccessException

    This exception can be due to permission denied.

    System.NotSupportedException

    The required feature is not supported.

    View Source

    CurrentLanguageChanged

    Event to be invoked when the default language changes.

    Declaration
    public static event EventHandler<CurrentLanguageChangedEventArgs> CurrentLanguageChanged
    Event Type
    Type Description
    System.EventHandler<TEventArgs><CurrentLanguageChangedEventArgs>
    Exceptions
    Type Condition
    System.UnauthorizedAccessException

    This exception can be due to permission denied.

    System.NotSupportedException

    The required feature is not supported.

    View Source

    ErrorOccurred

    Event to be invoked when an error occurs.

    Declaration
    public static event EventHandler<ErrorOccurredEventArgs> ErrorOccurred
    Event Type
    Type Description
    System.EventHandler<TEventArgs><ErrorOccurredEventArgs>
    Exceptions
    Type Condition
    System.UnauthorizedAccessException

    This exception can be due to permission denied.

    System.NotSupportedException

    The required feature is not supported.

    View Source

    FeedbackAudioFormatChanged

    Called when engine sends audio formats necessary for playing TTS feedback.

    Declaration
    public static event EventHandler<FeedbackAudioFormatEventArgs> FeedbackAudioFormatChanged
    Event Type
    Type Description
    System.EventHandler<TEventArgs><FeedbackAudioFormatEventArgs>
    Exceptions
    Type Condition
    System.UnauthorizedAccessException

    This exception can be due to permission denied.

    System.NotSupportedException

    The required feature is not supported.

    View Source

    FeedbackStreaming

    Called when engine sends audio streaming for TTS feedback.

    Declaration
    public static event EventHandler<FeedbackStreamingEventArgs> FeedbackStreaming
    Event Type
    Type Description
    System.EventHandler<TEventArgs><FeedbackStreamingEventArgs>
    Exceptions
    Type Condition
    System.UnauthorizedAccessException

    This exception can be due to permission denied.

    System.NotSupportedException

    The required feature is not supported.

    View Source

    PreRecognitionResultUpdated

    Called when client gets the pre recognition results(partial ASR) from vc-daemon.

    Declaration
    public static event EventHandler<PreRecognitionResultUpdatedEventArgs> PreRecognitionResultUpdated
    Event Type
    Type Description
    System.EventHandler<TEventArgs><PreRecognitionResultUpdatedEventArgs>
    Exceptions
    Type Condition
    System.UnauthorizedAccessException

    This exception can be due to permission denied.

    System.NotSupportedException

    The required feature is not supported.

    View Source

    PrivateDataUpdated

    Called when engine sets private data to manager client.

    Declaration
    public static event EventHandler<PrivateDataUpdatedEventArgs> PrivateDataUpdated
    Event Type
    Type Description
    System.EventHandler<TEventArgs><PrivateDataUpdatedEventArgs>
    Exceptions
    Type Condition
    System.UnauthorizedAccessException

    This exception can be due to permission denied.

    System.NotSupportedException

    The required feature is not supported.

    View Source

    RecognitionResultUpdated

    Event to be invoked when the recognition is done.

    Declaration
    public static event EventHandler<RecognitionResultUpdatedEventArgs> RecognitionResultUpdated
    Event Type
    Type Description
    System.EventHandler<TEventArgs><RecognitionResultUpdatedEventArgs>
    Exceptions
    Type Condition
    System.UnauthorizedAccessException

    This exception can be due to permission denied.

    System.NotSupportedException

    The required feature is not supported.

    View Source

    ServiceStateChanged

    Event to be invoked when the VoiceControl service state changes.

    Declaration
    public static event EventHandler<ServiceStateChangedEventArgs> ServiceStateChanged
    Event Type
    Type Description
    System.EventHandler<TEventArgs><ServiceStateChangedEventArgs>
    Exceptions
    Type Condition
    System.UnauthorizedAccessException

    This exception can be due to permission denied.

    System.NotSupportedException

    The required feature is not supported.

    View Source

    SpecificEngineResult

    Called when client gets the specific engine's result from vc-service.

    Declaration
    public static event EventHandler<SpecificEngineResultEventArgs> SpecificEngineResult
    Event Type
    Type Description
    System.EventHandler<TEventArgs><SpecificEngineResultEventArgs>
    Exceptions
    Type Condition
    System.UnauthorizedAccessException

    This exception can be due to permission denied.

    System.NotSupportedException

    The required feature is not supported.

    View Source

    SpeechDetected

    Called when user speaking is detected.

    Declaration
    public static event EventHandler<EventArgs> SpeechDetected
    Event Type
    Type Description
    System.EventHandler<TEventArgs><System.EventArgs>
    Exceptions
    Type Condition
    System.UnauthorizedAccessException

    This exception can be due to permission denied.

    System.NotSupportedException

    The required feature is not supported.

    View Source

    StateChanged

    Event to be invoked when the VoiceControl client state changes.

    Declaration
    public static event EventHandler<StateChangedEventArgs> StateChanged
    Event Type
    Type Description
    System.EventHandler<TEventArgs><StateChangedEventArgs>
    Exceptions
    Type Condition
    System.UnauthorizedAccessException

    This exception can be due to permission denied.

    System.NotSupportedException

    The required feature is not supported.

    View Source

    VcTtsStreaming

    Called when the vc client sends audio streaming for TTS feedback.

    Declaration
    public static event EventHandler<VcTtsStreamingEventArgs> VcTtsStreaming
    Event Type
    Type Description
    System.EventHandler<TEventArgs><VcTtsStreamingEventArgs>
    • View Source
    Back to top Copyright © 2016-2024 Samsung
    Generated by DocFX