Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
POST /v1/audio/transcriptions を使用して音声をテキストに変換します
内容更新日: 2026-06-09
POST /v1/audio/transcriptions
file
model
whisper-1
language
zh
en
ja
response_format
json
text
srt
verbose_json
vtt
temperature
prompt
mp3
mp4
mpeg
mpga
m4a
wav
webm
curl -X POST https://api.crazyrouter.com/v1/audio/transcriptions \ -H "Authorization: Bearer YOUR_API_KEY" \ -F file=@audio.mp3 \ -F model=whisper-1 \ -F language=zh \ -F response_format=json
from openai import OpenAI client = OpenAI( api_key="YOUR_API_KEY", base_url="https://api.crazyrouter.com/v1" ) with open("audio.mp3", "rb") as audio_file: transcript = client.audio.transcriptions.create( model="whisper-1", file=audio_file, language="zh", response_format="json" ) print(transcript.text)
import OpenAI from "openai"; import fs from "fs"; const client = new OpenAI({ apiKey: "YOUR_API_KEY", baseURL: "https://api.crazyrouter.com/v1", }); const transcript = await client.audio.transcriptions.create({ model: "whisper-1", file: fs.createReadStream("audio.mp3"), language: "zh", }); console.log(transcript.text);
{ "text": "你好,欢迎使用 Crazyrouter API。今天我们来介绍一下语音转文字功能。" }
{ "task": "transcribe", "language": "chinese", "duration": 5.2, "text": "你好,欢迎使用 Crazyrouter API。", "segments": [ { "id": 0, "start": 0.0, "end": 2.5, "text": "你好,欢迎使用 Crazyrouter API。" } ] }
1 00:00:00,000 --> 00:00:02,500 你好,欢迎使用 Crazyrouter API。
POST /v1/audio/translations
with open("chinese_audio.mp3", "rb") as audio_file: translation = client.audio.translations.create( model="whisper-1", file=audio_file ) print(translation.text) # 输出英文翻译