-
- All Implemented Interfaces:
public interface IVoiceServiceApi
This interface exposes all the methods needed for using the voice service features.
-
-
Method Summary
Modifier and Type Method Description abstract Unit
initVoiceSdk(String voiceResourcesPath, String nativeLibPath, List<String> supportedPlugins)
abstract Unit
setupVoiceService(Context context)
This method handles the voice service setup. abstract Unit
addDomainListener(IVoiceServiceDomainListener listener)
Registers the listener for receiving voice events. abstract Unit
registerTtsProxy(ITextToSpeechApi listener)
Registers the listener for playing specific prompts to the user. abstract Unit
registerHttpProxy()
This method registers the http instance to voice service for being able to execute http calls. abstract Unit
sendText(String text)
This method will send user voice command to voice service as a text. abstract Unit
updateContext(String jsonContent)
This method will send the current context to voice. abstract Unit
updateSettings(String jsonContent)
This method will send the settings information required by voice service for a proper run abstract Unit
setInternetConnection(Boolean hasInternetConnection)
This method will set the state of the internet connection -
-
Method Detail
-
initVoiceSdk
abstract Unit initVoiceSdk(String voiceResourcesPath, String nativeLibPath, List<String> supportedPlugins)
-
setupVoiceService
abstract Unit setupVoiceService(Context context)
This method handles the voice service setup.
- Parameters:
context
- The context used for executing the copy resources operation.
-
addDomainListener
abstract Unit addDomainListener(IVoiceServiceDomainListener listener)
Registers the listener for receiving voice events.
- Parameters:
listener
- The instance of IVoiceServiceDomainListener used for receiving voice service data.
-
registerTtsProxy
abstract Unit registerTtsProxy(ITextToSpeechApi listener)
Registers the listener for playing specific prompts to the user.
- Parameters:
listener
- The instance of ITextToSpeechApi
-
registerHttpProxy
abstract Unit registerHttpProxy()
This method registers the http instance to voice service for being able to execute http calls. Must be called before initialising the VoiceService
-
sendText
abstract Unit sendText(String text)
This method will send user voice command to voice service as a text.
- Parameters:
text
- The voice command that should be sent to voice service.
-
updateContext
abstract Unit updateContext(String jsonContent)
This method will send the current context to voice.
- Parameters:
jsonContent
- The context that has to be sent to voice.
-
updateSettings
abstract Unit updateSettings(String jsonContent)
This method will send the settings information required by voice service for a proper run
- Parameters:
jsonContent
- The settings info that should be sent to voice.
-
setInternetConnection
abstract Unit setInternetConnection(Boolean hasInternetConnection)
This method will set the state of the internet connection
- Parameters:
hasInternetConnection
- True if there is internet connection and false otherwise¬
-
-
-
-