請求主體
要轉錄的音訊檔案。支援的格式:flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, webm。
音訊的語言,採用 ISO-639-1 格式(例如:en、zh、ja)。
輸出格式:json、text、srt、verbose_json、vtt。
時間戳記精細度:word 和/或 segment。需要 verbose_json。
針對 verbose_json:
curl -X POST "https://api.lemondata.cc/v1/audio/transcriptions" \
-H "Authorization: Bearer sk-your-api-key" \
-F file="@audio.mp3" \
-F model="whisper-1" \
-F language="en"
{
"text": "Hello, this is a test of the transcription API."
}
若要將音訊翻譯為英文,請使用翻譯端點:
response = client.audio.translations.create(
model="whisper-1",
file=audio_file
)