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. π
In one sentence: doctors, lawyers and police dictate into small voice recorders; the file format those recorders produce was kept secret for thirty years; this project opens it on any Linux machine β and gives the fix back to the open-source tools everyone uses.
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.
- New here? Three words in plain English
- Pick your way in β four doors, choose your depth
- Try it in 30 seconds
- What it does, in one picture
- The technical trail β the story, chapter by chapter
- Where it stands now β giving it back to FFmpeg & preservation
- Real-world numbers
- What's in this repo
- Credits Β· License
You don't need any audio or programming background to follow this repo. Three terms cover most of it:
- Codec β the secret "recipe" that squeezes a voice recording into a tiny file, and rebuilds it on playback. Without the recipe, the file is just unreadable noise.
- Decode (and demux) β turning that tiny file back into sound. Demux is the first step (split the file into the right little chunks, called frames); decode is the second (turn frames into audio). Most of our hardest bugs were in the demux step β getting the chunks lined up.
- Reverse-engineering β working out the secret recipe yourself, by careful observation, because the manufacturer never published it.
That's it. Everything below builds gently from these.
| π 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. |
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/healthDrop 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.
The whole point in one diagram: a Windows VM running commercial software, replaced by a small local binary.
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.
Start from zero. A .dss/.ds2 file is a voice recording squeezed tiny by a
secret algorithm (see the three words above).
"Decoding" it means rebuilding the original sound β and to do that you need the
algorithm, which the manufacturers never published. The chapters below are the story of
getting it anyway. Each one starts from the ground; you can stop at any rung.
- The thirty-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).
- Putting it in production β turning a decoder into a real pipeline: CLI, cron, daemon, the encode chain. The engineering part.
- 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.
- 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.
- The re-sync block, again β and into FFmpeg β the same trick a second time, on Olympus's other format (DSS SP). We re-hosted the vendor's decoder, read the rule off the live parser, fixed it in one branch β and this time sent the fix to FFmpeg itself (see where it stands).
- 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.
- 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 and an FFmpeg patch.
Short on time? 5 min β this page Β· 20 min β chapter 1 Β· 30 min β the two detective stories (3 & 4) Β· the twist β 6 Β· the finale β 7 Β· everything β docs/ in order, "impossible for thirty years" to "production in a weekend."
The work didn't stop at our own servers β it's being handed back to the tools everyone else uses:
- Into FFmpeg. FFmpeg is the audio/video engine inside VLC, Chrome, OBS and much of
the internet. The Olympus DS2 decoder + demuxer and the DSS-SP paused-recording fix
have been submitted to the
ffmpeg-develmailing list and are in review; the Grundig SP decoder patch is staged behind them. Once merged, every program built on FFmpeg reads these files for free, forever β no recipe required. - A public specification. The first one ever written for the Grundig DSS-SP codec, bit-exact β so nobody has to reverse-engineer it again.
- Digital preservation. A PRONOM submission so archives and forensic tools can even recognise these files in the first place.
That's the throughline of the project: not just open the lock for ourselves, but leave the door open for everyone.
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 β
- π 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 decoder + demuxer, the DSS-SP paused-recording fix, and the Grundig SP decoder), the ones submitted to
ffmpeg-develplus their test samples and cover notes. - π 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.
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.
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. π
