@omnivoice/page-agent 0.3.0 → 0.4.0
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.
- package/package.json +1 -1
- package/src/voice/README.md +22 -8
package/package.json
CHANGED
package/src/voice/README.md
CHANGED
|
@@ -15,10 +15,18 @@ Full-duplex voice conversation integration for PageAgent with OpenAI Realtime AP
|
|
|
15
15
|
### 1. Install
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
|
-
npm install @
|
|
18
|
+
npm install @omnivoice/page-agent@latest@voice
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
### 2.
|
|
21
|
+
### 2. Start the proxy server (required for realtime mode)
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
# Terminal 1: Start NoStopPageTest proxy
|
|
25
|
+
cd ../NoStopPageTest
|
|
26
|
+
uv run python -m duplex.serve --engine realtime --name my-session
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### 3. Configure
|
|
22
30
|
|
|
23
31
|
Create `.env`:
|
|
24
32
|
|
|
@@ -29,10 +37,10 @@ REALTIME_VOICE=marin
|
|
|
29
37
|
NOSTOP_SERVER_URL=http://localhost:8000
|
|
30
38
|
```
|
|
31
39
|
|
|
32
|
-
###
|
|
40
|
+
### 4. Usage
|
|
33
41
|
|
|
34
42
|
```typescript
|
|
35
|
-
import { createVoiceSession, readVoiceSettings } from "@
|
|
43
|
+
import { createVoiceSession, readVoiceSettings } from "@omnivoice/page-agent/voice";
|
|
36
44
|
|
|
37
45
|
const settings = readVoiceSettings(process.env);
|
|
38
46
|
const session = await createVoiceSession(settings);
|
|
@@ -40,9 +48,15 @@ const session = await createVoiceSession(settings);
|
|
|
40
48
|
|
|
41
49
|
## Engines
|
|
42
50
|
|
|
43
|
-
| Mode |
|
|
44
|
-
|
|
45
|
-
| realtime |
|
|
46
|
-
| local |
|
|
51
|
+
| Mode | Requires | Latency | Cost |
|
|
52
|
+
|------|----------|---------|------|
|
|
53
|
+
| **realtime** | NoStopPageTest proxy + OPENAI_API_KEY | 1.3 s p50 | 💰 |
|
|
54
|
+
| local | (stub) | 0.4 s p50 | ✅ |
|
|
55
|
+
|
|
56
|
+
⚠️ **IMPORTANT: Realtime mode requires the NoStopPageTest proxy server**
|
|
57
|
+
|
|
58
|
+
- Browser cannot connect to OpenAI Realtime directly (CORS, auth)
|
|
59
|
+
- All voice traffic: Browser → NoStopPageTest → OpenAI Realtime → Response
|
|
60
|
+
- The proxy is essential; it handles authentication and WebSocket translation
|
|
47
61
|
|
|
48
62
|
See full documentation in [VOICE_ARCHITECTURE.md](../../docs/VOICE_ARCHITECTURE.md)
|