Tizen Native API
6.0
|
The Multi assistant client API provides functions for getting queries from multi assistant service and sending responses.
Functions | |
int | ma_initialize (void) |
Initializes multi-assistant client. | |
int | ma_deinitialize (void) |
Deinitializes multi-assistant client. | |
int | ma_prepare (void) |
Prepares multi-assistant client. | |
int | ma_unprepare (void) |
Unprepares multi-assistant client. | |
int | ma_get_state (ma_state_e *state) |
Gets the current state of the multi-assistant client. | |
int | ma_get_current_language (char **language) |
Gets the current language of multi-assistant client. | |
int | ma_get_recording_audio_format (int *rate, ma_audio_channel_e *channel, ma_audio_type_e *audio_type) |
Gets the recording audio format. | |
int | ma_set_state_changed_cb (ma_state_changed_cb callback, void *user_data) |
Sets a state changed callback. | |
int | ma_unset_state_changed_cb (void) |
Unsets a state changed callback. | |
int | ma_set_error_cb (ma_error_cb callback, void *user_data) |
Sets an error callback. | |
int | ma_unset_error_cb (void) |
Unsets an error callback. | |
int | ma_set_language_changed_cb (ma_language_changed_cb callback, void *user_data) |
Sets a language changed callback. | |
int | ma_unset_language_changed_cb (void) |
Unsets a language changed callback. | |
int | ma_set_audio_streaming_cb (ma_audio_streaming_cb callback, void *user_data) |
Sets an audio streaming callback. | |
int | ma_unset_audio_streaming_cb (void) |
Unsets an audio streaming callback. | |
int | ma_send_asr_result (ma_asr_result_event_e event, const char *asr_result) |
Sends ASR(auto speech recognition) results to the multi-assistant service. | |
int | ma_send_result (const char *display_text, const char *utterance_text, const char *result_json) |
Sends results to the multi-assistant service. | |
int | ma_send_recognition_result (ma_recognition_result_event_e result) |
Sends recognition result to the multi-assistant service. | |
int | ma_set_active_state_changed_cb (ma_active_state_changed_cb callback, void *user_data) |
Sets the active state changed callback. | |
int | ma_unset_active_state_changed_cb (void) |
Unsets the active state changed callback. | |
int | ma_start_receiving_audio_streaming_data (ma_audio_streaming_data_type_e type) |
Starts receiving audio streaming data. | |
int | ma_stop_receiving_audio_streaming_data (ma_audio_streaming_data_type_e type) |
Stops receiving audio streaming data. | |
int | ma_update_voice_feedback_state (ma_voice_feedback_state_e state) |
Updates the state of client's voice feedback to the server. | |
int | ma_send_assistant_specific_command (const char *command) |
Sends an assistant-specific command to the server. | |
int | ma_set_wakeup_engine_command_cb (ma_wakeup_engine_command_cb callback, void *user_data) |
Sets the wakeup engine command callback. | |
int | ma_unset_wakeup_engine_command_cb (void) |
Unsets the callback. | |
int | ma_assistant_info_foreach_assistants (ma_assistant_info_list_cb callback, void *user_data) |
Retrieves the information about all installed voice assistant applications. | |
int | ma_assistant_info_get_app_id (ma_assistant_info_h handle, char **app_id) |
Gets the app id of the specified handle. | |
int | ma_assistant_info_get_enabled_status (ma_assistant_info_h handle, bool *status) |
Gets the enabled status of the specified handle. | |
int | ma_get_recording_audio_source_type (char **type) |
Gets the recording audio source type. | |
int | ma_set_background_volume (double ratio) |
Sets the background volume. | |
int | ma_set_preprocessing_allow_mode (ma_preprocessing_allow_mode_e mode, const char *app_id) |
Sets the preprocessing allow mode. | |
int | ma_set_preprocessing_information_changed_cb (ma_preprocessing_information_changed_cb callback, void *user_data) |
Sets the preprocessing information changed callback. | |
int | ma_unset_preprocessing_information_changed_cb (void) |
Unsets the preprocessing information changed callback. | |
int | ma_send_preprocessing_result (bool is_success) |
Sends the preprocessing result. | |
int | ma_set_wake_word_audio_require_flag (bool require) |
Sets whether multi-assistant service should send wake word audio data. | |
int | ma_set_audio_streaming_data_section_changed_cb (ma_audio_streaming_data_section_changed_cb callback, void *user_data) |
Sets the section changed callback for audio streaming data. | |
int | ma_unset_audio_streaming_data_section_changed_cb (void) |
Unsets the section changed callback for audio streaming data. | |
int | ma_set_assistant_wakeup_language (const char *language) |
Sets the language configuration for wake word detection. | |
int | ma_set_service_state_changed_cb (ma_service_state_changed_cb callback, void *user_data) |
Sets the service state changed callback. | |
int | ma_unset_service_state_changed_cb (void) |
Unsets the service state changed callback. | |
int | ma_set_voice_key_status_changed_cb (ma_voice_key_status_changed_cb callback, void *user_data) |
Sets a voice key status changed callback. | |
int | ma_unset_voice_key_status_changed_cb (void) |
Unsets a voice key status changed callback. | |
int | ma_add_wake_word (const char *wake_word, const char *language) |
Adds a group of wake words for activating assistant. | |
int | ma_remove_wake_word (const char *wake_word, const char *language) |
Removes a group of wake words for activating assistant. |
Function Documentation
int ma_add_wake_word | ( | const char * | wake_word, |
const char * | language | ||
) |
Adds a group of wake words for activating assistant.
A <word, language> pair with the same word and the different language identifies a different operation. For example, <"Hi Tizen", "en_US"> and <"Hi Tizen", "en_GB"> will operate differently. When the wake up language is set to "en_GB", although <"Hi Tizen", "en_US"> is added, then "Hi Tizen" won't wake up the Tizen voice assistant. <"Hi Tizen", "en_GB"> have to be added for this use case.
Adding the same word twice does not return any errors.
- Since :
- 6.0
- Parameters:
-
[in] wake_word The wake word to be added to the list of wake words [in] language The language code for which the word will be added. The language is identified by its code (e.g. "en_US").
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MA_ERROR_NONE Successful MA_ERROR_NOT_SUPPORTED Not supported MA_ERROR_INVALID_PARAMETER Invalid parameter MA_ERROR_INVALID_STATE Invalid state MA_ERROR_OPERATION_FAILED Operation failed
- Precondition:
- The state should be MA_STATE_READY.
int ma_assistant_info_foreach_assistants | ( | ma_assistant_info_list_cb | callback, |
void * | user_data | ||
) |
Retrieves the information about all installed voice assistant applications.
- Since :
- 5.5
- Parameters:
-
[in] callback The callback for getting the information of installed assistants. [in] user_data The user data passed to the callback function
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MA_ERROR_NONE Successful MA_ERROR_NOT_SUPPORTED Not supported MA_ERROR_INVALID_PARAMETER Invalid parameter MA_ERROR_INVALID_STATE Invalid state
- See also:
- ma_assistant_info_list_cb()
int ma_assistant_info_get_app_id | ( | ma_assistant_info_h | handle, |
char ** | app_id | ||
) |
Gets the app id of the specified handle.
- Since :
- 5.5
- Remarks:
- You must not release app_id using free().
- Parameters:
-
[in] handle The handle to the assistant's information [out] app_id The application ID of the given assistant handle
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MA_ERROR_NONE Successful MA_ERROR_NOT_SUPPORTED Not supported MA_ERROR_INVALID_PARAMETER Invalid parameter
int ma_assistant_info_get_enabled_status | ( | ma_assistant_info_h | handle, |
bool * | status | ||
) |
Gets the enabled status of the specified handle.
- Since :
- 5.5
- Parameters:
-
[in] handle The handle to the assistant's information [in] status The enable status of the given assistant handle
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MA_ERROR_NONE Successful MA_ERROR_NOT_SUPPORTED Not supported MA_ERROR_INVALID_PARAMETER Invalid parameter
int ma_deinitialize | ( | void | ) |
Deinitializes multi-assistant client.
- Since :
- 5.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/recorder
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MA_ERROR_NONE Successful MA_ERROR_NOT_SUPPORTED Not supported MA_ERROR_PERMISSION_DENIED Permission denied MA_ERROR_INVALID_STATE Invalid state
- Postcondition:
- If this function is called, the state will be MA_STATE_NONE.
- See also:
- ma_initialize()
int ma_get_current_language | ( | char ** | language | ) |
Gets the current language of multi-assistant client.
- Since :
- 5.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/recorder
- Remarks:
- The language should be released using free().
- Parameters:
-
[out] language The current language
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MA_ERROR_NONE Successful MA_ERROR_NOT_SUPPORTED Not supported MA_ERROR_PERMISSION_DENIED Permission denied MA_ERROR_INVALID_PARAMETER Invalid parameter
int ma_get_recording_audio_format | ( | int * | rate, |
ma_audio_channel_e * | channel, | ||
ma_audio_type_e * | audio_type | ||
) |
Gets the recording audio format.
- Since :
- 5.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/recorder
- Parameters:
-
[out] rate The audio sampling rate [out] channel The audio channel [out] audio_type The audio type
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MA_ERROR_NONE Successful MA_ERROR_NOT_SUPPORTED Not supported MA_ERROR_PERMISSION_DENIED Permission denied MA_ERROR_INVALID_PARAMETER Invalid parameter MA_ERROR_INVALID_STATE Invalid state MA_ERROR_OPERATION_FAILED Operation failed
- Precondition:
- The state should be MA_STATE_READY.
int ma_get_recording_audio_source_type | ( | char ** | type | ) |
Gets the recording audio source type.
- Since :
- 5.5
- Remarks:
- You must release type using free().
- Parameters:
-
[out] type The audio source type
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MA_ERROR_NONE Successful MA_ERROR_NOT_SUPPORTED Not supported MA_ERROR_INVALID_PARAMETER Invalid parameter MA_ERROR_INVALID_STATE Invalid state MA_ERROR_OPERATION_FAILED Operation failed
- Precondition:
- The state should be MA_STATE_READY.
int ma_get_state | ( | ma_state_e * | state | ) |
Gets the current state of the multi-assistant client.
- Since :
- 5.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/recorder
- Parameters:
-
[out] state The current state
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MA_ERROR_NONE Successful MA_ERROR_NOT_SUPPORTED Not supported MA_ERROR_PERMISSION_DENIED Permission denied MA_ERROR_INVALID_PARAMETER Invalid parameter MA_ERROR_INVALID_STATE Invalid state
int ma_initialize | ( | void | ) |
Initializes multi-assistant client.
- Since :
- 5.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/recorder
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MA_ERROR_NONE Successful MA_ERROR_NOT_SUPPORTED Not supported MA_ERROR_PERMISSION_DENIED Permission denied MA_ERROR_OPERATION_FAILED Operation failed MA_ERROR_OUT_OF_MEMORY Out of memory
- Postcondition:
- If this function is called, the state will be MA_STATE_INITIALIZED.
- See also:
- ma_deinitialize()
int ma_prepare | ( | void | ) |
Prepares multi-assistant client.
- Since :
- 5.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/recorder
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MA_ERROR_NONE Successful MA_ERROR_NOT_SUPPORTED Not supported MA_ERROR_PERMISSION_DENIED Permission denied MA_ERROR_INVALID_STATE Invalid state
- Precondition:
- The state should be MA_STATE_INITIALIZED.
- Postcondition:
- If this function is called, the state will be MA_STATE_READY.
- See also:
- ma_unprepare()
int ma_remove_wake_word | ( | const char * | wake_word, |
const char * | language | ||
) |
Removes a group of wake words for activating assistant.
A <word, language> pair with the same word and the different language identifies a different operation. For example, <"Hi Tizen", "en_US"> and <"Hi Tizen", "en_GB"> will operate differently. Removing an unregistered word doesn't return any errors.
- Since :
- 6.0
- Parameters:
-
[in] wake_word The wake word to be removed from the list of wake words [in] language The language code for which the word will be removed. The language is identified by its code (e.g. "en_US").
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MA_ERROR_NONE Successful MA_ERROR_NOT_SUPPORTED Not supported MA_ERROR_INVALID_PARAMETER Invalid parameter MA_ERROR_INVALID_STATE Invalid state MA_ERROR_OPERATION_FAILED Operation failed
- Precondition:
- The state should be MA_STATE_READY.
int ma_send_asr_result | ( | ma_asr_result_event_e | event, |
const char * | asr_result | ||
) |
Sends ASR(auto speech recognition) results to the multi-assistant service.
- Since :
- 5.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/recorder
- Parameters:
-
[in] event The ASR result event (e.g. MA_ASR_RESULT_EVENT_FINAL_RESULT) [in] asr_result The ASR result text
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MA_ERROR_NONE Successful MA_ERROR_NOT_SUPPORTED Not supported MA_ERROR_PERMISSION_DENIED Permission denied MA_ERROR_INVALID_PARAMETER Invalid parameter
int ma_send_assistant_specific_command | ( | const char * | command | ) |
Sends an assistant-specific command to the server.
- Since :
- 5.5
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/recorder
- Parameters:
-
[in] command The command to be sent to the server
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MA_ERROR_NONE Successful MA_ERROR_NOT_SUPPORTED Not supported MA_ERROR_PERMISSION_DENIED Permission denied MA_ERROR_INVALID_PARAMETER Invalid parameter
int ma_send_preprocessing_result | ( | bool | is_success | ) |
Sends the preprocessing result.
- Since :
- 5.5
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/recorder
- Parameters:
-
[in] is_success The result value to be sent, indicating whether the preprocessing succeeded or not
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MA_ERROR_NONE Successful MA_ERROR_NOT_SUPPORTED Not supported MA_ERROR_PERMISSION_DENIED Permission denied MA_ERROR_INVALID_STATE Invalid state MA_ERROR_OPERATION_FAILED Operation failed
- Precondition:
- The state should be MA_STATE_READY.
int ma_send_recognition_result | ( | ma_recognition_result_event_e | result | ) |
Sends recognition result to the multi-assistant service.
- Since :
- 5.5
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/recorder
- Parameters:
-
[in] result The recognition result
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MA_ERROR_NONE Successful MA_ERROR_NOT_SUPPORTED Not supported MA_ERROR_PERMISSION_DENIED Permission denied MA_ERROR_INVALID_PARAMETER Invalid parameter
int ma_send_result | ( | const char * | display_text, |
const char * | utterance_text, | ||
const char * | result_json | ||
) |
Sends results to the multi-assistant service.
- Since :
- 5.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/recorder
- Parameters:
-
[in] display_text The text shown on the display [in] utterance_text The utterance text [in] result_json The result data (JSON format)
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MA_ERROR_NONE Successful MA_ERROR_NOT_SUPPORTED Not supported MA_ERROR_PERMISSION_DENIED Permission denied MA_ERROR_INVALID_PARAMETER Invalid parameter
int ma_set_active_state_changed_cb | ( | ma_active_state_changed_cb | callback, |
void * | user_data | ||
) |
Sets the active state changed callback.
- Since :
- 5.5
- Parameters:
-
[in] callback The callback [in] user_data The user data passed to the callback function
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MA_ERROR_NONE Successful MA_ERROR_NOT_SUPPORTED Not supported MA_ERROR_INVALID_PARAMETER Invalid parameter MA_ERROR_INVALID_STATE Invalid state
- Precondition:
- The state should be MA_STATE_INITIALIZED.
int ma_set_assistant_wakeup_language | ( | const char * | language | ) |
Sets the language configuration for wake word detection.
The language configuration of the assistant that invoked this function will be changed and language configurations of other assistants will remain unchanged.
- Since :
- 6.0
- Parameters:
-
[in] language The language configuration that will be used for wake word detection. It should be denoted by two-letter code defined by ISO 639-1, optionally combined with two-letter code defined by ISO 3166. For example, "ko_KR" for Korean, "en_US" for American English.
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MA_ERROR_NONE Successful MA_ERROR_NOT_SUPPORTED Not supported MA_ERROR_INVALID_PARAMETER Invalid parameter MA_ERROR_INVALID_STATE Invalid state
- Precondition:
- The state should be MA_STATE_READY.
int ma_set_audio_streaming_cb | ( | ma_audio_streaming_cb | callback, |
void * | user_data | ||
) |
Sets an audio streaming callback.
- Since :
- 5.0
- Parameters:
-
[in] callback The callback [in] user_data The user data passed to the callback function
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MA_ERROR_NONE Successful MA_ERROR_NOT_SUPPORTED Not supported MA_ERROR_INVALID_PARAMETER Invalid parameter MA_ERROR_INVALID_STATE Invalid state
- Precondition:
- The state should be MA_STATE_INITIALIZED.
int ma_set_audio_streaming_data_section_changed_cb | ( | ma_audio_streaming_data_section_changed_cb | callback, |
void * | user_data | ||
) |
Sets the section changed callback for audio streaming data.
- Since :
- 5.5
- Parameters:
-
[in] callback The callback [in] user_data The user data passed to the callback function
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MA_ERROR_NONE Successful MA_ERROR_NOT_SUPPORTED Not supported MA_ERROR_INVALID_PARAMETER Invalid parameter MA_ERROR_INVALID_STATE Invalid state
- Precondition:
- The state should be MA_STATE_INITIALIZED.
int ma_set_background_volume | ( | double | ratio | ) |
Sets the background volume.
- Since :
- 5.5
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/volume.set
- Remarks:
- The ratio must be a value between 0.0 and 1.0 (inclusive).
- Parameters:
-
[in] ratio The volume ratio to be set
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MA_ERROR_NONE Successful MA_ERROR_NOT_SUPPORTED Not supported MA_ERROR_PERMISSION_DENIED Permission denied MA_ERROR_INVALID_PARAMETER Invalid parameter MA_ERROR_INVALID_STATE Invalid state MA_ERROR_OPERATION_FAILED Operation failed
- Precondition:
- The state should be MA_STATE_READY.
int ma_set_error_cb | ( | ma_error_cb | callback, |
void * | user_data | ||
) |
Sets an error callback.
- Since :
- 5.0
- Parameters:
-
[in] callback The callback [in] user_data The user data passed to the callback function
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MA_ERROR_NONE Successful MA_ERROR_NOT_SUPPORTED Not supported MA_ERROR_INVALID_PARAMETER Invalid parameter MA_ERROR_INVALID_STATE Invalid state
- Precondition:
- The state should be MA_STATE_INITIALIZED.
- See also:
- ma_error_cb()
- ma_unset_error_cb()
int ma_set_language_changed_cb | ( | ma_language_changed_cb | callback, |
void * | user_data | ||
) |
Sets a language changed callback.
- Since :
- 5.0
- Parameters:
-
[in] callback The callback [in] user_data The user data passed to the callback function
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MA_ERROR_NONE Successful MA_ERROR_NOT_SUPPORTED Not supported MA_ERROR_INVALID_PARAMETER Invalid parameter MA_ERROR_INVALID_STATE Invalid state
- Precondition:
- The state should be MA_STATE_INITIALIZED.
int ma_set_preprocessing_allow_mode | ( | ma_preprocessing_allow_mode_e | mode, |
const char * | app_id | ||
) |
Sets the preprocessing allow mode.
- Since :
- 5.5
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/recorder
- Remarks:
- If the app_id is NULL, allow mode will be applied regardless of app_id.
- Parameters:
-
[in] mode The preprocessing allow mode to be set [in] app_id The application ID of the assistant to perform preprocessing
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MA_ERROR_NONE Successful MA_ERROR_NOT_SUPPORTED Not supported MA_ERROR_PERMISSION_DENIED Permission denied MA_ERROR_INVALID_STATE Invalid state MA_ERROR_OPERATION_FAILED Operation failed
- Precondition:
- The state should be MA_STATE_READY.
int ma_set_preprocessing_information_changed_cb | ( | ma_preprocessing_information_changed_cb | callback, |
void * | user_data | ||
) |
Sets the preprocessing information changed callback.
- Since :
- 5.5
- Parameters:
-
[in] callback The callback [in] user_data The user data passed to the callback function
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MA_ERROR_NONE Successful MA_ERROR_NOT_SUPPORTED Not supported MA_ERROR_INVALID_PARAMETER Invalid parameter MA_ERROR_INVALID_STATE Invalid state
- Precondition:
- The state should be MA_STATE_INITIALIZED.
int ma_set_service_state_changed_cb | ( | ma_service_state_changed_cb | callback, |
void * | user_data | ||
) |
Sets the service state changed callback.
- Since :
- 6.0
- Parameters:
-
[in] callback The callback [in] user_data The user data passed to the callback function
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MA_ERROR_NONE Successful MA_ERROR_NOT_SUPPORTED Not supported MA_ERROR_INVALID_PARAMETER Invalid parameter MA_ERROR_INVALID_STATE Invalid state
- Precondition:
- The state should be MA_STATE_INITIALIZED.
int ma_set_state_changed_cb | ( | ma_state_changed_cb | callback, |
void * | user_data | ||
) |
Sets a state changed callback.
- Since :
- 5.0
- Parameters:
-
[in] callback The callback [in] user_data The user data passed to the callback function
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MA_ERROR_NONE Successful MA_ERROR_NOT_SUPPORTED Not supported MA_ERROR_INVALID_PARAMETER Invalid parameter MA_ERROR_INVALID_STATE Invalid state
- Precondition:
- The state should be MA_STATE_INITIALIZED.
int ma_set_voice_key_status_changed_cb | ( | ma_voice_key_status_changed_cb | callback, |
void * | user_data | ||
) |
Sets a voice key status changed callback.
- Since :
- 6.0
- Parameters:
-
[in] callback The callback [in] user_data The user data passed to the callback function
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MA_ERROR_NONE Successful MA_ERROR_NOT_SUPPORTED Not supported MA_ERROR_INVALID_PARAMETER Invalid parameter MA_ERROR_INVALID_STATE Invalid state
- Precondition:
- The state should be MA_STATE_INITIALIZED.
int ma_set_wake_word_audio_require_flag | ( | bool | require | ) |
Sets whether multi-assistant service should send wake word audio data.
If set to true, wake word audio data will be included in audio streaming data.
The wake word is the way you initiate a conversation with your vocal assistant. It is a predefined keyword automatically detected from continuously streaming audio.
Use ma_set_audio_streaming_data_section_changed_cb() to be informed about switching between wake word and regular audio data.
- Since :
- 5.5
- Parameters:
-
[in] require The require value to be set
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MA_ERROR_NONE Successful MA_ERROR_NOT_SUPPORTED Not supported MA_ERROR_INVALID_STATE Invalid state MA_ERROR_OPERATION_FAILED Operation failed
- Precondition:
- The state should be MA_STATE_READY.
int ma_set_wakeup_engine_command_cb | ( | ma_wakeup_engine_command_cb | callback, |
void * | user_data | ||
) |
Sets the wakeup engine command callback.
The wakeup engine command callback will be called when the wakeup engine sends wakeup engine specific command to the voice assistant. The command MUST be defined by both wakeup engine and voice assistant.
- Since :
- 5.5
- Parameters:
-
[in] callback The callback [in] user_data The user data passed to the callback function
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MA_ERROR_NONE Successful MA_ERROR_NOT_SUPPORTED Not supported MA_ERROR_INVALID_PARAMETER Invalid parameter MA_ERROR_INVALID_STATE Invalid state
- Precondition:
- The state should be MA_STATE_INITIALIZED.
Starts receiving audio streaming data.
- Since :
- 5.5
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/recorder
- Parameters:
-
[in] type The type of audio data to start streaming
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MA_ERROR_NONE Successful MA_ERROR_NOT_SUPPORTED Not supported MA_ERROR_PERMISSION_DENIED Permission denied MA_ERROR_INVALID_PARAMETER Invalid parameter
Stops receiving audio streaming data.
- Since :
- 5.5
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/recorder
- Parameters:
-
[in] type The type of audio data to stop streaming
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MA_ERROR_NONE Successful MA_ERROR_NOT_SUPPORTED Not supported MA_ERROR_PERMISSION_DENIED Permission denied MA_ERROR_INVALID_PARAMETER Invalid parameter
int ma_unprepare | ( | void | ) |
Unprepares multi-assistant client.
- Since :
- 5.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/recorder
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MA_ERROR_NONE Successful MA_ERROR_NOT_SUPPORTED Not supported MA_ERROR_PERMISSION_DENIED Permission denied MA_ERROR_INVALID_STATE Invalid state
- Precondition:
- The state should be MA_STATE_READY.
- Postcondition:
- If this function is called, the state will be MA_STATE_INITIALIZED.
- See also:
- ma_prepare()
int ma_unset_active_state_changed_cb | ( | void | ) |
Unsets the active state changed callback.
- Since :
- 5.5
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MA_ERROR_NONE Successful MA_ERROR_NOT_SUPPORTED Not supported MA_ERROR_INVALID_STATE Invalid state
- Precondition:
- The state should be MA_STATE_INITIALIZED.
int ma_unset_audio_streaming_cb | ( | void | ) |
Unsets an audio streaming callback.
- Since :
- 5.0
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MA_ERROR_NONE Successful MA_ERROR_NOT_SUPPORTED Not supported MA_ERROR_INVALID_STATE Invalid state
- Precondition:
- The state should be MA_STATE_INITIALIZED.
int ma_unset_audio_streaming_data_section_changed_cb | ( | void | ) |
Unsets the section changed callback for audio streaming data.
- Since :
- 5.5
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MA_ERROR_NONE Successful MA_ERROR_NOT_SUPPORTED Not supported MA_ERROR_INVALID_STATE Invalid state
- Precondition:
- The state should be MA_STATE_INITIALIZED.
int ma_unset_error_cb | ( | void | ) |
Unsets an error callback.
- Since :
- 5.0
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MA_ERROR_NONE Successful MA_ERROR_NOT_SUPPORTED Not supported MA_ERROR_INVALID_STATE Invalid state
- Precondition:
- The state should be MA_STATE_INITIALIZED.
- See also:
- ma_error_cb()
- ma_set_error_cb()
int ma_unset_language_changed_cb | ( | void | ) |
Unsets a language changed callback.
- Since :
- 5.0
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MA_ERROR_NONE Successful MA_ERROR_NOT_SUPPORTED Not supported MA_ERROR_INVALID_STATE Invalid state
- Precondition:
- The state should be MA_STATE_INITIALIZED.
int ma_unset_preprocessing_information_changed_cb | ( | void | ) |
Unsets the preprocessing information changed callback.
- Since :
- 5.5
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MA_ERROR_NONE Successful MA_ERROR_NOT_SUPPORTED Not supported MA_ERROR_INVALID_STATE Invalid state
- Precondition:
- The state should be MA_STATE_INITIALIZED.
int ma_unset_service_state_changed_cb | ( | void | ) |
Unsets the service state changed callback.
- Since :
- 6.0
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MA_ERROR_NONE Successful MA_ERROR_NOT_SUPPORTED Not supported MA_ERROR_INVALID_STATE Invalid state
- Precondition:
- The state should be MA_STATE_INITIALIZED.
int ma_unset_state_changed_cb | ( | void | ) |
Unsets a state changed callback.
- Since :
- 5.0
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MA_ERROR_NONE Successful MA_ERROR_NOT_SUPPORTED Not supported MA_ERROR_INVALID_STATE Invalid state
- Precondition:
- The state should be MA_STATE_INITIALIZED.
int ma_unset_voice_key_status_changed_cb | ( | void | ) |
Unsets a voice key status changed callback.
- Since :
- 6.0
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MA_ERROR_NONE Successful MA_ERROR_NOT_SUPPORTED Not supported MA_ERROR_INVALID_STATE Invalid state
- Precondition:
- The state should be MA_STATE_INITIALIZED.
int ma_unset_wakeup_engine_command_cb | ( | void | ) |
Unsets the callback.
- Since :
- 5.5
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MA_ERROR_NONE Successful MA_ERROR_NOT_SUPPORTED Not supported MA_ERROR_INVALID_STATE Invalid state
- Precondition:
- The state should be MA_STATE_INITIALIZED.
int ma_update_voice_feedback_state | ( | ma_voice_feedback_state_e | state | ) |
Updates the state of client's voice feedback to the server.
- Since :
- 5.5
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/recorder
- Parameters:
-
[in] state The current state of voice feedback
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
MA_ERROR_NONE Successful MA_ERROR_NOT_SUPPORTED Not supported MA_ERROR_PERMISSION_DENIED Permission denied MA_ERROR_INVALID_PARAMETER Invalid parameter