npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@flyinghouse-ma/dsha-tts-bridge

v0.1.0

Published

Host-side TTS bridge for DeepSeek Harness on Android: synthesizes Chinese speech with the Edge TTS protocol and serves it as MP3 over a same-origin route, for containers with no audio device.

Readme

dsha-tts-bridge

给 DeepSeek Harness 用的宿主侧语音合成桥。

一句话:容器里没声卡、WebView 又念不出中文?那就把语音合成搬到宿主,用 MP3 送进页面播。

它解决什么问题

DSH 在安卓上常跑在 proot 容器里,容器内 /dev/snd 不可访问,ffplay/aplay 全都没用; 而某些 ROM 的 Android WebView speechSynthesis 拿不到中文语音包,speak() 直接静默。

唯一稳定成立的路径是:页面里用 <audio> 播放一个 MP3。于是这个插件在 DSH 宿主进程里 把文字合成成 MP3,通过 DSH 自带的 webServer 暴露同源路由,页面直接 src 指过去即可。

用法

装好后,任何页面(含 WebView)都可以这样播报:

<audio src="/dsh-tts/say.mp3?text=需要你确认一下" autoplay></audio>

或者用 fetch 取 Blob 再播放(便于控制音量和复用):

const r = await fetch('/dsh-tts/say.mp3?text=' + encodeURIComponent('你好'));
const url = URL.createObjectURL(await r.blob());
new Audio(url).play();

参数:

| 参数 | 说明 | |---|---| | text | 要念的文字,上限 200 字(防止被当成通用 TTS 代理滥用) | | voice | 可选音色,默认 zh-CN-XiaoxiaoNeural(晓晓,中文女声) |

成功返回 audio/mpeg;失败返回 502 + 纯文本原因。

安装

dsh plugin --profile web add @flyinghouse-ma/dsha-tts-bridge

然后重启 dsh web(这是宿主侧模块,热加载不生效)。

实现说明

  • 走微软 Edge 朗读的 WebSocket 协议(api.msedgeservices.com / 旧版 speech.platform.bing.com), 不是官方 Azure TTS SDK —— 不需要 API Key、不需要账号。
  • 自己实现了 WebSocket 客户端(lib/websocket.js),所以零 npm 依赖。
  • 内存里对最近 40 条合成结果做 LRU 缓存:同一句话反复播报不会重复请求。
  • 单次合成 15 秒超时,失败就返回错误,绝不把页面卡住。

已知限制

  • 需要能访问微软的语音服务端点;被墙的网络环境下会 502。
  • 只做「文字 → MP3」,不负责播放控制;播放由页面自己决定(音量、打断、队列)。
  • 单条 200 字上限是按「提醒播报」场景定的,不适合朗读长文。

谁在用它

dsh-approval-voice 的本地补丁版:待审批时把「待办摘要」念出来,避免漏看弹窗。 它替换掉了原本走 speechSynthesis 的路径 —— 那条路在安卓 WebView 上不可靠。

许可证

MIT。