Yihong89/dsh-voice-core2

dsh-voice-core

DSH 陪伴插件的共享语音引擎,提供 Qwen3-TTS 代理、音频队列播放、自动朗读及每日问候调度等核心功能。

AI 分析

核心用途是为其他陪伴插件(如 dsh-teacher、dsh-sister)提供底层的语音合成与播放能力。适合开发或定制语音陪伴插件的开发者。需要配置对应的事件注册与 TTS 路径。

套件
dsh-voice-core
版本
0.1.0
最近更新
2026年8月16日

安裝

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Yihong89/dsh-voice-core

配置示例

// dsh-teacher 的 apply()
import { applyVoice } from 'dsh-voice-core'

await applyVoice(ctx, {
  presetName: 'teacher',
  ttsPath: '/dsh-teacher/tts',
  styles: { onee: { label: '🎧 清冷御姐', instruct: '清冷柔和的成年女声…' } },
  defaultStyle: 'onee',
  schedulerEnabled: false,
})
// client 侧
import { createVoiceClient } from 'dsh-voice-core'

var voiceClient = createVoiceClient({
  presetName: 'teacher',
  ttsPath: '/dsh-teacher/tts',
  styles: { onee: { label: '🎧 清冷御姐', instruct: '…' } },
  defaultStyle: 'onee',
})
// 在 apply 里:voiceClient.apply(ctx)