Hello, Klio!

Klio is an ecosystem that allows you to process audio files – or any binary files – easily and at scale.

Klio jobs are opinionated data pipelines in Python (streaming or batch) built upon Apache Beam and tuned for audio and binary file processing.

Klio was built by Spotify to run our large-scale audio intelligence systems and is used by teams of engineers and audio researchers to help develop and deploy next generation audio algorithms.

Current Status

Klio is currently under rapid development. This means that APIs and features will evolve. It is recommended that teams who adopt Klio today upgrade their installation as new releases become available, as backwards compatibility is not yet guaranteed.

Why Klio?

Klio enables:

  • Organizations to build media processing systems that share tooling & infrastructure between production systems and research teams;

  • An architecture that encourages reusable jobs and shared outputs, lowering maintenance and recomputation costs;

  • Continuous, event-driven processing of rapidly growing catalogues of content.

It lets organizations that do their own research (e.g. machine learning on audio) move faster by enabling:

  • Researchers to benefit from working with the same infrastructure as engineers responsible for production systems as well as processing power for complete catalogues of content;

  • Engineers have a simpler framework to directly productionize large media processing jobs produced by researchers when they’re already using the same frameworks for development;

  • Organizations to benefit from these pipelines immediately as they add new content, allowing new content to be processed immediately on ingestion through a streaming pipeline and for backfills to be handled as a batch job with the same code.

What are Klio Pipelines?

A Klio pipeline:

  • use reference identifiers to audio files from event inputs (e.g. Google Pub/Sub),

  • download those files onto worker machines,

  • run processing algorithms (e.g. librosa, ffmpeg, trained ML models, anything) over these files,

  • then save the resulting output to the data store of choice.

Processing algorithms can be ML-based or otherwise, as long as they are defined or otherwise can be wrapped in Python. Klio jobs can scale up to process an entire corpus of media, or down to a single item for fast iteration.

Streaming Klio jobs are wired up via a messaging queue 1 to create complex processing directed acyclic graphs - even across teams, much like backend services.

Why is it called Klio?

Kleio (latinized to Clio) is the Greek muse of history and lyre playing. Klio (we dropped the e for easier spelling) takes inspiration from Kleio’s ability to inscribe historical significance to the actions of the present and to recall historical meaning from ancient works.

The name Klio also pairs nicely with another Spotify open source project, Scio, that brings Apache Beam to Scala.

More Questions?



Currently, streaming Klio jobs only support reading from/writing to Google Pub/Sub. We welcome contributions for expanding Klio’s streaming I/O support of Beam’s built-in I/O transforms.