Call the Fun-ASR-Flash non-real-time speech recognition HTTP API to transcribe audio files. This reference covers the endpoints, request headers, body parameters, and response fields.
User guide:Non-real-time speech recognition. For information about supported audio formats, file size limits, duration limits, and other input requirements, see audio input requirements.
SDK calls are not supported for this feature.
Server endpoint
Singapore
POST https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generation
Replace {WorkspaceId} with your actual Workspace ID.
China North 2 (Beijing)
POST https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generation
Replace {WorkspaceId} with your actual Workspace ID.
Alibaba Cloud Model Studio has released workspace-specific domains for the China (Beijing) and Singapore regions. The new dedicated domains deliver superior performance and higher stability for inference requests. We recommend migrating to the new domains:
China (Beijing): from
dashscope.aliyuncs.comto{WorkspaceId}.cn-beijing.maas.aliyuncs.comSingapore: from
dashscope-intl.aliyuncs.comto{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com
Replace {WorkspaceId} with your actual Workspace ID. The existing domains remain fully functional.
Request headers
Parameter | Type | Required | Description |
Authorization | string | Yes | Authentication token in the format |
Content-Type | string | Yes | Media type of the request body. Always |
X-DashScope-SSE | string | Yes | Specifies whether results are returned as Server-Sent Events (SSE). When set to |
Request body | The following examples use the Singapore region configuration. Replace {WorkspaceId} with your actual Workspace ID. Configurations vary by region. The API key for the Singapore region is different from the API key for the Beijing region. Non-streamingStreamingWith context - non-streamingWith context - streamingBase64You can provide Base64-encoded data as a Data URI in the format:
|
model Model name. Always | |
input Contains the messages to recognize, including the audio and optional conversation context. | |
parameters Recognition parameters. |
Response body | Non-streamingStreamingWhen Response example: |
request_id Unique identifier for this request. | |
output Recognition result. | |
usage Usage information. Returned only when |
SSE streaming result processing
In streaming mode, the client must do the following:
For each SSE event, parse the JSON in the
datafield.Use
output.sentence.sentence_endto determine whether the current sentence is complete. Iftrue, sentence recognition is complete and the word-level timestamps are stable. Iffalse, recognition is still in progress and the text and timestamps may be updated in subsequent events.usageinformation is returned only in sentence-end events and indicates the audio processing duration.