Create a Audio Transcription
Creates an audio transcription.
Set the header 'Authorization: Bearer {your API key}' for authentication
In: header
The audio file object (not file name) to transcribe. File upload specifications are limited to:duration not exceeding 1 hour, and file size not exceeding 50MB.
binary"/path/to/file/audio.mp3"Corresponding Model Name. To better enhance service quality, we will make periodic changes to the models provided by this service, including but not limited to model on/offlining and adjustments to model service capabilities. We will notify you of such changes through appropriate means such as announcements or message pushes where feasible.
"FunAudioLLM/SenseVoiceSmall" | "TeleAI/TeleSpeechASR""FunAudioLLM/SenseVoiceSmall"Response Body
The response from the model. The response header contains the x-siliconcloud-trace-id field, which serves as a unique identifier for tracing requests, facilitating log queries and issue troubleshooting.
TypeScript Definitions
Use the response body type in TypeScript.
The transcribed text.
curl --request POST \
--url https://api.siliconflow.cn/v1/audio/transcriptions \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@path/to/your/audio.mp3" \
-F "model=FunAudioLLM/SenseVoiceSmall"
import requests
url = "https://api.siliconflow.cn/v1/audio/transcriptions"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
with open("path/to/your/audio.mp3", "rb") as audio_file:
files = {
"file": ("audio.mp3", audio_file),
"model": (None, "FunAudioLLM/SenseVoiceSmall")
}
response = requests.post(url, headers=headers, files=files)
print(response.text)
{
"text": "string"
}{
"code": 20012,
"message": "string",
"data": "string"
}"Invalid token""Forbidden""404 page not found"{
"message": "Request was rejected due to rate limiting. If you want more, please contact contact@siliconflow.cn. Details:TPM limit reached.",
"data": "string"
}{
"code": 50505,
"message": "Model service overloaded. Please try again later.",
"data": "string"
}"string"Delete a Voice POST
Delete user-defined voice style
Submit a Video POST
Generate a video through the input prompt. This API returns the user's current request ID. The user needs to poll the status interface to get the specific video link. The generated result is valid for 10 minutes, so please retrieve the video link promptly.