I saw few commits to the opensubsonic api on their github, i think the dev of audiomuse made the base changes needed to the api but i don’t know if it’s gonna be available soon, i hope tho!
Just adding my interest to this feature here! Very excited for it.
1 Like
@Tolriq juat want to share that Navidrome implemented the new Sonic Similarity API in this PR:
master ← feat/sonic-similarity-plugin
aperto 01:32PM - 27 Apr 26 UTC
### Description
Implements the [OpenSubsonic `sonicSimilarity` extension (v1)](… https://opensubsonic.netlify.app/docs/extensions/sonicsimilarity/) as a plugin capability. This adds two new Subsonic API endpoints — `getSonicSimilarTracks` and `findSonicPath` — that delegate to a WASM plugin for audio-based similarity. The similarity logic is not implemented in Navidrome itself; Navidrome only provides the plumbing to delegate to plugins.
If a plugin implements the `SonicSimilarity` capability, the extension is advertised in `getOpenSubsonicExtensions` and the endpoints return `sonicMatch` entries with similarity scores. If no plugin is available, the extension is not advertised and the endpoints return HTTP 404.
**Key design decisions:**
- Endpoints use `handlerRaw` (not `handler`) to return HTTP 404 directly when no provider is available, since a missing plugin means the functionality doesn't exist rather than a data-not-found error
- Routes are always registered (not conditional) — the handlers themselves return 404
- Three-tier type layering: `capabilities.SonicMatch` → `sonic.SimilarResult` → `sonic.SimilarMatch` to maintain clean package boundaries
- New `MatchSongsToLibraryMap` in the matcher returns `map[int]model.MediaFile` to preserve similarity score ordering through the matching pipeline
- The `core/sonic` package defines a `capabilitySonicSimilarity` constant locally (unexported) since importing the `plugins` package constant would create an import cycle
### Related Issues
None — this is a new extension implementation.
### Type of Change
- [ ] Bug fix
- [x] New feature
- [ ] Documentation update
- [ ] Refactor
- [ ] Other (please describe):
### Checklist
- [x] My code follows the project's coding style
- [x] I have tested the changes locally
- [ ] I have added or updated documentation as needed
- [x] I have added tests that prove my fix/feature works (or explain why not)
- [x] All existing and new tests pass
### How to Test
1. **Without a sonic similarity plugin installed:**
- Call `getOpenSubsonicExtensions` — should NOT include `sonicSimilarity`
- Call `getSonicSimilarTracks?id=any` — should return HTTP 404
- Call `findSonicPath?startSongId=any&endSongId=any` — should return HTTP 404
2. **With a sonic similarity plugin installed:**
- Call `getOpenSubsonicExtensions` — should include `sonicSimilarity` (version 1)
- Call `getSonicSimilarTracks?id=<valid-song-id>&count=5` — should return `sonicMatch` entries with `entry` and `similarity` fields
- Call `findSonicPath?startSongId=<id1>&endSongId=<id2>&count=10` — should return path entries with similarity scores
- Verify missing required params return subsonic error responses
- Verify non-existent song IDs return subsonic error responses
3. **Run the test suite:**
```bash
make test
```
### Additional Notes
**New files and packages:**
- `plugins/capabilities/sonic_similarity.go` — Capability interface and request/response types
- `core/sonic/sonic.go` — Core service orchestrating: MediaFile lookup → plugin call → matcher resolution
- `plugins/sonic_similarity_adapter.go` — WASM plugin adapter implementing `sonic.Provider`
- `server/subsonic/sonic_similarity.go` — Thin HTTP handlers
- `plugins/pdk/go/sonicsimilarity/` — Generated PDK for plugin authors (via `make gen`)
- `plugins/testdata/test-sonic-similarity/` — Testdata WASM plugin for integration testing
**Test coverage:**
- Unit tests for `core/sonic` service (provider check ordering, error paths, match resolution)
- Unit tests for `core/matcher.MatchSongsToLibraryMap` (index preservation, partial matches)
- Unit tests for `sonicSimilarity` extension advertisement (with/without provider)
- Integration tests for the WASM adapter via testdata plugin (round-trip through plugin, error injection)
- Snapshot tests for `sonicMatch` XML/JSON serialization
- E2E tests for both endpoints with mock provider (happy path, count parameter, missing params, non-existent IDs, JSON structure validation)
- E2E tests for 404 behavior when no plugin is available
They will be merged soon and then put in the next release but can be already be tested with the Navidrome image of the pr:
deluan/navidrome:pr-5419
Also AudioMuse-AI plugin v8 already implemented them in this release:
Real example of call can be also be found in the Navidrome’s PR but anyway are the same of the Open Subsomic api documentation.
Please remember that AudioMuse-AI on song path don’t implement similarity ao it return -1 as per the documentation.
3 Likes
this is so hype, only a matter of time until it’s available in symfonium smart flows
1 Like
And Tolriq does the mic drop. Ladies and gentlemen the time is near
2 Likes
Just for anyone else who had no idea what you meant by this - check the Changelog for 15.0.0 beta 1!
Literally cannot wait (but am choosing to in an attempt to pretend I am being mature)
1 Like
Can confirm that this is working with latest beta v15.
For everyone else, dont forget to completely close and open Symfonium for the Smart Flow options to show (like me)
2 Likes