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

n8n-nodes-bilibili-asr

v0.1.1

Published

n8n community node for Bilibili (Bcut) Automatic Speech Recognition API

Downloads

33

Readme

n8n-nodes-bilibili-asr

npm version

一个 n8n 社区节点,封装了 B站必剪(Bcut)语音识别 API,可将音频文件自动转录为字幕文本。

无需 API Key,使用 B 站公开的匿名接口,开箱即用。


功能特性

| 功能 | 说明 | | ---------------- | --------------------------------------------- | | 🎙️ 完整 ASR 流程 | 上传音频 → 创建任务 → 等待结果,一键完成 | | 🔍 查询任务结果 | 通过已有 task_id 查询识别进度与结果 | | 📄 多种输出格式 | JSON(带时间戳)/ SRT 字幕 / 纯文本 TXT | | 🔗 二进制字段接入 | 直接接收上游节点的音频二进制数据 | | 📦 无额外依赖 | 仅使用 Node.js 内置模块,不引入第三方 HTTP 库 |

支持的音频格式: MP3、WAV、FLAC、M4A


安装

方式一:n8n 界面安装(推荐)

  1. 打开 n8n,进入 Settings → Community Nodes
  2. 点击 Install a community node
  3. 输入包名:n8n-nodes-bilibili-asr
  4. 点击 Install,重启 n8n 后即可在节点面板中找到 Bilibili ASR

方式二:命令行安装

# 在 n8n 的自定义节点目录中安装
npm install n8n-nodes-bilibili-asr

使用方法

操作一:完整 ASR 流程(Run ASR)

典型工作流:

Read Binary File  →  Bilibili ASR (runAsr)  →  Write File

| 参数 | 说明 | | ------------ | ------------------------------------------------------ | | 音频来源 | Binary Field(接收上游二进制数据)或 Base64 字符串 | | 二进制字段名 | 上游节点输出的二进制属性名,默认 data | | 音频格式 | mp3 / wav / flac / m4a | | 输出格式 | json / srt / txt | | 最大轮询次数 | 等待识别完成的超时秒数,默认 300 |

JSON 格式输出示例:

{
  "task_id": "xxxxxxxx",
  "total_segments": 3,
  "segments": [
    { "index": 1, "start_time": 0, "end_time": 1200, "text": "大家好" },
    { "index": 2, "start_time": 1300, "end_time": 2500, "text": "欢迎使用" }
  ],
  "srt": "1\n00:00:00,000 --> 00:00:01,200\n大家好\n\n...",
  "txt": "大家好\n欢迎使用"
}

SRT / TXT 格式时,结果同时以字符串字段和二进制文件(可直接下载保存)形式输出。

操作二:查询任务结果(Query Result)

适合异步场景:先获取 task_id,稍后再查询。

| 参数 | 说明 | | ------- | ------------------------------- | | 任务 ID | 之前由 Run ASR 返回的 task_id |

输出字段含 state(0-5)和 state_description(中文说明)。


API 说明

本节点调用以下 B站必剪公开接口:

| 接口 | 方法 | 说明 | | --------------------------- | ---- | ------------------ | | /resource/create | POST | 申请分片上传 | | upload_urls[i] | PUT | 上传音频分片到 OSS | | /resource/create/complete | POST | 提交上传 | | /task | POST | 创建 ASR 任务 | | /task/result | GET | 查询识别结果 |

Base URL: https://member.bilibili.com/x/bcut/rubick-interface


开发者指南

# 克隆并安装依赖
git clone <repo>
cd n8n-nodes-bilibili-asr
npm install

# 构建
npm run build

# 开发模式(watch)
npm run dev

# 发布到 npm
npm publish

致谢

本节点的 API 封装逻辑来源于 AsrTools 项目,感谢原作者的开源贡献。

License

MIT