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

@sfpprxy/speak

v0.1.10

Published

Cross-platform local TTS speaker CLI.

Downloads

588

Readme

speak

English docs: README.md

speak 是一个跨平台命令行语音播报工具。

版本变更记录:

  • GitHub Releases:https://github.com/sfpprxy/speak/releases
  • Changelog:CHANGELOG.md

安装后可直接使用:

npm i -g @sfpprxy/speak
speak "你好,世界"

常用命令

speak "任务完成"
speak --print-config
speak -h
speak --help
speak -v
speak --debug "任务完成"

帮助输出

speak -h
Usage: speak [options] --text "hello"
   or: speak [options] "hello"

Options:
  -h, --help                Show this help
  -d, --debug               Enable debug logs
  --print-config, --config  Print effective config and exit
  -t, --text <text>         Text to speak

首次使用

首次运行会提示输入 VOLC_TTS_TOKEN,并保存到本地:

  • 路径:~/.speak/auth.json
  • 权限:目录 700,文件 600

如果在非交互环境下缺少 token,会直接报错并提示先在终端初始化一次。

运行要求

  • 需要可用音频播放器(系统内置或常见播放器均可)
  • 需要网络访问 Doubao TTS API
  • 安装时不要跳过 optionalDependencies(避免使用 --omit=optional

配置项

| 变量 | 默认值 | 说明 | |---|---|---| | SPEAKER_DEBUG | 空 | 1/true/yes/on 时输出调试日志(也可用 --debug) | | TTS_PROVIDER | doubao | 当前仅支持 doubao | | VOLC_TTS_APPID | 3864509867 | 火山 TTS AppID | | VOLC_TTS_CLUSTER | volcano_tts | 集群标识 | | VOLC_TTS_RESOURCE_ID | volc.seedtts.default | 资源 ID | | VOLC_TTS_VOICE_TYPE | zh_female_vv_uranus_bigtts | 音色 | | VOLC_TTS_MODEL | 空 | 可选模型参数 | | VOLC_TTS_ENCODING | mp3 | 音频格式 | | VOLC_TTS_RATE | 24000 | 采样率 | | VOLC_TTS_SPEED | 1.0 | 语速比例 | | VOLC_TTS_VOLUME | 1.0 | 音量比例 | | VOLC_TTS_PITCH | 1.0 | 音高比例 | | MAX_TTS_TEXT_LEN | 400 | 最大播报字符数 | | TTS_TIMEOUT_MS | 10000 | 云端超时(ms) | | TTS_CACHE_DIR | ${TMPDIR}/speaker-tts-cache | 音频缓存目录 |

说明:VOLC_TTS_TOKEN 由首次交互输入后持久化到 ~/.speak/auth.json

常见问题

  • 没有声音:先检查系统输出设备和音量;再试 speak --debug "测试" 查看日志。
  • token 失效:删除 ~/.speak/auth.json 后重新运行 speak "测试" 重新初始化。
  • 找不到平台二进制:不要跳过 optionalDependencies,重新安装:
    • npm i -g @sfpprxy/speak