Update task configuration
Updated
Updates the configuration of a Real-time STT task.
https://api.agora.io/api/speech-to-text/v1/projects/{appid}/agents/{agentId}/updateUse this method to update the configuration of a Real-time STT task.
Path Parameters
Query Parameters
The sequence number of update requests. The integer value must be greater than or equal to 0. Ensure that the sequenceId of the next update request is greater than the value you specified for the previous request. The parameter ensures that Agora updates the transcription task according to the latest configuration you specified.
int64The specified update configuration item. To update multiple fields, use a comma separator. For example: updateMask=languages,rtcConfig.subscribeAudioUids,translateConfig.enable,translateConfig.languages.
Request Body
application/json
The transcription languages to recognize. You can specify up to 4 languages. Refer to Supported Languages for details. Choosing multiple transcription languages can affect both quality and cost. For best practices, see Optimize transcription quality and cost.
Keyword list. Use it to improve the recognition accuracy of specific words during transcription. Supports up to 500 words.
Configure the transcription language for the specified user ID. Supports up to 5 configuration items. If you set this field when calling join and now wish to specify no users, set this field to an empty array [].
Subscription configuration.
Subtitle translation configuration.
Response
- If the returned status code is
200, the request was successful. The response body contains the result of the request.
Response Body
application/json
application/json
Response schema
200application/jsonOK
The ID of the agent.
The Unix timestamp (in seconds) when the agent was created.
The current status of the agent:
IDLE: The agent is not initializedSTARTING: The agent is startingRUNNING: The agent is runningSTOPPING: The agent is exitingSTOPPED: The agent exited successfullyRECOVERING: The agent is recoveringFAILED: Agent exit failed
IDLE | STARTING | RUNNING | STOPPING | STOPPED | RECOVERING | FAILEDResponse
Refer to the detail and reason fields to understand the possible reasons for failure.
Request examples
curl --request POST \ --url 'https://api.agora.io/api/speech-to-text/v1/projects/:appid/agents/:agentid/update?sequenceId=1&updateMask=translateConfig.enable,translateConfig.languages' \ --header 'Authorization: Basic <credentials>' \ --data '{ "translateConfig": { "enable": true, "languages": [ { "source": "en-US", "target": ["ja-JP"] } ] }}'Response example
{ "agent_id": "Agent ID.", "create_ts": null, "status": "RUNNING"}{ "detail": "Details of the request failure.", "reason": "The reason why the request failed."}