File transcribe
POSThttps://api.lucidweights.ai/v1/stt/file-transcribe
Transcribes an uploaded audio file (multipart/form-data). Stereo is downmixed to mono and any sample rate is accepted.
Request
Headers: x-api-key. Form field: file. Same query params as /v1/stt/transcribe (backend, model_name, languages).
Example
curl -X POST "https://api.lucidweights.ai/v1/stt/file-transcribe?languages=en" \ -H "x-api-key: lw_YOUR_SECRET" \ -F "file=@meeting.wav"
Response
{
"transcription": "…",
"processing_time": 1.92,
"total_time": 2.31
}Supported formats
Content is sniffed. The extension does not matter:
- WAV (PCM 8/16/24/32-bit, float, µ-law, A-law, ADPCM, GSM 6.10)
- MP3, FLAC, OGG (Vorbis and Opus), AIFF, CAF, W64, RF64, AU
WARNING
M4A / AAC, WebM, WMA, AMR, 3GP return 415. Transcode to WAV or MP3 first. No enforced file size or duration limit; rejection happens at decode after the full upload is buffered.
Example
import requests
r = requests.post(
"https://api.lucidweights.ai/v1/stt/file-transcribe",
params={"languages": "en"},
headers={"x-api-key": "lw_YOUR_SECRET"},
files={"file": open("audio.wav", "rb")},
)
r.raise_for_status()
print(r.json()["transcription"])