whisper-1を呼び出します。
主な機能
- 音声からテキストへ - アップロードした音声ファイルを文字起こしします
- マルチパートアップロード - 元ファイルをフォームデータとして送信
- 出力形式 - モデル固有のレスポンス形式をサポート
簡単な使用例
- cURL
- Python
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Whisper 1:音声からテキストへの変換モデル。MixRoute向けのリクエスト例とパラメータ。
whisper-1を呼び出します。
curl "https://api.mixroute.ai/v1/audio/transcriptions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@speech.wav" \
-F "model=whisper-1"
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")
with open("speech.wav", "rb") as audio_file:
transcript = client.audio.transcriptions.create(
model="whisper-1",
file=audio_file,
)
print(transcript.text)
| パラメーター | 型 | 必須 | 説明 |
|---|---|---|---|
file | file | はい | multipartフォームデータとしてアップロードする音声ファイル。 |
model | string | はい | whisper-1である必要があります。 |
language | string | いいえ | 対応している場合の入力言語コード。 |
prompt | string | いいえ | 文字起こしの指針となる任意のテキスト。 |
response_format | string | いいえ | 文字起こしのレスポンス形式。 |