DuerOS Service

[中文]

The DuerOS service allows voice interaction with DuerOS.

Application Example

Implementation of this API is demonstrated in the following example:

Header File

Functions

audio_service_handle_t dueros_service_create()

Create the dueros service.

Return

  • NULL, Fail

  • Others, Success

service_state_t dueros_service_state_get()

Get dueros service state.

Return

The state of service

esp_err_t dueros_voice_upload(audio_service_handle_t handle, void *buf, int len)

Upload voice to backend server.

Return

ESP_OK ESP_FAIL

Parameters
  • handle: dueros service handle

  • buf: Data buffer

  • len: Size of buffer

esp_err_t dueros_voice_cancel(audio_service_handle_t handle)

Cancel the current session.

Return

ESP_OK ESP_FAIL

Parameters
  • handle: dueros service handle