Skip to content

Guillain-RDCDE/DS2-Anywhere

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

40 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

DS2-Anywhere

Open the dictation formats that stayed locked for thirty years β€” Olympus DS2/DSS and now Grundig DSS β€” on any Linux box. No Windows, no GUI, no commercial software. A production recipe and the reverse-engineering trail behind it. πŸ”“

CI License: MIT Latest release Status Platform


A handful of strangers who never met picked a thirty-year-old lock β€” a proprietary voice codec that doctors, lawyers and police dictated billions of seconds into, and that no open tool on Earth could read. One person reverse-engineered the first piece. Others made it portable, then universal. We put it in production over a weekend β€” and then a lawyer in Germany dug an old recorder out of a drawer and handed us a codec even the commercial software couldn't decode. So we cracked that one too, in an afternoon, by interrogating the manufacturer's own decoder inside a debugger we built from its DLLs.

All of it is in here: the working code, and exactly how it was done.

Pick your way in

πŸ“– Read it like a thriller The Story β†’ β€” no code, ~10 minutes. A locked format, a relay of strangers, a bug that turned out to be a human being, and a German lawyer's drawer. It really happened, and every twist links to the chapter that proves it.
πŸ”§ Follow the technical trail Go deeper ↓ β€” from "what even is a .ds2 file" up to running a closed-source decoder under a debugger. Built to be readable if you've never reverse-engineered anything.
🌐 Decode one right now Open the in-browser decoder β†’ β€” drop a .ds2/.dss (Olympus, Grundig, even encrypted) and get audio back. Nothing uploaded, nothing installed.
πŸ›  Run it yourself 30 seconds ↓ β€” drop a file in, get an MP3 out.

Try it in 30 seconds

git clone https://github.com/Guillain-RDCDE/DS2-Anywhere
cd DS2-Anywhere
docker compose up --build
# Web UI: http://localhost:8080/convertisseur.php
# HTTP API: http://localhost:8765/health

Drop a .ds2 or .dss into examples/ and convert it from the web UI. Or one file from the CLI:

conv-dss-ds2-to-mp3 recording.ds2
# [ds2_qp 16000Hz, 31.8min] recording.mp3  OK  (14.55 Mo en 10.3 s)

Production install (config + cron + systemd + web UI): sudo ./src/bin/install.sh, or docs/02-integration.md.

What it does, in one picture

                   BEFORE                                            AFTER

   .ds2 ─► SSHFS ─► Windows VM ─► Switch.exe                 .ds2 ─► cron (Linux)
                       β”‚                                              β”‚
                       β–Ό                                              β–Ό
                  .wav (mono)                                   .mp3 (mono 64k)
                       β”‚                                              β”‚
                       β–Ό                                              β–Ό
                  SSHFS back                                  Whisper API
                       β”‚                                              β”‚
                       β–Ό                                              β–Ό
                  glue script                              ready for transcription

   GUI app + Windows VM + SSHFS round-trip      bash + native binary, all local, ~10s/file

A Windows VM with commercial software in the loop, replaced by a bash wrapper, a cron, and a native binary β€” all local, ~10 s per file.


Go deeper: the technical trail

New to any of this? A .dss/.ds2 file is a voice recording squeezed tiny by a secret algorithm (a "codec"). "Decoding" it means rebuilding the original sound from those bytes β€” and to do that you need the algorithm, which the manufacturers never published. The whole trail below is the story of getting it anyway. You don't need a background in audio or reverse-engineering to follow it; each chapter starts from the ground.

Climb at your own pace:

  1. The ten-year lock β€” what a DS2 file is, why it resisted, and how Kieran Hirpara reverse-engineered the codec from the Olympus DLLs (the genius part β€” not ours).
  2. Putting it in production β€” turning a decoder into a real pipeline: CLI, cron, daemon, the encode chain. The engineering part.
  3. The empty-block bug β€” a decoder that was bit-exact on every file we tested and still wrong on paused recordings. Ten dead ends, a twelve-line fix. A detective story worth reading even if you never touch DS2.
  4. Cracking the re-sync block β€” the sequel: we ran the closed-source Olympus decoder inside a debugger we built from its own DLLs, and read the format's last undocumented rule straight off the silicon.
  5. The bug that wasn't β€” the twist, and the chapter we're proudest of. A rigorous case for a "last bug" (the research paper), then overturned β€” there was no bug; it was a person stepping away from the mic. How careful work can be confidently wrong, and how to catch it.
  6. Cracking the Grundig SP codec β€” the finale. The Grundig grandfather format that nobody decoded β€” not us, not FFmpeg, not even Olympus's own software. We extracted Grundig's decoder, ran it under a debugger, patched out the instruction it used to delete its own evidence, and rebuilt the codec bit-exact. Now a native Python decoder, an FFmpeg patch, and a PR to the upstream codec.

Short on time? 5 min β†’ this page Β· 20 min β†’ chapter 1 Β· 30 min β†’ the two detective stories (3 & 4) Β· the twist β†’ 5 Β· the finale β†’ 6 Β· everything β†’ docs/ in order, "impossible for thirty years" to "production in a weekend."

Real-world numbers

The decision to ship rested on an A/B against the reference Windows implementation on the same source file, not a count of successful decodes:

  • A/B vs Switch.exe (same .ds2, both chains, both MP3s through the same Whisper API): transcripts functionally identical β€” 16.2 % vs 17.2 % low-confidence words, inside Whisper's own run-to-run variance. The chains are interchangeable downstream.
  • 35 / 35 real production dictations decoded (6 h 48 of audio), zero failures.
  • ~3 200 cron passes since go-live, zero errors. The Windows VM stays on standby, untouched.

For the Grundig codec: byte-for-byte identical to Grundig's own decoder on every sample. Full methodology β†’

What's in this repo

  • πŸ“– docs/ β€” the full didactic trail above, plus the benchmarks.
  • πŸ›  src/ β€” the integration code: CLI, cron, HTTP daemon, admin web UI. Sanitized; the patterns are reusable as-is.
  • πŸŽ™ grundig/ β€” the native Grundig DSS-SP decoder (pure Python, bit-exact) + its tables.
  • 🎬 ffmpeg-upstream/ β€” the FFmpeg patches (DS2 container generalization + the Grundig SP decoder), staged for upstream.
  • πŸ“ the formal spec β€” the world's first public specification of the Grundig DSS-SP codec (bit-exact), plus a PRONOM submission so digital-preservation tools can identify these files at all.

Credits β€” proper order

The intellectual heavy-lifting belongs to the people who opened the locks:

  • Kieran Hirpara β€” hirparak/dss-codec β€” the reverse-engineering that started all of it. MIT, February 2026.
  • Gaspard Petit β€” dss-codec-wasm + dss-codec fork (the Rust crate our Dockerfile uses). MIT.
  • Patrick Domack β€” the FFmpeg C port of the spec. MIT / public domain.
  • JulsRX β€” the Grundig Digta owner who reported the file nobody could decode, and supplied the public sample that made cracking the Grundig codec possible.
  • lamejs (LGPL) and FFmpeg (LGPL) β€” the MP3 encoders.

This repo is a recipe; the recipe needs the ingredients above to exist at all. Full breakdown: CREDITS.md.

License

MIT, same as the upstream codec. Fork, adapt, deploy β€” please keep attribution to the codec authors. We publish the clean reimplementations and the recovered specs, never the vendors' proprietary code.


Thirty years of locked, one bash command later. The chain has to keep going. πŸ”“

About

Decode Olympus DSS/DS2 dictation files anywhere - pure CLI, no Windows, no GUI, no commercial software. A production integration recipe for a format that was locked for ten years.

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors