The following API reference describes all of the functionality that is available in the Unity plugin.
void AddVoiceCommand(string command, Action<string> callback);
Adds a new voice command to the WearHF system.
|command||The command to add to the WearHF system.|
|callback||The callback function that will be called when the command is spoken by the user. Pass null if you don’t want to be notified. The callback function is passed a string representing the command that was spoken.|
void RemoveVoiceCommand(string command);
Removes a voice command from the WearHF system.
|command||The command to remove from the WearHF system.|
Gets the number of commands that have been registered with the WearHF system using WearHF Utils. This does not include global commands.
int – The number of commands registered using WearHF Utils.
Clears all the commands from the WearHF system that were registered with WearHF Utils. This does not clear the global commands (‘show help, navigate back, navigate home’, etc…).
public void AddTTSCommand(int id, string value, Action callback)
Adds a new TTS command to be played by the WearHF system.
|id||A unique ID to associate with the TTS command. This will be passed back with the callback to help identify the command.|
|value||The text that the TTS engine will read out.|
|callback||The callback function that will be called when the TTS command has finished playing to the user.
|boolean||Specifies whether the speech recognizer should also listen for the global commands (‘show help, navigate back, navigate home’, etc…). The default value is ‘true’.|
|boolean||Specifies whether the ACTION button should be used as a way to exit the application and go to home screen. The default value is ‘true’.|