- サードパーティ
- ゼロデータ保持
GPT-4o を使って音声を文字起こしする音声認識モデルです。元の Whisper モデルと比べて、単語誤り率と言語認識が向上しています。
| モデル情報 | |
|---|---|
| 利用規約とライセンス | リンク ↗ |
| 詳細情報 | リンク ↗ |
| ゼロデータ保持 | はい |
| 料金 | Cloudflare ダッシュボードで料金を見る ↗ |
const response = await env.AI.run(
'openai/gpt-4o-transcribe',
{ file: 'data:audio/wav;base64,<...>' },
)
console.log(response)curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"model": "openai/gpt-4o-transcribe",
"input": {
"file": "data:audio/wav;base64,<...>"
}
}'Hello
{
"gatewayMetadata": {
"keySource": "Unified"
},
"result": {
"text": "Hello"
},
"state": "Completed"
}言語ヒントあり — 精度向上のため、言語ヒント付きで文字起こしします
const response = await env.AI.run(
'openai/gpt-4o-transcribe',
{ file: 'data:audio/wav;base64,<...>', language: 'en' },
)
console.log(response)curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"model": "openai/gpt-4o-transcribe",
"input": {
"file": "data:audio/wav;base64,<...>",
"language": "en"
}
}'Hello
{
"gatewayMetadata": {
"keySource": "Unified"
},
"result": {
"text": "Hello"
},
"state": "Completed"
}ガイド付き文字起こし — プロンプトで文字起こしのスタイルとコンテキストを案内します
const response = await env.AI.run(
'openai/gpt-4o-transcribe',
{
file: 'data:audio/wav;base64,<...>',
prompt: 'This is a technical discussion about Kubernetes and cloud-native architecture.',
language: 'en',
},
)
console.log(response)curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"model": "openai/gpt-4o-transcribe",
"input": {
"file": "data:audio/wav;base64,<...>",
"prompt": "This is a technical discussion about Kubernetes and cloud-native architecture.",
"language": "en"
}
}'This is a technical discussion about Kubernetes and cloud-native architecture.
{
"gatewayMetadata": {
"keySource": "Unified"
},
"result": {
"text": "This is a technical discussion about Kubernetes and cloud-native architecture."
},
"state": "Completed"
}高い temperature — より多様な文字起こしのために、高い `temperature` を使います
const response = await env.AI.run(
'openai/gpt-4o-transcribe',
{ file: 'data:audio/wav;base64,<...>', temperature: 0.5 },
)
console.log(response)curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"model": "openai/gpt-4o-transcribe",
"input": {
"file": "data:audio/wav;base64,<...>",
"temperature": 0.5
}
}'Hello, world!
{
"gatewayMetadata": {
"keySource": "Unified"
},
"result": {
"text": "Hello, world!"
},
"state": "Completed"
}file
string必須音声ファイルです。data URI(`data:audio/...;base64,...`)または HTTPS URL です。対応形式: flac、mp3、mp4、mpeg、mpga、m4a、ogg、wav、webm。language
string入力音声の言語です。ISO-639-1 形式で指定すると、精度とレイテンシが改善します。prompt
stringモデルのスタイルを案内する、または前の音声セグメントを続ける任意のテキストです。プロンプトは音声の言語に合わせてください。temperature
numberminimum: 0maximum: 1サンプリング temperature です(0〜1)。0.8 のように高いとよりランダム、0.2 のように低いとより焦点が絞られ決定的になります。省略時は 0 です。text
string書き起こしたテキストです。