Class VoiceControlManagerClient
Definition
- Namespace:
- Tizen.Uix.VoiceControlManager
- Assembly:
- Tizen.Uix.VoiceControlManager.dll
Voice Control Manager Class
public static class VoiceControlManagerClient
- Inheritance
-
objectVoiceControlManagerClient
Properties
View SourceAudioType
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. |
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. |
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. |
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. |
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:
|
System.UnauthorizedAccessException | This exception can be due to permission denied. |
System.NotSupportedException | The required feature is not supported. |
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 SourceCancel()
Cancels recognition.
Declaration
public static void Cancel()
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | This can occur due to the following reasons:
|
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. |
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. |
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. |
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:
|
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. |
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:
|
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. |
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:
|
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. |
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:
|
System.UnauthorizedAccessException | This exception can be due to permission denied. |
System.NotSupportedException | The required feature is not supported. |
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. |
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. |
Initialize()
Initialize voice control manager.
Declaration
public static void Initialize()
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | This can occur due to the following reasons:
|
System.UnauthorizedAccessException | This exception can be due to permission denied. |
System.NotSupportedException | The required feature is not supported. |
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. |
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. |
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:
|
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. |
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. |
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. |
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:
|
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. |
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. |
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. |
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:
|
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. |
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. |
Stop()
Stop recognition.
Declaration
public static void Stop()
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | This can occur due to the following reasons:
|
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. |
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. |
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 SourceAllRecognitionResultReceived
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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> |