NewTranscription sends an audio file to a transcription-capable provider. Import pkg/gateway/llm/transcription and pkg/utils.
Given client and ctx:
Audio contains raw file bytes. AudioFilename identifies the format for multipart/provider handling. Bound file size before reading a user upload into memory; this example reads a known local file.
Optional controls
Language is a language hint, Prompt guides vocabulary/style where supported, and ResponseFormat selects the requested response shape. TimestampGranularities can request word or segment timings on models that support them. These settings are not universal across providers.
The response always has a Text field and may contain Language, Duration, Words, Segments, Usage, and provider-specific Raw data. Do not assume optional timing fields are present unless the requested format and model support them.