Turn a spoken question into a direct answer with the Q&A post-processing task
The Question Answering task (get_answer) treats an audio transcript as a spoken
question and returns a direct answer instead of a summary. It is
category-independent and works across every supported language.
When get_answer is TRUE, the transcript is treated as a question and only the
answer (transcript_answer) is returned. All other post-processing options
(summary, SOAP note, entity list, etc.) are ignored for that request, regardless
of the selected use_category.
By default the answer is produced in the language of the question (the input
language). To force a different answer language, set
use_language_data_extraction_output to the desired language code.
The example below sends a Swahili audio question using the file_category_general
category and requests the answer in English by setting
use_language_data_extraction_output to en.
The transcript (audio_transcript) is returned in the question’s language, while
the answer (transcript_answer) is returned in the requested output language.
The request can timeout with an http status code 503 and the file-id in 120 seconds.
The file-id in the response can be used to get the file’s status with the
Get File Status endpoint.
Copy
{ "data": { "file_id": "12a9760f-b165-4404-91d0-a65d4cdt78fs", "processing_status": "FILE_TRANSCRIBED", "audio_file_name": "my_question", "audio_transcript": "Mji mkuu wa Kenya ni upi?", "processed_audio_duration_in_seconds": 6, "transcript_answer": "The capital city of Kenya is Nairobi." }, "message": "file status found", "status": "Ok"}