dsh-voice-core
为陪伴插件提供共享的语音合成与播放引擎 适合开发或使用陪伴类插件,需要 Qwen3-TTS 语音播放和风格配置的用户。
安裝
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Yihong89/dsh-voice-core說明文件
閱讀完整 README ↗配置示例
// 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)