deepgram-java-conversational-stt
/deepgram-java-conversational-stt
Obsługuje w Javie Deepgram Conversational STT v2 (Flux) przez /v2/listen: client.listen().v2().v2WebSocket(), V2ConnectOptions, onTurnInfo i obsługę zamknięcia świadomą tur rozmowy.
- Autor
- deepgram ↗
- Repozytorium
- deepgram-java-sdk ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 27.10.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 4
Brak sygnałów. Repozytorium zmienione 27.10.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Obsługuje w Javie Deepgram Conversational STT v2 (Flux) przez /v2/listen: client.listen().v2().v2WebSocket(), V2ConnectOptions, onTurnInfo i obsługę zamknięcia świadomą tur rozmowy.
Wyzwalacze z opisu
Oryginalny opis (EN)
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".
Jak działa
- When to use this product
- Authentication
- Quick start
- Key parameters / API surface
- API reference (layered)
- Gotchas
- Example files in this repo
- Central product skills
Podgląd SKILL.md
---
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`).
Wersje
W bazie nie ma innych skilli o nazwie deepgram-java-conversational-stt.
Migawka bazy z 13.11.2026 · wersja paczki b7f0ab701e32 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100deepgram-python-conversational-stt
Obsługuje w Pythonie konwersacyjne STT Deepgram v2 (Flux, /v2/listen) z transkrypcją strumieniową świadomą tur i wykrywaniem końca wypowiedzi. - 100deepgram-js-conversational-stt
Obsługuje w JavaScripcie i TypeScripcie konwersacyjne STT Deepgram v2 (Flux, /v2/listen) z transkrypcją strumieniową świadomą tur: createConnection, modele Flux i zdarzenia TurnInfo. - 100deepgram-java-speech-to-text
Obsługuje w Javie Deepgram Speech-to-Text v1 (/v1/listen) dla transkrypcji nagrań i na żywo, przez REST (transcribeUrl i transcribeFile) oraz WebSocket (v1WebSocket). - 100deepgram-rust-conversational-stt
Wdraża w Rust konwersacyjne STT Deepgram Flux: API flux_request, zdarzenia tur, obsługę FluxResponse i strojenie wykrywania tur dla potoków w stylu agentów głosowych. - 100deepgram-go-conversational-stt
Planuje i recenzuje pracę z SDK Go dla konwersacyjnego rozpoznawania mowy Deepgram Flux v2, z klientami Listen v2 WebSocket w wariantach callback i channel oraz konfiguracją w trakcie sesji. - 100deepgram-go-speech-to-text
Obsługuje w Go transkrypcję nagrań przez Listen v1 REST oraz strumieniowanie dźwięku na żywo przez Listen v1 WebSocket w SDK Deepgram.