deepgram-java-conversational-stt
/deepgram-java-conversational-stt
Use when writing or reviewing Java code in this repo that calls Deepgram Conversational STT v2 / Flux over `/v2/listen`. Covers `client.listen().v2().v2WebSocket()`, `V2ConnectOptions`, `onTurnInfo`, and turn-aware close handling. Use `deepgram-java-speech-to-text` for standard v1 transcription and `deepgram-java-voice-agent` for fully interactive assistants. Triggers include "flux", "conversational stt", "listen v2", "turn detection", "end of turn", and "eot".
- Author
- deepgram ↗
- Repository
- deepgram-java-sdk ↗
- Licence
- MIT
- Last repository change
- 27.10.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 4
No signals detected. Repository changed on 27.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Use when writing or reviewing Java code in this repo that calls Deepgram Conversational STT v2 / Flux over `/v2/listen`. Covers `client.listen().v2().v2WebSocket()`, `V2ConnectOptions`, `onTurnInfo`, and turn-aware close handling. Use `deepgram-java-speech-to-text` for standard v1 transcription and `deepgram-java-voice-agent` for fully interactive assistants. Triggers include "flux", "conversational stt", "listen v2", "turn detection", "end of turn", and "eot".
Triggers from the description
Original author description
Use when writing or reviewing Java code in this repo that calls Deepgram Conversational STT v2 / Flux over `/v2/listen`. Covers `client.listen().v2().v2WebSocket()`, `V2ConnectOptions`, `onTurnInfo`, and turn-aware close handling. Use `deepgram-java-speech-to-text` for standard v1 transcription and `deepgram-java-voice-agent` for fully interactive assistants. Triggers include "flux", "conversational stt", "listen v2", "turn detection", "end of turn", and "eot".
How it works
- When to use this product
- Authentication
- Quick start
- Key parameters / API surface
- API reference (layered)
- Gotchas
- Example files in this repo
- Central product skills
SKILL.md preview
---
name: deepgram-java-conversational-stt
description: Use when writing or reviewing Java code in this repo that calls Deepgram Conversational STT v2 / Flux over `/v2/listen`. Covers `client.listen().v2().v2WebSocket()`, `V2ConnectOptions`, `onTurnInfo`, and turn-aware close handling. Use `deepgram-java-speech-to-text` for standard v1 transcription and `deepgram-java-voice-agent` for fully interactive assistants. Triggers include "flux", "conversational stt", "listen v2", "turn detection", "end of turn", and "eot".
---
# Using Deepgram Conversational STT / Flux (Java SDK)
Turn-aware streaming transcription over `/v2/listen` for conversational audio.
## When to use this product
- You want explicit turn events, not just regular interim/final transcript chunks.
- You are building conversational UX where end-of-turn timing matters.
**Use a different skill when:**
- You need general-purpose STT over REST or classic streaming → `deepgram-java-speech-to-text`.
- You need a hosted interactive assistant → `deepgram-java-voice-agent`.
## Authentication
```java
import com.deepgram.DeepgramClient;
DeepgramClient client = DeepgramClient.builder()
.apiKey(System.getenv("DEEPGRAM_API_KEY"))
.build();
```
## Quick start
```java
import com.deepgram.resources.listen.v2.types.ListenV2CloseStream;
import com.deepgram.resources.listen.v2.types.ListenV2CloseStreamType;
import com.deepgram.resources.listen.v2.websocket.V2ConnectOptions;
import com.deepgram.resources.listen.v2.websocket.V2WebSocketClient;
import java.util.concurrent.TimeUnit;
V2WebSocketClient wsClient = client.listen().v2().v2WebSocket();
wsClient.onConnected(connected ->
System.out.println("request_id=" + connected.getRequestId()));
wsClient.onTurnInfo(turnInfo -> {
System.out.printf("[%s] turn=%.0f transcript=\"%s\"%n",
turnInfo.getEvent(),
turnInfo.getTurnIndex(),
turnInfo.getTranscript());
});
wsClient.connect(V2ConnectOptions.builder()
.model("flux-general-en")
.build())
.get(10, TimeUnit.SECONDS);
// wsClient.sendMedia(okio.ByteString.of(audioChunk));
wsClient.sendCloseStream(ListenV2CloseStream.builder()
.type(ListenV2CloseStreamType.CLOSE_STREAM)
.build());
```
## Key parameters / API surface
- Entry point: `client.listen().v2().v2WebSocket()`
- Required connect field: `model(String)`
- Verified connect options in source: `encoding`, `sampleRate`, `eagerEotThreshold`, `eotThreshold`, `eotTimeoutMs`, `keyterm`, `mipOptOut`, `tag`
- Send methods: `sendMedia(...)`, `sendCloseStream(...)`
- Event handlers: `onConnected(Consumer<ListenV2Connected>)`, `onTurnInfo(...)`, `onErrorMessage(...)`, plus generic connection/error hooks
## API reference (layered)
1. **In-repo source of truth**: `src/main/java/com/deepgram/resources/listen/v2/` and `examples/listen/LiveStreamingV2.java`. No `reference.md` exists in this checkout.
2. **Canonical AsyncAPI**: https://developers.deepgram.com/asyncapi.yaml
3. **Context7**: `/llmstxt/developers_deepgram_llms_txt`
4. **Product docs**:
- https://developers.deepgram.com/reference/speech-to-text/listen-flux
- https://developers.deepgram.com/docs/flux/quickstart
- https://developers.deepgram.com/docs/flux/language-prompting
## Gotchas
1. **This is WebSocket-only in the Java SDK.** There is no REST helper for `/v2/listen` here.
2. **`model` is a plain `String`, not an enum.** Use Flux model IDs such as `flux-general-en` exactly.
3. **Close with `sendCloseStream(...)`, not Listen V1 finalize.** The message type is different from v1.
4. **The current Java connect options do not expose `language_hint`.** Do not assume the Python surface exists here.
5. **Turn events are the main payload.** Handle `onTurnInfo(...)`, not Listen V1 `onResults(...)`.
6. **You still need to stream binary audio manually.** The example only wires handlers and close flow.
7. **Wait for `connect(...).get(...)` before sending media.** The client is async but not fire-and-forget.
## Example files in this repo
- `examples/listen/LiveStreamingV2.java`
## Central product skills
For cross-language Deepgram product knowledge — the consolidated API reference, documentation finder, focused runnable recipes, third-party integration examples, and MCP setup — install the central skills:
```bash
npx skills add deepgram/skills
```
This SDK ships language-idiomatic code skills; `deepgram/skills` ships cross-language product knowledge (see `api`, `docs`, `recipes`, `examples`, `starters`, `setup-mcp`).
Versions
The database has no other skills named deepgram-java-conversational-stt.
Database snapshot: 13.11.2026 · package version b7f0ab701e32 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100deepgram-python-conversational-stt
Use when writing or reviewing Python code in this repo that calls Deepgram Conversational STT v2 / Flux (`/v2/listen`) for turn-aware streaming transcription. Covers `client.listen.v2.connect(...)`, Flux models, end-of-turn detection. Use `deepgram-python-speech-to-text` for… - 100deepgram-js-conversational-stt
Use when writing or reviewing JavaScript/TypeScript in this repo that calls Deepgram Conversational STT v2 / Flux (`/v2/listen`) for turn-aware streaming transcription. Covers `client.listen.v2.createConnection()` / `connect()`, Flux models, and turn events like `TurnInfo`. Use… - 100deepgram-java-speech-to-text
Use when writing or reviewing Java code in this repo that calls Deepgram Speech-to-Text v1 (`/v1/listen`) for prerecorded or live transcription. Covers `client.listen().v1().media().transcribeUrl` / `transcribeFile` (REST) and `client.listen().v1().v1WebSocket()` (WebSocket).… - 100deepgram-rust-conversational-stt
Use when implementing Deepgram Flux conversational STT from the Rust SDK, including flux_request APIs, turn events, FluxResponse handling, and turn-detection tuning for voice-agent-style pipelines. - 100deepgram-go-conversational-stt
Use when planning or reviewing Go SDK work for Deepgram conversational STT / Flux v2. This repo ships first-class callback and channel Listen v2 WebSocket clients with typed options and mid-session configuration. Route v1 transcription to deepgram-go-speech-to-text. - 100deepgram-go-speech-to-text
Use when writing or reviewing Go code in this repo that transcribes prerecorded audio with Listen v1 REST or streams live audio with Listen v1 WebSockets. Route text generation to deepgram-go-text-to-speech, text analysis to deepgram-go-text-intelligence, audio analytics…