Skip to main content
POST
Python
Use este endpoint para transcrever áudio em texto no idioma de origem. Ele é adequado para notas de reunião, mensagens de voz, indexação de mídia, legendas e fluxos de trabalho de suporte que precisam de texto pesquisável.

Primeira solicitação

Envie um arquivo de áudio compatível com model e file. Mantenha o primeiro arquivo curto enquanto valida o tratamento de upload, a autenticação e a análise da resposta.

Leia a resposta

A resposta padrão inclui o text transcrito. Se você solicitar outro formato de resposta, certifique-se de que seu cliente analise esse formato em vez de presumir o formato JSON padrão.

Próximos passos

Autorizações

Authorization
string
header
obrigatório

Bearer token authentication. Use your CometAPI key.

Corpo

multipart/form-data
file
file
obrigatório

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

model
string
padrão:whisper-1
obrigatório

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>
padrão:json

The output format for the transcription.

Opções disponíveis:
json,
text,
srt,
verbose_json,
vtt
temperature
number
padrão: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.

Intervalo necessário: 0 <= x <= 1

Resposta

200 - application/json

The transcription result.

text
string
obrigatório

The transcribed text.