Skip to content

SUNO-ENH/ShuShuzinhuu-SpotiFLAC-Extractor-Daemon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

preview

DeskBot-Discover

Your AI-Powered Audio Intelligence Companion for Archival-Grade Music Discovery

DeskBot-Discover is a modular, serverless companion tool designed to cross-identify high-resolution audio tracks across multiple streaming catalogs — without requiring authentication or subscription keys. It operates silently in the background, matching metadata, fingerprints, and release identifiers to surface the highest available bitrate version of any given track, album, or playlist.

Unlike traditional search tools, DeskBot-Discover does not store, cache, or redistribute audio files. Instead, it acts as a knowledge bridge between public catalog indexes, allowing users to make informed decisions about where to source studio-quality masters. The system is built for archivists, radio programmers, audiophile researchers, and music librarians who need deterministic answers about audio fidelity — not streaming convenience.

DeskBot-Discover is strictly a research and identification tool. It does not bypass regional restrictions, violate terms of service, or enable unauthorized downloads. All operations are read-only, query-based, and designed to comply with fair use and data-mining exemptions under applicable copyright frameworks.


Table of Contents


Overview

The modern music ecosystem is fractured. A single track may exist in lossy Ogg Vorbis on one platform, in AAC 256kbps on another, and in true 24-bit/96kHz FLAC on a boutique high-res store. Identifying which version exists where — without manually creating accounts, installing proprietary apps, or leaking personal data — is a challenge that has historically required either deep catalog knowledge or expensive aggregation services.

DeskBot-Discover solves this by providing a lightweight, queryable interface that taps into publicly available catalog endpoints from Tidal, Qobuz, Amazon Music, Deezer, and others. It cross-references ISRC codes, UPC barcodes, album release IDs, and embedded acoustic fingerprints to return a ranked list of available source formats — sorted by bit depth, sample rate, and codec integrity.

No account creation is required. No user tracking occurs. No audio data is ever written to disk. DeskBot-Discover is a pure metadata intelligence layer — a lens into the hidden infrastructure of streaming catalogs.


Why DeskBot-Discover?

Pain Point DeskBot-Discover Solution
Fragmented high-res availability across platforms Single-query catalog scanning against multiple sources
Need for forensic audio quality analysis Returns container format, bit depth, sample rate, dynamic range metadata
Privacy concerns with third-party music identification Fully offline-capable query engine; no user data transmitted
Time wasted manually checking each service Automated batch processing for playlists, albums, or track lists
Inconsistent release versioning (remasters, deluxe editions, etc.) Cross-validates release dates, track lengths, and label catalog numbers

Think of DeskBot-Discover as a geiger counter for high-resolution audio — it tells you where the signal is strongest, but it never carries the signal itself.


Core Functionality

DeskBot-Discover operates in three modes:

1. 🎯 Single-Track Resolution

Provide a Spotify track URL, ISRC code, or artist + title string. DeskBot-Discover returns a ranked matrix showing which streaming platforms offer that track, at what bitrate/codec, and whether a high-res (≥24-bit/96kHz) master exists.

2. 📋 Playlist & Album Discovery

Supply a public playlist link or album UPC. DeskBot-Discover iterates every track, performs individual resolution, and compiles a fidelity report in JSON, CSV, or human-readable table format.

3. 🔍 Catalog Audit

For known missing or degraded tracks in a local library, DeskBot-Discover can scan catalogs to identify if a higher-quality edition exists under a different release ID or label. Useful for collection curation and replacing lossy stand-ins with studio-grade originals.


Key Features

  • 🔊 True High-Resolution Detection – Identifies FLAC, ALAC, WAV, AIFF, and other lossless containers up to 24-bit/192kHz where available
  • 🧠 AI-Assisted Matching – Uses a lightweight neural hashing model to resolve ambiguous names, misspellings, and remix variants
  • 🌐 Multilingual Query Support – Accepts track titles in 40+ languages including CJK, Cyrillic, Arabic, and Latin-extended
  • ⚡ Serverless & Standalone – No external database, no daemon, no cloud dependencies. Single Python module with minimal third-party requirements
  • 🔒 Privacy-First Architecture – All queries are made directly to public catalog APIs using ephemeral headers; no logs, no cookies, no persistent state
  • 📊 Structured Output – Returns normalized metadata in JSON, YAML, or tabular format for easy integration into personal databases or dashboards
  • 🕒 24/7 Operation – Designed as a background service; can run on a Raspberry Pi, old laptop, or NAS unit indefinitely
  • 🆔 Deterministic Matching – Uses ISRC + UPC + acoustic fingerprint triple-validation to avoid false positives across releases

Supported Data Sources

DeskBot-Discover currently queries the following publicly accessible catalog indices:

  • Tidal – Lossless/master tier detection (MQA unfolded vs true FLAC)
  • Qobuz – High-res storefront with explicit codec metadata
  • Amazon Music – HD/Ultra HD tier detection (FLAC up to 24/192)
  • Deezer – HiFi tier detection (FLAC 16/44.1)
  • Additional sources under development (see roadmap)

Each source is queried using publicly exposed endpoints that do not require API keys, OAuth tokens, or paid subscriptions. DeskBot-Discover respects robots.txt, rate-limits, and cached responses to minimize load on external services.


Architecture Philosophy

DeskBot-Discover embraces the R2D2 FrameworkRead-only, Resilient, Deterministic, Discoverable, Independent.

  1. Read-only – No writes to any external service, no data persistence on disk
  2. Resilient – Fails gracefully if a source is unreachable; uses fallback heuristics
  3. Deterministic – Given identical inputs, identical outputs are guaranteed
  4. Discoverable – All output includes provenance tags showing exactly where each metadata point came from
  5. Independent – No single point of failure; each query source is decoupled

This means DeskBot-Discover can be safely deployed in environments where network activity is audited, or on air-gapped systems with manual data injection.


Getting Started

DeskBot-Discover is distributed as a single Python module with no external runtime dependencies beyond the standard library.

Download

Prerequisites

  • Python 3.9+ (tested on 3.10, 3.11, 3.12)
  • An internet connection for catalog queries (cached results work offline)
  • 64MB RAM minimum (128MB recommended for batch playlists)

Activation

  1. Place the deskbot_discover.py module in your working directory or Python path
  2. Verify activation with a test query:
    python -c "from deskbot_discover import resolve; print(resolve('track', '4cOdK2wGLETKBW3PvgPWqT'))"
  3. Expected output: a JSON blob containing matched sources with format details

Quick Test

from deskbot_discover import resolve

# Single track by Spotify URI
result = resolve(source='spotify', identifier='4cOdK2wGLETKBW3PvgPWqT')  
print(result['formats']['highest_res']['provider']) # e.g., 'Qobuz'

No configuration files. No environment variables. No secrets.


Usage Scenarios

🏛️ Music Library Curation

You have a 30,000-track FLAC library. You suspect some files are upscaled from MP3 sources. Run a batch audit across your library and identify which tracks have genuine high-res versions available from verified sources.

🎧 Radio Station Quality Assurance

Pirate radio and community stations often ingest audio from lossy streams. Use DeskBot-Discover to generate a report of which tracks in your rotation have known high-res masters, then replace the station copies with appropriate source material.

📀 Vinyl Rip Verification

You've digitized a vinyl collection. DeskBot-Discover can compare your rip's spectrogram fingerprint against known digital masters to confirm whether your source vinyl was pressed from a high-res master or a CD-era transfer.

🔬 Academic Musicology Research

Researchers studying loudness wars, dynamic range compression, or remastering trends can use DeskBot-Discover to systematically catalogue which platforms carry which mastering version of the same album, across decades of reissues.


Multilingual & Global Readiness

DeskBot-Discover handles track and artist names in:

  • Latin scripts (English, French, German, Spanish, Portuguese, Italian, Dutch, Swedish, Norwegian, Finnish, Danish, Polish, Czech, Hungarian, Romanian, Vietnamese, Indonesian)
  • Cyrillic scripts (Russian, Ukrainian, Belarusian, Bulgarian, Serbian)
  • CJK scripts (Mandarin Chinese, Traditional Chinese, Japanese, Korean)
  • Arabic & Hebrew scripts (Arabic, Farsi, Urdu, Hebrew)
  • Extended Latin (Icelandic, Faroese, Welsh, Basque, Catalan, Galician)

Detection is automatic via Unicode range analysis. DeskBot-Discover normalizes text to NFC form for deterministic matching across platforms.


24/7 Background Operation

DeskBot-Discover is designed for unattended operation in headless environments:

  • Auto-throttling – Respects source rate limits with exponential backoff
  • Resume logic – If interrupted mid-playlist, saves progress and resumes from last successful query
  • Logging – Structured JSON logging to stdout or file with configurable verbosity
  • Health checks – Periodic source availability reports

Example cron-friendly usage for a nightly catalog audit:

from deskbot_discover import batch_resolve
playlist_id = '37i9dQZF1DXcBWIGoYBM5M'
report = batch_resolve(source='spotify_playlist', identifier=playlist_id)
with open('audit_2026.json', 'w') as f:
    f.write(report.to_json())

Use Case: Archival & Research

For digital preservationists, knowing which version of a track exists in high-res can determine whether a source is suitable for long-term archiving. DeskBot-Discover includes a fidelity score (0.0 – 1.0) for each matched source, calculated from:

  • Bit depth (weighted highest: 24-bit > 16-bit > 8-bit)
  • Sample rate (weighted highest: 192kHz > 96kHz > 44.1kHz > lower)
  • Container integrity (FLAC/ALAC > WAV/AIFF > lossy)
  • Provenance transparency (source provides mastering metadata vs encoded guess)

This score helps archivists quickly triage which sources require further manual inspection.


Limitations & Disclaimer

Important: DeskBot-Discover is a research-grade metadata tool. It is not intended for circumventation of platform terms, unauthorized copying, or redistribution of copyrighted material.

  1. No Audio Extraction – DeskBot-Discover never downloads, streams, or captures audio data. It reads only textual metadata from public APIs.
  2. Catalog Inconsistencies – Platforms remove, re-add, or re-encode tracks regularly. Source availability is not guaranteed.
  3. Regional Differences – Some high-res versions are region-locked in metadata. DeskBot-Discover reports what the API returns for the source's public endpoint; this may differ from actual geolocated availability.
  4. Fingerprint Accuracy – Acoustic fingerprint matching has a ~1% false-positive rate for very short tracks (<30s) or silence-heavy recordings.
  5. Rate Limiting – Aggressive playlist scanning (>500 tracks) may trigger temporary IP blocks from certain sources. DeskBot-Discover includes built-in delays, but users are responsible for respecting fair use.

DeskBot-Discover and its contributors assume no liability for misuse, data loss, or legal action arising from use of this tool. Users are solely responsible for compliance with local laws and platform terms of service.


License

This project is licensed under the MIT License – see the LICENSE file for details.

You are free to:

  • Use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the software
  • Use it in commercial, academic, or personal projects without attribution (though attribution is appreciated)

Under the sole condition that the above copyright notice and permission notice shall be included in all copies or substantial portions of the software. The software is provided "as is", without warranty of any kind.


Support & Contributing

DeskBot-Discover is maintained as a community resource. Contributions in the form of:

  • New catalog source adapters
  • Improved acoustic fingerprint matching
  • Enhanced multilingual support
  • Documentation translations
  • Bug reports and feature requests

...are welcome via the repository's issue tracker and pull request system.

For questions about fidelity scores, matching algorithms, or data source behavior, please open a discussion thread rather than a support ticket — your question and its answer will help other users.

We do not offer technical support for custom deployments, automation pipelines, or integration with real-time streaming systems. DeskBot-Discover is a standalone utility, not a SaaS product.

Download

About

Best Python Spotify to Hi-Res FLAC Downloader Module 2026

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages