livekit-plugins-duplexjev 0.3.0__tar.gz → 0.3.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (16) hide show
  1. {livekit_plugins_duplexjev-0.3.0 → livekit_plugins_duplexjev-0.3.2}/CHANGELOG.md +12 -0
  2. {livekit_plugins_duplexjev-0.3.0 → livekit_plugins_duplexjev-0.3.2}/PKG-INFO +16 -6
  3. {livekit_plugins_duplexjev-0.3.0 → livekit_plugins_duplexjev-0.3.2}/README.md +15 -5
  4. {livekit_plugins_duplexjev-0.3.0 → livekit_plugins_duplexjev-0.3.2}/livekit/plugins/duplexjev/turn_detector.py +8 -1
  5. livekit_plugins_duplexjev-0.3.2/livekit/plugins/duplexjev/version.py +1 -0
  6. livekit_plugins_duplexjev-0.3.0/livekit/plugins/duplexjev/version.py +0 -1
  7. {livekit_plugins_duplexjev-0.3.0 → livekit_plugins_duplexjev-0.3.2}/.gitignore +0 -0
  8. {livekit_plugins_duplexjev-0.3.0 → livekit_plugins_duplexjev-0.3.2}/LICENSE +0 -0
  9. {livekit_plugins_duplexjev-0.3.0 → livekit_plugins_duplexjev-0.3.2}/examples/agent.py +0 -0
  10. {livekit_plugins_duplexjev-0.3.0 → livekit_plugins_duplexjev-0.3.2}/livekit/plugins/duplexjev/__init__.py +0 -0
  11. {livekit_plugins_duplexjev-0.3.0 → livekit_plugins_duplexjev-0.3.2}/livekit/plugins/duplexjev/log.py +0 -0
  12. {livekit_plugins_duplexjev-0.3.0 → livekit_plugins_duplexjev-0.3.2}/livekit/plugins/duplexjev/py.typed +0 -0
  13. {livekit_plugins_duplexjev-0.3.0 → livekit_plugins_duplexjev-0.3.2}/pyproject.toml +0 -0
  14. {livekit_plugins_duplexjev-0.3.0 → livekit_plugins_duplexjev-0.3.2}/tests/conftest.py +0 -0
  15. {livekit_plugins_duplexjev-0.3.0 → livekit_plugins_duplexjev-0.3.2}/tests/test_live.py +0 -0
  16. {livekit_plugins_duplexjev-0.3.0 → livekit_plugins_duplexjev-0.3.2}/tests/test_turn_detector.py +0 -0
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.2 (2026-10-13)
4
+
5
+ - Sends an `X-DuplexJev-Client: livekit-plugins-duplexjev/<version>` header (no personal data), so trial-API usage can be counted per integration.
6
+
7
+ ## 0.3.1 (2026-10-13)
8
+
9
+ - Logs a one-time hint when the free trial API is used: it runs DuplexJev-4B-Para, so
10
+ its turn-taking does not match the published eot-bench numbers (DuplexJev-32B-Para v1.2 behind your own
11
+ `duplexjev gateway` >= 0.6).
12
+ - README: how to reproduce the eot-bench numbers; the self-hosting example now serves DuplexJev-32B-Para v1.2 with
13
+ `--rate 1000000`; eot-bench figure for the default setting updated to the full run (20.0%).
14
+
3
15
  ## 0.3.0 (2026-10-13)
4
16
 
5
17
  - `readout="act"`: ask "What should the assistant do now?" and report P(reply now) + P(short acknowledgement) as the
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: livekit-plugins-duplexjev
3
- Version: 0.3.0
3
+ Version: 0.3.2
4
4
  Summary: Audio end-of-turn detection for LiveKit Agents with DuplexJev: turn state, emotion and non-verbal sounds from one request, no transcript needed.
5
5
  Project-URL: Homepage, https://github.com/adventists-ai/duplexjev/tree/main/integrations/livekit
6
6
  Project-URL: Models, https://huggingface.co/adventists-ai/DuplexJev-4B-Para
@@ -43,6 +43,12 @@ say, and tells your agent whether the user is **finished**, **still talking**, *
43
43
 
44
44
  Tested with `livekit-agents` 1.8.6. Maintained by Adventists.ai (AI降临派).
45
45
 
46
+ > **Getting the published turn-taking numbers.** LiveKit eot-bench (English, false cut-offs at 300 ms): **20.0%** for
47
+ > DuplexJev-32B-Para v1.2 with the agent's previous message, 23.5% audio only, vs 35.2% for Smart Turn v3.2. That needs
48
+ > DuplexJev-32B-Para **v1.2 on your own GPU** behind `duplexjev gateway` >= 0.6 (see *Run the model yourself*), the
49
+ > default `readout="turn"`, and the agent's previous message (below). The free trial API runs the smaller DuplexJev-4B-Para
50
+ > (no v1.2 turn-taking update): use it to try the plugin, not to judge turn-taking quality.
51
+
46
52
  ## Install
47
53
 
48
54
  ```bash
@@ -75,8 +81,8 @@ session = AgentSession(..., turn_handling={"turn_detection": detector})
75
81
  detector.attach(session) # follows conversation_item_added; or detector.set_assistant_said(text)
76
82
  ```
77
83
 
78
- It needs a gateway from `duplexjev>=0.6`. On LiveKit eot-bench (English, DuplexJev-32B-Para v1.2) this cuts false
79
- cut-offs at a 300 ms budget from 23.5% to 19.7%.
84
+ It needs a gateway from `duplexjev>=0.6`. On LiveKit eot-bench (English, DuplexJev-32B-Para v1.2, full run) this cuts
85
+ false cut-offs at a 300 ms budget from 23.5% to 20.0%.
80
86
 
81
87
  `AgentSession(turn_detection=duplexjev.TurnDetector(), ...)` works too (LiveKit marks that argument as deprecated).
82
88
  A complete agent is in [`examples/agent.py`](examples/agent.py).
@@ -92,14 +98,18 @@ commits the turn, as with any turn detector, because the LLM needs the text.
92
98
 
93
99
  ## Run the model yourself (recommended for real-time)
94
100
 
95
- The default URL is our free trial API (rate limited to 30 requests per minute; the round trip from outside mainland China adds network latency). For a live agent, serve the model next to it (DuplexJev-4B-Para needs about 10 GB of GPU memory; for the best turn-taking use DuplexJev-32B-Para v1.2 on one 80 GB GPU):
101
+ The default URL is our free trial API (rate limited to 30 requests per minute; the round trip from outside mainland China adds network latency; it runs the smaller DuplexJev-4B-Para without the v1.2 turn-taking update). For a live agent, serve the model next to it. For turn-taking, use DuplexJev-32B-Para v1.2 on one 80 GB GPU (the eot-bench numbers above):
96
102
 
97
103
  ```bash
98
104
  pip install "vllm[audio]>=0.29" duplexjev-vllm "duplexjev[server]>=0.6"
99
- vllm serve adventists-ai/DuplexJev-4B-Para --max-model-len 4096 --port 8000 &
100
- duplexjev gateway --vllm http://localhost:8000/v1 --port 8420
105
+ vllm serve adventists-ai/DuplexJev-32B-Para --revision v1.2 --max-model-len 4096 --port 8000 &
106
+ duplexjev gateway --vllm http://localhost:8000/v1 --port 8420 --rate 1000000
101
107
  ```
102
108
 
109
+ On a smaller GPU, `adventists-ai/DuplexJev-4B-Para` needs about 10 GB; it is fine for emotion and the other questions,
110
+ but its turn-taking has not had the v1.2 update. `--rate 1000000` lifts the gateway's default limit of 30 requests per
111
+ minute, which a live agent exceeds quickly.
112
+
103
113
  Then pass `api_url="http://localhost:8420"` (or set `DUPLEXJEV_API_URL`).
104
114
 
105
115
  ## Options
@@ -17,6 +17,12 @@ say, and tells your agent whether the user is **finished**, **still talking**, *
17
17
 
18
18
  Tested with `livekit-agents` 1.8.6. Maintained by Adventists.ai (AI降临派).
19
19
 
20
+ > **Getting the published turn-taking numbers.** LiveKit eot-bench (English, false cut-offs at 300 ms): **20.0%** for
21
+ > DuplexJev-32B-Para v1.2 with the agent's previous message, 23.5% audio only, vs 35.2% for Smart Turn v3.2. That needs
22
+ > DuplexJev-32B-Para **v1.2 on your own GPU** behind `duplexjev gateway` >= 0.6 (see *Run the model yourself*), the
23
+ > default `readout="turn"`, and the agent's previous message (below). The free trial API runs the smaller DuplexJev-4B-Para
24
+ > (no v1.2 turn-taking update): use it to try the plugin, not to judge turn-taking quality.
25
+
20
26
  ## Install
21
27
 
22
28
  ```bash
@@ -49,8 +55,8 @@ session = AgentSession(..., turn_handling={"turn_detection": detector})
49
55
  detector.attach(session) # follows conversation_item_added; or detector.set_assistant_said(text)
50
56
  ```
51
57
 
52
- It needs a gateway from `duplexjev>=0.6`. On LiveKit eot-bench (English, DuplexJev-32B-Para v1.2) this cuts false
53
- cut-offs at a 300 ms budget from 23.5% to 19.7%.
58
+ It needs a gateway from `duplexjev>=0.6`. On LiveKit eot-bench (English, DuplexJev-32B-Para v1.2, full run) this cuts
59
+ false cut-offs at a 300 ms budget from 23.5% to 20.0%.
54
60
 
55
61
  `AgentSession(turn_detection=duplexjev.TurnDetector(), ...)` works too (LiveKit marks that argument as deprecated).
56
62
  A complete agent is in [`examples/agent.py`](examples/agent.py).
@@ -66,14 +72,18 @@ commits the turn, as with any turn detector, because the LLM needs the text.
66
72
 
67
73
  ## Run the model yourself (recommended for real-time)
68
74
 
69
- The default URL is our free trial API (rate limited to 30 requests per minute; the round trip from outside mainland China adds network latency). For a live agent, serve the model next to it (DuplexJev-4B-Para needs about 10 GB of GPU memory; for the best turn-taking use DuplexJev-32B-Para v1.2 on one 80 GB GPU):
75
+ The default URL is our free trial API (rate limited to 30 requests per minute; the round trip from outside mainland China adds network latency; it runs the smaller DuplexJev-4B-Para without the v1.2 turn-taking update). For a live agent, serve the model next to it. For turn-taking, use DuplexJev-32B-Para v1.2 on one 80 GB GPU (the eot-bench numbers above):
70
76
 
71
77
  ```bash
72
78
  pip install "vllm[audio]>=0.29" duplexjev-vllm "duplexjev[server]>=0.6"
73
- vllm serve adventists-ai/DuplexJev-4B-Para --max-model-len 4096 --port 8000 &
74
- duplexjev gateway --vllm http://localhost:8000/v1 --port 8420
79
+ vllm serve adventists-ai/DuplexJev-32B-Para --revision v1.2 --max-model-len 4096 --port 8000 &
80
+ duplexjev gateway --vllm http://localhost:8000/v1 --port 8420 --rate 1000000
75
81
  ```
76
82
 
83
+ On a smaller GPU, `adventists-ai/DuplexJev-4B-Para` needs about 10 GB; it is fine for emotion and the other questions,
84
+ but its turn-taking has not had the v1.2 update. `--rate 1000000` lifts the gateway's default limit of 30 requests per
85
+ minute, which a live agent exceeds quickly.
86
+
77
87
  Then pass `api_url="http://localhost:8420"` (or set `DUPLEXJEV_API_URL`).
78
88
 
79
89
  ## Options
@@ -122,7 +122,8 @@ class TurnDetector:
122
122
  on_answers: optional callback ``f(answers: dict)`` called after every successful prediction.
123
123
  readout: ``"turn"`` (turn-state question, default) or ``"act"``: ask "What should the assistant do now?" and
124
124
  report P(reply now) + P(short acknowledgement); slightly better on eot-bench with the agent's previous
125
- message (18.4% vs 19.7% false cut-offs at 300 ms, English, 32B-Para v1.2).
125
+ message (18.4% vs 19.7% false cut-offs at 300 ms, English, 32B-Para v1.2, fast mode; the default
126
+ ``"turn"`` scores 20.0% in a full eot-bench run).
126
127
  window_s: seconds of the current user turn sent with each request (the most recent ones).
127
128
  trim_silence: drop the quiet audio before the user started talking, keeping 0.3 s of pre-roll.
128
129
  prediction_timeout: how long LiveKit waits for a prediction before committing without one. Defaults to
@@ -157,6 +158,8 @@ class TurnDetector:
157
158
  self._decide_url = self._base_url + "/v1/decide"
158
159
  api_key = api_key or os.environ.get("DUPLEXJEV_API_KEY")
159
160
  self._headers = {"Authorization": f"Bearer {api_key}"} if api_key else {}
161
+ from .version import __version__ as _v
162
+ self._headers["X-DuplexJev-Client"] = f"livekit-plugins-duplexjev/{_v}" # usage stats on the trial API
160
163
  self._lang = lang
161
164
  self._unlikely_threshold = unlikely_threshold
162
165
  self._backchannel_threshold = backchannel_threshold
@@ -168,6 +171,10 @@ class TurnDetector:
168
171
  HOSTED_PREDICTION_TIMEOUT if self._base_url == DEFAULT_URL else SELF_HOSTED_PREDICTION_TIMEOUT
169
172
  )
170
173
  self._prediction_timeout = prediction_timeout
174
+ if self._base_url == DEFAULT_URL:
175
+ logger.info("Using the free DuplexJev trial API (DuplexJev-4B-Para, rate limited). "
176
+ "For the turn-taking quality reported on eot-bench, serve DuplexJev-32B-Para v1.2 behind "
177
+ "`duplexjev gateway` >= 0.6 and pass its URL; see the README.")
171
178
  self._fallback_probability = fallback_probability
172
179
  self._http_session = http_session
173
180
 
@@ -0,0 +1 @@
1
+ __version__ = "0.3.2"
@@ -1 +0,0 @@
1
- __version__ = "0.3.0"