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".
89
86%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Passed
No known issues
Turn-aware streaming transcription over /v2/listen for conversational audio.
Use a different skill when:
deepgram-java-speech-to-text.deepgram-java-voice-agent.import com.deepgram.DeepgramClient;
DeepgramClient client = DeepgramClient.builder()
.apiKey(System.getenv("DEEPGRAM_API_KEY"))
.build();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());client.listen().v2().v2WebSocket()model(String)encoding, sampleRate, eagerEotThreshold, eotThreshold, eotTimeoutMs, keyterm, mipOptOut, tagsendMedia(...), sendCloseStream(...)onConnected(Consumer<ListenV2Connected>), onTurnInfo(...), onErrorMessage(...), plus generic connection/error hookssrc/main/java/com/deepgram/resources/listen/v2/ and examples/listen/LiveStreamingV2.java. No reference.md exists in this checkout./llmstxt/developers_deepgram_llms_txt/v2/listen here.model is a plain String, not an enum. Use Flux model IDs such as flux-general-en exactly.sendCloseStream(...), not Listen V1 finalize. The message type is different from v1.language_hint. Do not assume the Python surface exists here.onTurnInfo(...), not Listen V1 onResults(...).connect(...).get(...) before sending media. The client is async but not fire-and-forget.examples/listen/LiveStreamingV2.javaFor 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:
npx skills add deepgram/skillsThis SDK ships language-idiomatic code skills; deepgram/skills ships cross-language product knowledge (see api, docs, recipes, examples, starters, setup-mcp).
de2dd4b
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.