Preface¶
When using dsh-pet within DSH, the desktop pet’s bubble is mostly still a static, idle chatter, unrelated to the music currently playing on the PC. Writing your own script to read the player’s status, align it with LRC timestamps, and feed the bubbles requires handling QQ Music’s system media session, NetEase Cloud Music’s progress and seek, and also avoiding triggering pet animation changes every time the lyric line switches. The community plugin Whale Song (dsh-pet-qqmusic) is introduced below: on Windows it connects the playback progress of QQ Music and the NetEase Cloud Music PC client to dsh-pet, displays lyrics line by line according to timestamps, and offers configurable delay, translation, and display modes.
What is this¶
Whale Song is a plugin for DeepSeek Harness (DSH). The repository is published by the maintainer 344272586-sketch and is categorized as “Fun Costume” in the SkillHub plugin directory. The package name dsh-pet-qqmusic originates from the early version that only supported QQ Music; the current version (the package.json in the material is 1.3.9) supports both QQ Music and the NetEase Cloud Music PC client.
In one sentence: the desktop pet’s bubble shows the line that is currently playing. QQ Music reads title, progress, and duration via Windows SMTC; NetEase Cloud Music parses the local cloudmusic.elog directly, without relying on injection solutions like BetterNCM or InfLink, and it can also detect dragging seek. Lyrics are split into lines by LRC timestamps and displayed either through dsh-pet’s /dsh-pet-7340/broadcast or via self-rendered bubbles on the Web side. The plugin does not require DeepSeek, OpenAI, QQ Music, or NetEase Cloud Music API keys, nor does it read cookies.
Core features¶
Dual players and auto switching¶
- QQ Music: depends on Windows 10 1809+ / Windows 11 SMTC; enable “Show system media transport controls (SMTC)” in the client settings.
- NetEase Cloud Music: reads
%LOCALAPPDATA%\NetEase\CloudMusic\cloudmusic.elog(default path; can be overridden via configuration); clients 3.0+ write this log; verified on 3.1.39 in the material. - Configuration item
playerdefaults to"auto": follow whichever is playing; you can also forceqqornetease.
Lyrics and display¶
- Synchronize line by line by LRC timestamps; default 600ms lead time (
offsetMs) to compensate for the roughly 1 second polling of dsh-pet bubbles, range −5000 to 5000 ms; NetEase Cloud Music can useneteaseOffsetMsfor independent fine-tuning. - Match the lyric version in the library by “song title + artist + duration” (Live / instrumental, etc. are down-weighted); NetEase Cloud Music prefers songId to fetch lyrics.
- Automatically skip the opening credits and “song title - artist” header lines; when a piece is recognized as having no lyrics, show “Instrumental, please enjoy”.
- Optional
showTranslation: when a translation exists, show both the original and translated lines; when switching tracks, you can first show “song title - artist” (showTrackInfo). - Do not refresh the pet model: the Web desktop pet uses self-rendered lyric bubbles; in desktop overlay mode, a quiet patch can be applied to dsh-pet so that lyrics only update the bubble without switching animations or replaying.
Host and client collaboration¶
The host samples about every 200ms, and the browser-side lib/client.js polls about every 300ms, scheduling actively based on the next line’s time; the same line can be resent via keepAliveSec (default 8 seconds) to avoid the bubble auto-collapsing in about 10 seconds. hostFallback allows the host to write directly to dsh-pet when DSH is minimized or throttled in the background, reducing reliance on browser polling (overlay mode does not enable this).
When using multiple desktop pets, leaving petId empty means the currently selected pet; you can also fix delivery to a specific id.
Prerequisites¶
| Condition | Description |
|---|---|
| System | Windows 10 1809+ / Windows 11 |
| QQ Music PC | Recommend ≥ 21.10.2962 (earlier versions may not report progress); verified on 22.76 in the material |
| NetEase Cloud Music PC | Recommend 3.0+; verified on 3.1.39 in the material |
| dsh-pet | Installed and enabled; recommend 0.3.5+ |
| DSH | Desktop edition (desktop profile) or dsh web |
| Node | The plugin engines requires >= 20 |
Path to enable QQ Music SMTC (the menu wording may differ slightly across minor versions):
QQ Music → Main menu (≡) → Settings → General → Notifications
→ Check “Show system media transport controls (SMTC)”
NetEase Cloud Music does not need SMTC; as long as the client has been launched and songs have been played, the above cloudmusic.elog will generally exist; otherwise the plugin will prompt in the desktop pet bubble.
Installation and activation¶
The plugin runs with the permissions of the current DSH process; before installation, please read the repository source code and the MIT license. If you do not have a git environment, you can download the source package from Releases, then extract it to a fixed directory (referred to below as <PLUGIN_DIR>, e.g., C:\Plugins\dsh-pet-qqmusic).
Method A: DSH desktop app (desktop profile)¶
The desktop profile of the desktop edition is exclusively managed by Electron and cannot register local plugins directly with dsh plugin --profile desktop add ...; you need to link manually:
- Place the plugin directory at
<PLUGIN_DIR>(the README example usesgit cloneinto this path; you can also use a Releases extraction). - Edit
%USERPROFILE%\.dsh\profiles\desktop\package.json: add"dsh-pet-qqmusic": "link:<PLUGIN_DIR>"underdependencies(backslashes in JSON should be written as\\); add"dsh-pet-qqmusic"underdsh.profile.bundles. - Install using DSH’s bundled Node / pnpm in the profile directory:
$profile = "$env:USERPROFILE\.dsh\profiles\desktop"
$node = "$env:USERPROFILE\.dsh\dsh-runtimes\dsh-primary-runtime\dependencies\node\bin\node.exe"
$pnpm = "$env:USERPROFILE\.dsh\dsh-runtimes\dsh-primary-runtime\dependencies\pnpm\bin\pnpm.mjs"
& $node $pnpm install --dir $profile --config.confirmModulesPurge=false
- If you use desktop overlay (
display: "desktop"), you need to additionally apply the quiet patch (Web desktop pets can skip this):
cd <PLUGIN_DIR>
& "$env:USERPROFILE\.dsh\dsh-runtimes\dsh-primary-runtime\dependencies\node\bin\node.exe" `
scripts\patch-dsh-pet-quiet-lyrics.mjs --restart
- Refresh the DSH page; if it does not load, completely exit DSH and open it again. After dsh-pet is upgraded and overwrites
events.js, you need to rerun the patch script above.
Method B: dsh web (web profile)¶
dsh plugin --profile web add link:<PLUGIN_DIR>
After installation, restart dsh web and refresh the browser. After publishing to npm, you can also use dsh plugin --profile web add dsh-pet-qqmusic (subject to the repository instructions).
Configuration¶
The user configuration is located at %USERPROFILE%\.dsh\dsh-pet-qqmusic\config.json by default (i.e., $DSH_HOME/dsh-pet-qqmusic/config.json). Changes take effect in the next cycle; usually you do not need to restart the entire DSH; changing neteasePath requires restarting the plugin.
Summary of commonly used items:
| Key | Default | Description |
|---|---|---|
enabled |
true |
Master switch |
player |
"auto" |
auto / qq / netease |
offsetMs |
600 |
Lyric lead time (milliseconds) |
displayMode |
"auto" |
auto / overlay / bubble |
showTranslation |
false |
Whether to show translation lines |
prefix |
"♪ " |
Bubble prefix (up to 8 characters) |
You can also read and write configuration via HTTP (replace <DSH_PORT> with the actual port):
Invoke-RestMethod http://127.0.0.1:<DSH_PORT>/dsh-pet-qqmusic/config.json
Invoke-RestMethod http://127.0.0.1:<DSH_PORT>/dsh-pet-qqmusic/config.json -Method Put `
-ContentType 'application/json' -Body '{"offsetMs":800,"showTranslation":true}'
Delay tuning: if the lyrics are ahead of the audio, reduce offsetMs (can be negative); if they are behind, increase it. Bluetooth headphones or external sound cards often require an additional ±200–500 ms.
Typical usage and self-check¶
After playing any song in QQ Music or NetEase Cloud Music, the desktop pet bubble will switch to the current line as the progress advances, for example as shown in the README:
QQ Music Sunny Day — Jay Chou 00:29
Pet bubble ♪ The little yellow flowers in the story
NetEase Extinguished — TC 01:09
Pet bubble ♪ Unknowingly, your heart grows farther and farther away
Debug and status interfaces (routes from the material):
| Route | Purpose |
|---|---|
GET /dsh-pet-qqmusic/ |
Visual debug panel (refreshes about every 1.5 seconds) |
GET /dsh-pet-qqmusic/state.json |
Current line, next line, and progress |
GET /dsh-pet-qqmusic/health |
Helper and lyric status |
POST /dsh-pet-qqmusic/refresh |
Force refetch lyrics |
If QQ Music SMTC is not enabled, health may return available: false along with an smtc-off prompt; simply enable SMTC in the settings.
Use cases and notes¶
Suitable for users who use DSH, dsh-pet, and QQ Music or the NetEase Cloud Music PC version on Windows simultaneously, want the desktop pet bubble to match the listening progress, and do not want to deal with player injection or third-party lyric plugins. The NetEase Cloud Music path uses the local elog; the plugin documentation states that it only parses fields such as song name, artist, and progress, and does not read signed musicurl links in the log.
Keep the following limitations in mind: the platform is primarily Windows (QQ depends on SMTC); when both clients play simultaneously, use player to specify the source; desktop overlay requires maintaining the relationship between the quiet patch and dsh-pet versions. The DSH ecosystem is “everything is a plugin”; SkillHub is a community directory and is not officially affiliated with DeepSeek / QuantumFactory.
Closing¶
Whale Song connects QQ Music’s SMTC and NetEase Cloud Music’s cloudmusic.elog to the same LRC line-by-line logic, then feeds them to dsh-pet, and distinguishes the bubble implementation for Web and desktop overlay. For installation steps, configuration tables, and principle diagrams, refer to the repository README.
- Plugin directory page: https://www.skillhub.cn/plugins/344272586-sketch/dsh-pet-qqmusic
- Source code and documentation: https://github.com/344272586-sketch/dsh-pet-qqmusic