Introduction¶
When agents handle tasks that are contextually tied to the current environment, they often need to “see” or “hear” what the user is doing. If music, video, or game audio is playing in the current session and the assistant cannot perceive it, the contextual coherence of the conversation is limited. Existing approaches either rely on the System Media Transport Controls (SMTC) or require users to manually drag audio files into the session—both of which carry high operational costs and limited compatibility. Yamashigure/dsh-listen-together attempts to close this gap with a lightweight solution: it captures system loopback audio, provides a draggable and customizable floating window, and exposes the “now playing” state through DSH’s tool interfaces, allowing sessions to query or control playback at any time.
Plugin Positioning¶
Yamashigure/dsh-listen-together is a DSH client plugin that captures system mix audio, provides a draggable and configurable desktop floating window, and registers three tool interfaces (listen_now, listen_feel, listen_control) so that the current session can query what is playing, retrieve musical impressions, or execute pause/volume control on the source application.
Core Capabilities¶
System Loopback Audio Capture
- The plugin captures loopback audio (system mix) from the default output device. It does not require a separate Stereo Mix configuration, nor does it require specifying a particular player. Audio emitted by browsers, video players, and other sources is captured together.
Floating Window
- The floating window is a topmost, borderless, draggable native window that displays the current application, track name, loudness waveform, and provides pause and volume controls. Volume adjustments are applied directly to the source application’s audio session (via WASAPI), while pause is sent through system media commands. The pause/play button sends system media commands to the source window; the volume slider modifies the audio session volume; the scroll wheel allows quick volume adjustment (±4).
Tool Interfaces
- The Host plugin registers three tools: listen_now, listen_feel, and listen_control. Any session can call listen_now to retrieve the current track information; listen_feel reads the track, loudness/frequency-band trends, and transcription snippets, enabling the assistant to provide impressions based on this data; listen_control is used to pause or adjust volume. The plugin does not proactively push messages into the session—relevant content only enters the session when the user explicitly asks or the assistant invokes these tools.
Voice Transcription
- During playback, the plugin captures a ~10-second loopback audio clip every minute and passes it to a local SenseVoice model for speech recognition. The recognition results are stored as part of the music state. SenseVoice weights are downloaded and verified by DSH’s built-in @deepseek-ai/dsh-experimental-speech-to-text-sensevoice, with the cache located at %USERPROFILE%.dsh\speech-to-text\sensevoice\models.
Floating Window Interactions
- The floating window supports dragging the blank area to reposition; scroll wheel for volume; the × in the upper-right corner to minimize; Ctrl+Alt+M to summon it back. Once the small lock button is activated, the entire window (except the lock itself) becomes click-through for mouse events, preventing accidental pause or volume changes; Ctrl+Alt+L also unlocks. All four edges and corners are resizable by dragging; resizing is disabled while locked. The content area does not scale with the window—excess space is used for the waveform and volume bar. When the title is too long, it auto-scrolls horizontally; after a track change, the browser window title is verified approximately 1.2 seconds later, and the update is confirmed only after two consecutive matches to avoid false positives.
Appearance Configuration
- The panel provides a “Headphones” button to toggle the floating window visibility, and a “Small Gear” button to open appearance settings, where opacity, mouse click-through toggle, and background image can be configured. Waveform color and opacity can be set independently: color takes effect on “Apply,” while opacity takes effect on slider release; values are written to wavecolor and waveopacity in ui.ini. Background image position can be adjusted in the panel: after selecting an image, click “Adjust Position,” drag the background within the floating window, then click “Confirm” to save; the position is recorded as bgx and bgy in ui.ini. The window is temporarily unlocked during adjustment and re-locked upon confirmation.
Installation & Enablement¶
The current version is 0.1.0-beta.1 and has not been published to npm; it can only be installed from GitHub.
- In the DSH desktop app, open Plugins → Add plugin.
- Paste the GitHub URL of this repository (or download the .tgz file from the Release and enter its absolute path).
- Select Install, then select Enable now once installation is complete.
- On first launch, the native helper will be compiled, requiring the .NET Framework 4.x csc.exe bundled with Windows. After compilation, the floating window will appear in the bottom-right corner of the screen.
Typical Usage¶
After installation, the floating window appears in the bottom-right corner of the screen by default. Drag the blank area to reposition, use the scroll wheel for volume, click × in the upper-right to minimize, and press Ctrl+Alt+M to summon. Once the lock is enabled, the entire window is mouse click-through—only the lock itself is clickable. The “Headphones” button on the panel controls floating window visibility, and the “Small Gear” button opens appearance settings.
Within a session, the following questions can be posed:
- “What am I listening to right now?” → The assistant calls listen_now and returns the current track, application, and other details.
- “How does this song make you feel?” → The assistant calls listen_feel, combining the track, loudness/frequency-band trends, and transcription snippets to provide impressions.
- “Pause it for me / Turn it down a bit” → The assistant calls listen_control to pause or adjust the volume on the source application.
Use Cases & Notes¶
- Suited for developers who need to perceive currently playing music, video, or game audio within conversations, especially in agent scenarios that require incorporating audio content into context.
- The plugin runs with the current DSH process permissions. It is recommended to review the source code and license (MIT) before installation.
- The current version only supports the Windows platform.
- System mix captures audio from the entire output device. If other software is producing sound simultaneously, it will be captured as well. The plugin identifies the source application via audio sessions, prioritizing browsers, then applications actively producing sound.
- Track names are primarily derived from browser window titles and may be inaccurate when the player is on a background tab or the current tab is not a media page.
- The pause feature relies on the source application’s response to system media commands. Chromium-based browsers (Chrome / Edge) generally work correctly, while some players may require manual pausing.
- The floating window is an independent native window, not embedded within the DSH page. It does not follow theme changes. OBS “Window Capture” can use it as a source; the taskbar button is hidden via ITaskbarList.
- Anti-cheat note: The plugin runs as an independent process and does not use injection, hooks, memory read/write, remote threads, or drivers. It only performs WASAPI loopback, per-application volume adjustment, reading window titles/process names (process names cached for 60 seconds, and only browser window titles are read), and sends a single system media key press when pausing. If a game’s anti-cheat is very aggressive, it is recommended not to run music and the game simultaneously.
- Transcription is not lyrics: SenseVoice is a speech recognition model, not a music separation tool. When instrumental accompaniment plays, vocals may be obscured, and recognition results may be fragmented or empty. Treat results as reference snippets only.
- Known issues in the beta stage: Panel buttons go through host commands, which leave command events (not chat messages) in the session log. Future versions will switch to a bridge that does not write to the session.
Ecosystem Background¶
DSH’s philosophy is “everything is a plugin.” The community catalog (https://www.skillhub.cn/plugins/Yamashigure/dsh-listen-together) is an independent site with no official affiliation to DeepSeek or 幻方.
In Brief¶
Yamashigure/dsh-listen-together provides a complete pipeline from system loopback audio to session tool interfaces, making it suitable for agent developers who need to perceive the current music/video state within conversations. Plugin homepage: https://github.com/Yamashigure/dsh-listen-together.