Introduction¶
DeepSeek Harness (DSH) supports extending functionality through plugins. dsh-bili-asr is a tool for parsing Bilibili video links and extracting text. It preferentially reads the video’s built-in subtitles. If the video has no subtitles, it calls a local Whisper model to perform audio transcription, and then returns the result as timestamped text. It also supports exporting SRT, TXT, or JSON files.
Features¶
- Lenient link parsing: Supports BV IDs, av IDs, b23.tv short links, full URLs, and shared text.
- Subtitle track priority: Preferentially reads the video’s built-in subtitles (CC subtitles), without requiring additional dependencies.
- Automatic transcription when no subtitles are present: If no subtitles are available, it calls the local
whisper-clifor audio transcription and automatically downloads and processes the audio. - Full text with timestamps: Returns the complete transcription content in
[mm:ss] textformat. - One-click export: Supports exporting SRT, TXT, and JSON files to a specified directory.
- Cross-platform: Built on Node.js and compatible with Windows, macOS, and Linux.
- Host tool registration: Automatically registers as the
bili_scripthost tool and is invoked through a proxy.
Installation¶
Add this plugin using DSH’s official plugin installation command:
dsh plugin add git+https://github.com/rudyz666/dsh-bili-asr.git
After installation, the plugin is automatically loaded when the DSH process starts.
Usage Example¶
Enter the following instruction in a DSH chat conversation to trigger parsing:
Parse the script for this video: BV1dL8K6HEm3
Returned Content:
* Video metadata: title, uploader, duration, and source (subtitle track / local transcription).
* Number of transcription entries and the complete text with timestamps.
* Export file path.
Dependencies and Configuration¶
Videos with subtitles: Ready to use out of the box; only network requests are required.
Videos without subtitles: whisper-cli and ffmpeg must be installed on the local machine.
* Whisper model: On first use, the large-v3-turbo model (about 874MB) is automatically downloaded.
* GPU support: A GPU is not required; CPU transcription works normally. If a GPU is detected, it is automatically preferred.
* Configuration: Configure it through the profile’s cordis.patch.yml file:
- id: dsh-bili-asr
config:
baseDir: '/Users/you/.dsh/bili-asr' # Root directory for cache and exported files
writeFiles: true # Whether to write exported files (default true)
Ecosystem and Resources¶
This plugin follows the MIT License and is maintained by community developer rudyz666. DSH’s philosophy emphasizes “everything is a plugin.” By registering as the bili_script host tool, this tool enables automatic invocation of video scripts in agent development.