Multi-Speaker Transcription
Convert multi-speaker audio into transcription results with speaker information — ideal for meetings, interviews, and podcasts.
Workflow
POST /v1/audio/transcriptions
Endpoint
moss-transcribe-diarize
Model
Create an API Key
Open the API Key management platform, create an API Key, and save it as an environment variable. Do not write the API Key into client-side code or commit it to a repository.
Example export MOSS_API_KEY="<your-api-key>"Prepare the request input
Multi-speaker transcription reuses the transcription endpoint: set
modeltomoss-transcribe-diarizeand passdiarize=true, providing the multi-speaker audio to transcribe.file / file_id / url / audio_url: audio to transcribe model: moss-transcribe-diarize diarize: true
request.json { "model": "moss-transcribe-diarize", "file_id": "<file_id>", "diarize": true, "response_format": "json" }Send your first request
Send a request to
POST /v1/audio/transcriptions; a synchronous request returns the transcription result with speaker information directly.curl https://api.mosi.cn/v1/audio/transcriptions \ -H "Authorization: Bearer $MOSS_API_KEY" \ -H "Content-Type: application/json" \ -d @request.jsonRetrieve the result
A synchronous request returns the result directly. If you pass
async=true, the endpoint first returns atask_id, which you then use to query the transcription task.Query the transcription task curl https://api.mosi.cn/v1/audio/transcriptions/$TASK_ID \ -H "Authorization: Bearer $MOSS_API_KEY"Verify success
Success indicator: you obtain a transcription result with speaker information. The success response may include
segments, where each segment containsstart,end,text, andspeaker.