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 |
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. |
RecognitionMode
Sets or Gets the recognition mode.
Declaration
public static RecognitionModeType RecognitionMode { get; set; }
Property Value
| Type | Description |
|---|---|
| RecognitionModeType |
RecordingVolume
Gets the microphone volume during recording.
Declaration
public static float RecordingVolume { get; }
Property Value
| Type | Description |
|---|---|
| float |
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. |
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. |
Methods
View SourceCancel()
Cancels recognition.
Declaration
public static void Cancel()
ClearCommands()
Clears commands.
Declaration
public static void ClearCommands()
Deinitialize()
Deinitialize the voice control manager.
Declaration
public static void Deinitialize()
DisableCommandType(CommandType)
Disable command type as candidate command.
Declaration
public static void DisableCommandType(CommandType cmdType)
Parameters
| Type | Name | Description |
|---|---|---|
| CommandType | cmdType | Command Type |
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 |
EnableCommandType(CommandType)
Enable command type as candidate command.
Declaration
public static void EnableCommandType(CommandType cmdType)
Parameters
| Type | Name | Description |
|---|---|---|
| CommandType | cmdType | Command Type |
GetCurrentCommands()
Retrieves all available commands.
Declaration
public static IEnumerable<VoiceCommand> GetCurrentCommands()
Returns
| Type | Description |
|---|---|
| IEnumerable<><VoiceCommand> | The Command List else null in case of no System Commands |
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 |
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 |
|---|---|
| IEnumerable<><string> | List of strings for supported languages. |
Initialize()
Initialize voice control manager.
Declaration
public static void Initialize()
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 |
Prepare()
Connects the voice control service.
Declaration
public static void Prepare()
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 |
SetCommands(VoiceCommandsGroup)
Sets system or exclusive commands.
Declaration
public static void SetCommands(VoiceCommandsGroup commands)
Parameters
| Type | Name | Description |
|---|---|---|
| VoiceCommandsGroup | commands | Command list |
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 |
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 |
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 |
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. |
Start(bool)
Starts recognition.
Declaration
public static void Start(bool exclusiveCommandOption)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | exclusiveCommandOption | Exclusive command option |
StartFeedback()
Starts getting TTS feedback streaming data from the buffer.
Declaration
public static void StartFeedback()
Stop()
Stop recognition.
Declaration
public static void Stop()
StopFeedback()
Stops getting and removes TTS feedback streaming data from the buffer.
Declaration
public static void StopFeedback()
Unprepare()
Disconnects the voice control service.
Declaration
public static void Unprepare()
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 |
|---|---|
| EventHandler<><AllRecognitionResultEventArgs> |
ConversationRequested
Event to be called when conversation requests.
Declaration
public static event EventHandler<ConversationRequestedEventArgs> ConversationRequested
Event Type
| Type | Description |
|---|---|
| EventHandler<><ConversationRequestedEventArgs> |
CurrentLanguageChanged
Event to be invoked when the default language changes.
Declaration
public static event EventHandler<CurrentLanguageChangedEventArgs> CurrentLanguageChanged
Event Type
| Type | Description |
|---|---|
| EventHandler<><CurrentLanguageChangedEventArgs> |
ErrorOccurred
Event to be invoked when an error occurs.
Declaration
public static event EventHandler<ErrorOccurredEventArgs> ErrorOccurred
Event Type
| Type | Description |
|---|---|
| EventHandler<><ErrorOccurredEventArgs> |
FeedbackAudioFormatChanged
Called when engine sends audio formats necessary for playing TTS feedback.
Declaration
public static event EventHandler<FeedbackAudioFormatEventArgs> FeedbackAudioFormatChanged
Event Type
| Type | Description |
|---|---|
| EventHandler<><FeedbackAudioFormatEventArgs> |
FeedbackStreaming
Called when engine sends audio streaming for TTS feedback.
Declaration
public static event EventHandler<FeedbackStreamingEventArgs> FeedbackStreaming
Event Type
| Type | Description |
|---|---|
| EventHandler<><FeedbackStreamingEventArgs> |
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 |
|---|---|
| EventHandler<><PreRecognitionResultUpdatedEventArgs> |
PrivateDataUpdated
Called when engine sets private data to manager client.
Declaration
public static event EventHandler<PrivateDataUpdatedEventArgs> PrivateDataUpdated
Event Type
| Type | Description |
|---|---|
| EventHandler<><PrivateDataUpdatedEventArgs> |
RecognitionResultUpdated
Event to be invoked when the recognition is done.
Declaration
public static event EventHandler<RecognitionResultUpdatedEventArgs> RecognitionResultUpdated
Event Type
| Type | Description |
|---|---|
| EventHandler<><RecognitionResultUpdatedEventArgs> |
ServiceStateChanged
Event to be invoked when the VoiceControl service state changes.
Declaration
public static event EventHandler<ServiceStateChangedEventArgs> ServiceStateChanged
Event Type
| Type | Description |
|---|---|
| EventHandler<><ServiceStateChangedEventArgs> |
SpecificEngineResult
Called when client gets the specific engine's result from vc-service.
Declaration
public static event EventHandler<SpecificEngineResultEventArgs> SpecificEngineResult
Event Type
| Type | Description |
|---|---|
| EventHandler<><SpecificEngineResultEventArgs> |
SpeechDetected
Called when user speaking is detected.
Declaration
public static event EventHandler<EventArgs> SpeechDetected
Event Type
| Type | Description |
|---|---|
| EventHandler<><EventArgs> |
StateChanged
Event to be invoked when the VoiceControl client state changes.
Declaration
public static event EventHandler<StateChangedEventArgs> StateChanged
Event Type
| Type | Description |
|---|---|
| EventHandler<><StateChangedEventArgs> |
VcTtsStreaming
Called when the vc client sends audio streaming for TTS feedback.
Declaration
public static event EventHandler<VcTtsStreamingEventArgs> VcTtsStreaming
Event Type
| Type | Description |
|---|---|
| EventHandler<><VcTtsStreamingEventArgs> |