SSE 即時轉錄進度事件流
無需頻繁輪詢任務介面,直接建立 Server-Sent Events (SSE) 長連線,即可即時接收轉錄百分比與分段字幕。
HTTP 請求
http
GET /v1/file-transcription/transcriptions/{task_id}/stream
Authorization: Bearer sk-oneasr-...
Accept: text/event-stream事件流格式
text
event: progress
data: {"progress": 0.25, "processed_seconds": 180.0, "total_seconds": 720.0}
event: chunk
data: {"chunk_id": 1, "text": "在今天的研發會議中...", "start": 0.0, "end": 4.5}
event: completed
data: {"status": "completed", "duration": 720.5}