Skip to main content
POST
Python
Utilisez ce point de terminaison pour transcrire l’audio en texte dans la langue source. Il convient aux notes de réunion, aux messages vocaux, à l’indexation de médias, aux sous-titres et aux workflows de support qui nécessitent du texte consultable.

Première requête

Envoyez un fichier audio pris en charge avec model et file. Gardez le premier fichier court pendant que vous validez la gestion de l’upload, l’authentification et l’analyse de la réponse.

Lire la réponse

La réponse par défaut inclut le text transcrit. Si vous demandez un autre format de réponse, assurez-vous que votre client analyse ce format au lieu de supposer la forme JSON par défaut.

Étapes suivantes

  • Utilisez Create Speech lorsque vous avez besoin d’une sortie de synthèse vocale.
  • Utilisez Create Translation lorsque la sortie cible doit être en anglais.

Autorisations

Authorization
string
header
requis

Bearer token authentication. Use your CometAPI key.

Corps

multipart/form-data
file
file
requis

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

model
string
défaut:whisper-1
requis

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>
défaut:json

The output format for the transcription.

Options disponibles:
json,
text,
srt,
verbose_json,
vtt
temperature
number
défaut: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.

Plage requise: 0 <= x <= 1

Réponse

200 - application/json

The transcription result.

text
string
requis

The transcribed text.