Introduction¶
The DeepSeek Harness ecosystem emphasizes “everything is a plugin”. When integrating a voice Agent into a product, developers typically have to handle complex protocol adaptations (such as OpenAI’s WebRTC or Doubao’s WebSocket), browser audio lifecycle management, and conversation interruption logic. dsh-realtime-voice aims to provide a generic solution decoupled from the underlying providers, allowing developers to focus on the Agent conversation itself without delving into low-level implementation details.
What It Is¶
This is a provider-agnostic full-duplex voice agent plugin for DeepSeek Harness. It is maintained by AlexKaiqi and is licensed under the MIT License. The plugin connects browser audio to OpenAI Realtime (via WebRTC) or Doubao Duplex (via WebSocket), while keeping credentials and provider protocols behind the DSH Host boundary.
Core Features¶
The plugin provides the following core capabilities:
- Full-duplex real-time voice conversations
- OpenAI Realtime (WebRTC) adapter
- Doubao Duplex (WebSocket) adapter
- Provider-agnostic abstraction layer
- Interruptible conversations
- Browser audio management
- Action execution loop
Installation and Enablement¶
Before using it, ensure your environment meets the following dependencies:
- DeepSeek Harness 0.1.1-rc.2
dsh-multi-model-provider@^0.1.0-rc.11
Run the following commands to install the plugin into the web profile:
dsh plugin --profile web add dsh-multi-model-provider dsh-realtime-voice
dsh plugin --profile web update dsh-multi-model-provider dsh-realtime-voice
Typical Usage¶
After installation, the plugin registers services in the DSH Host for clients to call. The client starts a full-duplex conversation with the Agent through the voiceAgent service and subscribes to the event stream.
const service = ctx.get('voiceAgent');
const conversation = await service.startConversation({
routeId: 'openai/gpt-realtime',
profileId: 'my-profile',
context: 'provider-neutral context',
ownerId: 'my-product:active',
});
const dispose = conversation.subscribe(event => {
// 监听连接、活动、转录、动作、中断、错误或结束事件
});
Use Cases and Notes¶
- Use cases: Products that need real-time voice interaction with an Agent, especially scenarios that want to abstract over underlying protocol differences (such as WebRTC vs. WebSocket).
- Permissions and dependencies: The plugin runs with the permissions of the current DSH process. Review the source code and license before installing.
- Same-origin requirement: The browser same-origin Origin/Host must be used;
Sec-Fetch-Sitemust besame-origin. - Separation of responsibilities: The product owns the Agent identity, context, and history; the plugin owns only the real-time voice session (listening and speaking simultaneously), interruption logic, and the provider adaptation layer.
Summary¶
dsh-realtime-voice encapsulates low-level differences behind a unified API, simplifies the development flow for full-duplex voice conversations, supports both OpenAI Realtime and Doubao Duplex, and is suitable for developers who need to integrate voice capabilities into their products quickly.