メインコンテンツへスキップ
POST
Python
このエンドポイントを使用して、音声を元の言語のままテキストに文字起こしできます。会議メモ、音声メッセージ、メディアのインデックス作成、字幕作成、検索可能なテキストを必要とするサポート業務に適しています。

最初のリクエスト

modelfile を指定して、サポートされている音声ファイルを送信します。アップロード処理、認証、レスポンス解析を確認している間は、最初のファイルを短めにしてください。

レスポンスを読む

デフォルトのレスポンスには、文字起こしされた text が含まれます。別のレスポンス形式をリクエストする場合は、デフォルトの JSON 形式を前提にせず、その形式をクライアントで正しく解析してください。

次のステップ

  • テキスト読み上げの出力が必要な場合は、音声生成 を使用します。
  • 出力先の言語を英語にする必要がある場合は、翻訳 を使用します。

承認

Authorization
string
header
必須

Bearer token authentication. Use your CometAPI key.

ボディ

multipart/form-data
file
file
必須

The audio file to transcribe. Supported formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, webm.

model
string
デフォルト:whisper-1
必須

The speech-to-text model to use. Choose a current speech model from the Models page.

language
string

The language of the input audio in ISO-639-1 format (e.g., en, zh, ja). Supplying the language improves accuracy and latency.

prompt
string

Optional text to guide the model's style or continue a previous audio segment. The prompt should match the audio language.

response_format
enum<string>
デフォルト:json

The output format for the transcription.

利用可能なオプション:
json,
text,
srt,
verbose_json,
vtt
temperature
number
デフォルト:0

Sampling temperature between 0 and 1. Higher values produce more random output; lower values are more focused. When set to 0, the model auto-adjusts temperature using log probability.

必須範囲: 0 <= x <= 1

レスポンス

200 - application/json

The transcription result.

text
string
必須

The transcribed text.