全GPT 20%オフ 🎉 DeepSeek 30%オフ詳細はこちら

ElevenLabs Scribe v2

文字起こし
elevenlabs/scribe_v2
利用可能なプロバイダー
ElevenLabs
対応プロトコル
openai

Providers

ElevenLabs
入力音声(時間単位)
$0.22/h
Protocols
openai/v1/audio/transcriptions

コード例

import requests
with open("speech.mp3", "rb") as audio:
response = requests.post(
"https://api.ofox.run/v1/audio/transcriptions",
headers={"Authorization": "Bearer YOUR_OFOX_API_KEY"},
data={"model": "elevenlabs/scribe_v2", "language": "en", "provider_options": '{"elevenlabs":{"diarize":true,"tag_audio_events":true,"diarization_threshold":0.2}}'},
files={"file": ("speech.mp3", audio, "audio/mpeg")},
)
response.raise_for_status()
print(response.json())

Scribe v2:multipart の provider_options に JSON 文字列を指定します。elevenlabs.diarize、num_speakers、tag_audio_events、diarization_threshold に対応。音声は file に入れます。

よくある質問

ベースURLをhttps://api.ofox.run/v1に設定し、Ofox APIキーを使用するだけ。OpenAI互換APIなので、既存コードのベースURLとAPIキーを変更するだけです。