> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kugelaudio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Speech to Text

> Transcribe audio with the Java SDK

`client.asr().transcribe(...)` uploads a complete audio file to `luchs-1` and
returns the transcript. See [Speech to Text](/api-reference/endpoints/speech-to-text)
for the full wire contract, supported language, audio limits, and the
WebSocket streaming protocol — the SDK does not yet wrap streaming.

## Transcribe a file

```java theme={null}
import com.kugelaudio.sdk.KugelAudio;
import com.kugelaudio.sdk.KugelAudioOptions;
import com.kugelaudio.sdk.TranscriptionResponse;

import java.nio.file.Files;
import java.nio.file.Path;

KugelAudio client = new KugelAudio(
    KugelAudioOptions.builder("your_api_key").build()
);

byte[] audio = Files.readAllBytes(Path.of("speech.wav"));
TranscriptionResponse result = client.asr().transcribe(audio);

System.out.println(result.getText());          // OpenAI-compatible alias
System.out.println(result.getTranscript());    // KugelAudio's own field
System.out.println(result.getModel());         // "luchs-1"
System.out.println(result.getModelRevision()); // immutable checkpoint revision

client.close();
```

The single-argument `transcribe(audio)` overload defaults to
`ASRResource.MODEL_ID` (`"luchs-1"`). The five-argument overload lets you set
`filename`, `contentType` and `language` explicitly, but `model` must still
equal `ASRResource.MODEL_ID` — any other value throws `ValidationException`
before any HTTP call:

```java theme={null}
client.asr().transcribe(audio, "call.wav", "audio/wav", "en", "qwen3-asr");
// throws ValidationException: Unsupported ASR model; use luchs-1
```

`language` is forwarded but currently has no effect on recognition — see
[Supported language](/api-reference/endpoints/speech-to-text#supported-language).

## Migrating from `qwen3-asr`

Passing `"qwen3-asr"` as the `model` argument now throws
`ValidationException` before any network call. Use `ASRResource.MODEL_ID`, or
the literal `"luchs-1"`. Anything reading the response `model` field must
also account for it now always being `"luchs-1"`; use `getModelRevision()` if
you need the underlying artifact identity. This changed in the next major
release of the Java SDK.

## Streaming

The Java SDK does not currently include a WebSocket streaming client for
speech-to-text; `StreamingTranscriptionResult` exists only so callers who
open their own WebSocket session can deserialize frames. Use the raw
WebSocket protocol in
[Speech to Text](/api-reference/endpoints/speech-to-text#stream-live-audio)
directly for live transcription.
