
讯飞智作
科大讯飞A one-stop voiceover platform for synthesizing ultra-realistic speech from text and generating digital human videos
Quickly transcribe recorded audio up to 5 hours via HTTP API into timestamped text with speaker information.
This API is aimed at developers. It takes recorded audio in wav/pcm/mp3 format (sample rate 16k, bit depth 16, mono, up to 500M and no more than 5 hours) as input, and outputs transcribed text in JSON format, including sentence-level timestamps, confidence scores, and optional speaker diarization results. It supports Chinese, English, and 202 dialects without language switching, with optional domain-specific parameters for courts, healthcare, finance, and other fields. Before calling, you need to obtain AppID, APIKey, and APISecret credentials from the iFlytek Open Platform console, authenticate with hmac-sha256 signatures, and retrieve results through an async workflow of file upload, task creation, and task polling. It is suitable for integration scenarios requiring batch processing of long audio, such as meeting notes, interview organization, and subtitle generation, but not for real-time streaming transcription needs.
In terms of technical workflow, the API is divided into three stages: file upload (small files under 30M uploaded in a single request, large files via three steps: initialization/chunking, chunk upload, and completion), task creation (pro_create), and task polling (query). Task statuses: 1 means pending, 2 means processing, 3 means processing completed, and 4 means callback completed; 3 and 4 indicate that recognition results exist. Optional parameters include speaker diarization (vspp_on; mp3 does not support role separation), domain personalization (pd, covering courts, education, finance, healthcare, technology, sports, government, gaming, e-commerce, and automotive), subtitle/transcript mode (enable_subtitle), mixed Chinese-English language mode (language_type), and session-level hotwords (dhw, UTF-8 encoded). The returned results consist of two groups: lattice (post-processed results) and lattice2 (raw pre-processing results), containing sentence start/end times (in milliseconds), word confidence scores, and word attributes. Transcription results are retained for 7 days. Authentication concatenates four parameters—host, date, request-line, and digest—and signs them with APISecret using hmac-sha256; the date uses the RFC1123 GMT format, and the server allows a maximum clock skew of 300 seconds. Official Java and Python sample code is provided.
Developers who need to integrate batch audio transcription capabilities, as well as teams with needs for meeting notes, interview organization, and subtitle/transcript production.
Obtain AppID, APIKey, and APISecret from the iFlytek Open Platform console, and get free quota or purchase a plan on the product page.
Prepare audio that meets the requirements (wav/pcm/mp3 with 16k sample rate, 16bit bit depth, mono), and upload the file to the API to get a download URL.
Call the task creation API, submitting parameters such as audio_url, language, domain, and accent, to get a task_id.
Poll or use callbacks to query the task; retrieve the transcription results once the task status is 3 or 4.
Parse the timestamps, text, and speaker information from lattice/lattice2 in the returned JSON; note that results are retained for 7 days.
You need to register an iFlytek Open Platform account and obtain API credentials in the console; obtain free quota or purchase a paid plan before testing or production use. Audio limits: up to 500M and no more than 5 hours, 5 minutes or longer recommended; mp3 does not support role separation; results are retained for 7 days.
费用与套餐:The documentation notes that you need to obtain free quota or purchase a paid plan on the product page; check the product page for specific pricing.