openvoiceui 1.0.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/.env.example +104 -0
- package/Dockerfile +30 -0
- package/LICENSE +21 -0
- package/README.md +638 -0
- package/SETUP.md +360 -0
- package/app.py +232 -0
- package/auto-approve-devices.js +111 -0
- package/cli/index.js +372 -0
- package/config/__init__.py +4 -0
- package/config/default.yaml +43 -0
- package/config/flags.yaml +67 -0
- package/config/loader.py +203 -0
- package/config/providers.yaml +71 -0
- package/config/speech_normalization.yaml +182 -0
- package/config/theme.json +4 -0
- package/data/greetings.json +25 -0
- package/default-pages/ai-image-creator.html +915 -0
- package/default-pages/bulk-image-uploader.html +492 -0
- package/default-pages/desktop.html +2865 -0
- package/default-pages/file-explorer.html +854 -0
- package/default-pages/interactive-map.html +655 -0
- package/default-pages/style-guide.html +1005 -0
- package/default-pages/website-setup.html +1623 -0
- package/deploy/openclaw/Dockerfile +46 -0
- package/deploy/openvoiceui.service +30 -0
- package/deploy/setup-nginx.sh +50 -0
- package/deploy/setup-sudo.sh +306 -0
- package/deploy/skill-runner/Dockerfile +19 -0
- package/deploy/skill-runner/requirements.txt +14 -0
- package/deploy/skill-runner/server.py +269 -0
- package/deploy/supertonic/Dockerfile +22 -0
- package/deploy/supertonic/server.py +79 -0
- package/docker-compose.pinokio.yml +11 -0
- package/docker-compose.yml +59 -0
- package/greetings.json +25 -0
- package/index.html +65 -0
- package/inject-device-identity.js +142 -0
- package/package.json +82 -0
- package/profiles/default.json +114 -0
- package/profiles/manager.py +354 -0
- package/profiles/schema.json +337 -0
- package/prompts/voice-system-prompt.md +149 -0
- package/providers/__init__.py +39 -0
- package/providers/base.py +63 -0
- package/providers/llm/__init__.py +12 -0
- package/providers/llm/base.py +71 -0
- package/providers/llm/clawdbot_provider.py +112 -0
- package/providers/llm/zai_provider.py +115 -0
- package/providers/registry.py +320 -0
- package/providers/stt/__init__.py +12 -0
- package/providers/stt/base.py +58 -0
- package/providers/stt/webspeech_provider.py +49 -0
- package/providers/stt/whisper_provider.py +100 -0
- package/providers/tts/__init__.py +20 -0
- package/providers/tts/base.py +91 -0
- package/providers/tts/groq_provider.py +74 -0
- package/providers/tts/supertonic_provider.py +72 -0
- package/requirements.txt +38 -0
- package/routes/__init__.py +10 -0
- package/routes/admin.py +515 -0
- package/routes/canvas.py +1315 -0
- package/routes/chat.py +51 -0
- package/routes/conversation.py +2158 -0
- package/routes/elevenlabs_hybrid.py +306 -0
- package/routes/greetings.py +98 -0
- package/routes/icons.py +279 -0
- package/routes/image_gen.py +364 -0
- package/routes/instructions.py +190 -0
- package/routes/music.py +838 -0
- package/routes/onboarding.py +43 -0
- package/routes/pi.py +62 -0
- package/routes/profiles.py +215 -0
- package/routes/report_issue.py +68 -0
- package/routes/static_files.py +533 -0
- package/routes/suno.py +664 -0
- package/routes/theme.py +81 -0
- package/routes/transcripts.py +199 -0
- package/routes/vision.py +348 -0
- package/routes/workspace.py +288 -0
- package/server.py +1510 -0
- package/services/__init__.py +1 -0
- package/services/auth.py +143 -0
- package/services/canvas_versioning.py +239 -0
- package/services/db_pool.py +107 -0
- package/services/gateway.py +16 -0
- package/services/gateway_manager.py +333 -0
- package/services/gateways/__init__.py +12 -0
- package/services/gateways/base.py +110 -0
- package/services/gateways/compat.py +264 -0
- package/services/gateways/openclaw.py +1134 -0
- package/services/health.py +100 -0
- package/services/memory_client.py +455 -0
- package/services/paths.py +26 -0
- package/services/speech_normalizer.py +285 -0
- package/services/tts.py +270 -0
- package/setup-config.js +262 -0
- package/sounds/air_horn.mp3 +0 -0
- package/sounds/bruh.mp3 +0 -0
- package/sounds/crowd_cheer.mp3 +0 -0
- package/sounds/gunshot.mp3 +0 -0
- package/sounds/impact.mp3 +0 -0
- package/sounds/lets_go.mp3 +0 -0
- package/sounds/record_stop.mp3 +0 -0
- package/sounds/rewind.mp3 +0 -0
- package/sounds/sad_trombone.mp3 +0 -0
- package/sounds/scratch_long.mp3 +0 -0
- package/sounds/yeah.mp3 +0 -0
- package/src/adapters/ClawdBotAdapter.js +264 -0
- package/src/adapters/_template.js +133 -0
- package/src/adapters/elevenlabs-classic.js +841 -0
- package/src/adapters/elevenlabs-hybrid.js +812 -0
- package/src/adapters/hume-evi.js +676 -0
- package/src/admin.html +1339 -0
- package/src/app.js +8802 -0
- package/src/core/Config.js +173 -0
- package/src/core/EmotionEngine.js +307 -0
- package/src/core/EventBridge.js +180 -0
- package/src/core/EventBus.js +117 -0
- package/src/core/VoiceSession.js +607 -0
- package/src/face/BaseFace.js +259 -0
- package/src/face/EyeFace.js +208 -0
- package/src/face/HaloSmokeFace.js +509 -0
- package/src/face/manifest.json +27 -0
- package/src/face/previews/eyes.svg +16 -0
- package/src/face/previews/orb.svg +29 -0
- package/src/features/MusicPlayer.js +620 -0
- package/src/features/Soundboard.js +128 -0
- package/src/providers/DeepgramSTT.js +472 -0
- package/src/providers/DeepgramStreamingSTT.js +766 -0
- package/src/providers/GroqSTT.js +559 -0
- package/src/providers/TTSPlayer.js +323 -0
- package/src/providers/WebSpeechSTT.js +479 -0
- package/src/providers/tts/BaseTTSProvider.js +81 -0
- package/src/providers/tts/HumeProvider.js +77 -0
- package/src/providers/tts/SupertonicProvider.js +174 -0
- package/src/providers/tts/index.js +140 -0
- package/src/shell/adapter-registry.js +154 -0
- package/src/shell/caller-bridge.js +35 -0
- package/src/shell/camera-bridge.js +28 -0
- package/src/shell/canvas-bridge.js +32 -0
- package/src/shell/commercial-bridge.js +44 -0
- package/src/shell/face-bridge.js +44 -0
- package/src/shell/music-bridge.js +60 -0
- package/src/shell/orchestrator.js +233 -0
- package/src/shell/profile-discovery.js +303 -0
- package/src/shell/sounds-bridge.js +28 -0
- package/src/shell/transcript-bridge.js +61 -0
- package/src/shell/waveform-bridge.js +33 -0
- package/src/styles/base.css +2862 -0
- package/src/styles/face.css +417 -0
- package/src/styles/pi-overrides.css +89 -0
- package/src/styles/theme-dark.css +67 -0
- package/src/test-tts.html +175 -0
- package/src/ui/AppShell.js +544 -0
- package/src/ui/ProfileSwitcher.js +228 -0
- package/src/ui/SessionControl.js +240 -0
- package/src/ui/face/FacePicker.js +195 -0
- package/src/ui/face/FaceRenderer.js +309 -0
- package/src/ui/settings/PlaylistEditor.js +366 -0
- package/src/ui/settings/SettingsPanel.css +684 -0
- package/src/ui/settings/SettingsPanel.js +419 -0
- package/src/ui/settings/TTSVoicePreview.js +210 -0
- package/src/ui/themes/ThemeManager.js +213 -0
- package/src/ui/visualizers/BaseVisualizer.js +29 -0
- package/src/ui/visualizers/PartyFXVisualizer.css +291 -0
- package/src/ui/visualizers/PartyFXVisualizer.js +637 -0
- package/static/emulators/jsdos/js-dos.css +1 -0
- package/static/emulators/jsdos/js-dos.js +22 -0
- package/static/favicon.svg +55 -0
- package/static/icons/apple-touch-icon.png +0 -0
- package/static/icons/favicon-32.png +0 -0
- package/static/icons/icon-192.png +0 -0
- package/static/icons/icon-512.png +0 -0
- package/static/install.html +449 -0
- package/static/manifest.json +26 -0
- package/static/sw.js +21 -0
- package/tts_providers/__init__.py +136 -0
- package/tts_providers/base_provider.py +319 -0
- package/tts_providers/groq_provider.py +155 -0
- package/tts_providers/hume_provider.py +226 -0
- package/tts_providers/providers_config.json +119 -0
- package/tts_providers/qwen3_provider.py +371 -0
- package/tts_providers/resemble_provider.py +315 -0
- package/tts_providers/supertonic_provider.py +557 -0
- package/tts_providers/supertonic_tts.py +399 -0
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent Adapter Template
|
|
3
|
+
*
|
|
4
|
+
* Copy this file to create a new agent adapter.
|
|
5
|
+
* Replace all TODO placeholders with your implementation.
|
|
6
|
+
*
|
|
7
|
+
* Rules:
|
|
8
|
+
* 1. Communicate with the outside world ONLY through the bridge
|
|
9
|
+
* 2. Manage your own audio, WebSocket, and SDK internally
|
|
10
|
+
* 3. Release ALL resources in destroy()
|
|
11
|
+
* 4. Never import from other adapters
|
|
12
|
+
*
|
|
13
|
+
* Ref: future-dev-plans/17-MULTI-AGENT-FRAMEWORK.md
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import { AgentEvents, AgentActions } from '../core/EventBridge.js';
|
|
17
|
+
|
|
18
|
+
export const TemplateAdapter = {
|
|
19
|
+
/** Human-readable name shown in UI */
|
|
20
|
+
name: 'My Agent System',
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* What this adapter can do.
|
|
24
|
+
* UI shows/hides features based on this list.
|
|
25
|
+
*
|
|
26
|
+
* Available capabilities:
|
|
27
|
+
* 'canvas' - Agent can show HTML pages on the canvas display
|
|
28
|
+
* 'dj_soundboard' - Agent can play DJ sound effects
|
|
29
|
+
* 'caller_effects' - Agent can toggle phone filter audio effect
|
|
30
|
+
* 'music_sync' - Agent can control music playback
|
|
31
|
+
* 'multi_voice' - Agent uses multiple voices/personas
|
|
32
|
+
* 'emotion_detection' - Agent sends emotion scores per utterance
|
|
33
|
+
* 'commercials' - Agent can trigger commercial breaks
|
|
34
|
+
* 'vps_control' - Agent can run commands on VPS
|
|
35
|
+
* 'wake_word' - Agent supports wake word activation
|
|
36
|
+
*/
|
|
37
|
+
capabilities: [
|
|
38
|
+
// TODO: add capabilities your adapter supports
|
|
39
|
+
],
|
|
40
|
+
|
|
41
|
+
// ── Private state (prefix _ to mark as internal) ──────────────
|
|
42
|
+
_bridge: null,
|
|
43
|
+
_config: null,
|
|
44
|
+
_unsubscribers: [], // Store bridge.on() return values for cleanup
|
|
45
|
+
|
|
46
|
+
// ─────────────────────────────────────────────────────────────
|
|
47
|
+
// INIT — called when user selects this adapter mode
|
|
48
|
+
//
|
|
49
|
+
// Load SDKs, set up connections, subscribe to UI actions.
|
|
50
|
+
// DO NOT start mic or begin conversation here — that's start().
|
|
51
|
+
// ─────────────────────────────────────────────────────────────
|
|
52
|
+
async init(bridge, config) {
|
|
53
|
+
this._bridge = bridge;
|
|
54
|
+
this._config = config || {};
|
|
55
|
+
|
|
56
|
+
// TODO: load your SDK, set up audio chain, preload assets
|
|
57
|
+
|
|
58
|
+
// Subscribe to UI → Agent actions
|
|
59
|
+
this._unsubscribers.push(
|
|
60
|
+
bridge.on(AgentActions.END_SESSION, () => this.stop()),
|
|
61
|
+
// bridge.on(AgentActions.SEND_MESSAGE, (d) => this._handleSendMessage(d.text)),
|
|
62
|
+
// bridge.on(AgentActions.CONTEXT_UPDATE, (d) => this._sendContext(d.text)),
|
|
63
|
+
// bridge.on(AgentActions.FORCE_MESSAGE, (d) => this._forceMessage(d.text)),
|
|
64
|
+
);
|
|
65
|
+
},
|
|
66
|
+
|
|
67
|
+
// ─────────────────────────────────────────────────────────────
|
|
68
|
+
// START — begin conversation (called from user click)
|
|
69
|
+
//
|
|
70
|
+
// Start mic, connect to agent backend, etc.
|
|
71
|
+
// ─────────────────────────────────────────────────────────────
|
|
72
|
+
async start() {
|
|
73
|
+
// TODO: unlock iOS AudioContext if needed
|
|
74
|
+
// const stream = await navigator.mediaDevices.getUserMedia({ audio: true });
|
|
75
|
+
// stream.getTracks().forEach(t => t.stop());
|
|
76
|
+
|
|
77
|
+
// TODO: connect to your agent
|
|
78
|
+
|
|
79
|
+
// Emit connected event when ready
|
|
80
|
+
this._bridge.emit(AgentEvents.CONNECTED);
|
|
81
|
+
this._bridge.emit(AgentEvents.STATE_CHANGED, { state: 'listening' });
|
|
82
|
+
this._bridge.emit(AgentEvents.MOOD, { mood: 'happy' });
|
|
83
|
+
},
|
|
84
|
+
|
|
85
|
+
// ─────────────────────────────────────────────────────────────
|
|
86
|
+
// STOP — end conversation gracefully (user clicks stop)
|
|
87
|
+
// ─────────────────────────────────────────────────────────────
|
|
88
|
+
async stop() {
|
|
89
|
+
// TODO: end session, release mic
|
|
90
|
+
|
|
91
|
+
this._bridge.emit(AgentEvents.STATE_CHANGED, { state: 'idle' });
|
|
92
|
+
this._bridge.emit(AgentEvents.DISCONNECTED);
|
|
93
|
+
this._bridge.emit(AgentEvents.MOOD, { mood: 'neutral' });
|
|
94
|
+
},
|
|
95
|
+
|
|
96
|
+
// ─────────────────────────────────────────────────────────────
|
|
97
|
+
// DESTROY — full teardown on adapter switch
|
|
98
|
+
//
|
|
99
|
+
// MUST release: mic, AudioContext, WebSocket, SDK instances.
|
|
100
|
+
// MUST unsubscribe all bridge.on() subscriptions.
|
|
101
|
+
// ─────────────────────────────────────────────────────────────
|
|
102
|
+
async destroy() {
|
|
103
|
+
await this.stop();
|
|
104
|
+
|
|
105
|
+
// Unsubscribe all bridge listeners
|
|
106
|
+
this._unsubscribers.forEach(unsub => unsub());
|
|
107
|
+
this._unsubscribers = [];
|
|
108
|
+
|
|
109
|
+
// TODO: disconnect SDK, close AudioContext, etc.
|
|
110
|
+
},
|
|
111
|
+
|
|
112
|
+
// ─────────────────────────────────────────────────────────────
|
|
113
|
+
// PRIVATE methods (prefix _ to mark as internal)
|
|
114
|
+
// ─────────────────────────────────────────────────────────────
|
|
115
|
+
|
|
116
|
+
// Example: emit bridge events when things happen
|
|
117
|
+
_onAgentSpeaking(text) {
|
|
118
|
+
this._bridge.emit(AgentEvents.STATE_CHANGED, { state: 'speaking' });
|
|
119
|
+
this._bridge.emit(AgentEvents.TTS_PLAYING);
|
|
120
|
+
this._bridge.emit(AgentEvents.MESSAGE, { role: 'assistant', text, final: true });
|
|
121
|
+
},
|
|
122
|
+
|
|
123
|
+
_onAgentListening() {
|
|
124
|
+
this._bridge.emit(AgentEvents.TTS_STOPPED);
|
|
125
|
+
this._bridge.emit(AgentEvents.STATE_CHANGED, { state: 'listening' });
|
|
126
|
+
},
|
|
127
|
+
|
|
128
|
+
_onToolCall(name, params, result) {
|
|
129
|
+
this._bridge.emit(AgentEvents.TOOL_CALLED, { name, params, result });
|
|
130
|
+
},
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
export default TemplateAdapter;
|