Saltar para o conteúdo principal
POST
/
v1
/
audio
/
transcriptions
curl -X POST "https://api.lemondata.cc/v1/audio/transcriptions" \
  -H "Authorization: Bearer sk-your-api-key" \
  -F file="@audio.mp3" \
  -F model="whisper-1" \
  -F language="en"
{
  "text": "Hello, this is a test of the transcription API."
}

Request Body

file
file
obrigatório
Arquivo de áudio para transcrever. Formatos suportados: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, webm.
model
string
padrão:"whisper-1"
Modelo a ser usado. Atualmente, apenas whisper-1 é suportado.
language
string
Idioma do áudio no formato ISO-639-1 (ex: en, zh, ja).
prompt
string
Texto opcional para guiar o estilo do modelo ou continuar um segmento anterior.
response_format
string
padrão:"json"
Formato de saída: json, text, srt, verbose_json, vtt.
temperature
number
padrão:"0"
Temperatura de amostragem (0 a 1).
timestamp_granularities
array
Granularidade do timestamp: word e/ou segment. Requer verbose_json.

Response

text
string
O texto transcrito.
Para verbose_json:
task
string
Sempre transcribe.
language
string
Idioma detectado.
duration
number
Duração do áudio em segundos.
segments
array
Segmentos de transcrição com timestamps.
words
array
Timestamps em nível de palavra (se solicitado).
curl -X POST "https://api.lemondata.cc/v1/audio/transcriptions" \
  -H "Authorization: Bearer sk-your-api-key" \
  -F file="@audio.mp3" \
  -F model="whisper-1" \
  -F language="en"
{
  "text": "Hello, this is a test of the transcription API."
}

Tradução

Para traduzir áudio para o inglês, use o endpoint de traduções:
response = client.audio.translations.create(
    model="whisper-1",
    file=audio_file
)