stepaudio-2.5-asr.
For WebSocket-based real-time bidirectional streaming recognition, see Streaming Speech Recognition (Bidirectional Streaming).
Endpoint
POST https://api.stepfun.ai/v1/audio/asr/sse
For Step Plan, use
POST https://api.stepfun.ai/step_plan/v1/audio/asr/sse.Request Headers
Content-Typestringrequired
Must beapplication/json.Acceptstringrequired
Must betext/event-stream.Authorizationstringrequired
Authentication token in the formatBearer $STEPFUN_API_KEY.
Request Parameters
-
audioobjectrequired
Audio data and recognition configuration.
Request Example
Compatibility note: The SSE endpoint no longer supports the
full_rerun_on_commit (second-pass correction) parameter. If legacy clients still send it, the server ignores it without affecting the recognition result. For second-pass correction, use the WebSocket endpoint (see Streaming Speech Recognition (Bidirectional Streaming)).- Audio data must be Base64-encoded.
- Supported audio formats:
ogg,mp3,wav,pcm,m4a. - When the audio format is
pcm,rate,bits, andchannelare required; forogg,mp3,wav, andm4athey are optional.
Response
SSE streaming response with the following event types.Delta event (transcript.text.delta)
Incremental transcription text.typestring
Event type. Fixed astranscript.text.delta.meta.session_idstring
Session ID.meta.timestampint64
Server-side event Unix timestamp, in milliseconds.deltastring
Incremental transcription text.
Done event (transcript.text.done)
The complete transcription text has been generated.typestring
Event type. Fixed astranscript.text.done.meta.session_idstring
Session ID.meta.timestampint64
Unix timestamp, in milliseconds.textstring
The complete transcription text.usageobject
Usage statistics.
Error event (error)
Returned when recognition fails.typestring
Event type. Fixed aserror.meta.session_idstring
Session ID.meta.timestampint64
Unix timestamp, in milliseconds.messagestring
Error description.