Metadata-Version: 2.4
Name: grundig-dss
Version: 1.0.0
Summary: Bit-exact native decoder for Grundig DSS-SP (PH9607) dictation audio — .dss to 16 kHz WAV, no Windows and no vendor software.
Author: Guillain-RDCDE
License: MIT
Project-URL: Homepage, https://github.com/Guillain-RDCDE/DS2-Anywhere
Project-URL: Repository, https://github.com/Guillain-RDCDE/DS2-Anywhere
Project-URL: Specification, https://github.com/Guillain-RDCDE/DS2-Anywhere/blob/main/docs/SPEC-grundig-dss-sp.md
Project-URL: The story, https://github.com/Guillain-RDCDE/DS2-Anywhere/blob/main/docs/12-cracking-the-grundig-sp-codec.md
Keywords: dss,grundig,digta,dictation,codec,celp,audio,decoder,speech,reverse-engineering
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Multimedia :: Sound/Audio :: Conversion
Classifier: Topic :: System :: Archiving
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# Grundig DSS-SP native decoder

Pure-Python, bit-exact decoder for **Grundig** `.dss` files (magic `\x06dss`, e.g.
the Digta 415) — the Grundig SP CELP variant that neither FFmpeg's `dss_sp`, the
Olympus-derived open codecs, nor NCH Switch decode correctly.

Reverse-engineered from Grundig's `dss2wav.dll`; output is **byte-for-byte
identical** to the reference on every test sample. The full story and the
recovered bitstream + synthesis spec are in
[`../docs/12-cracking-the-grundig-sp-codec.md`](../docs/12-cracking-the-grundig-sp-codec.md).

## Install

```bash
pip install grundig-dss        # from PyPI (pure-Python, zero dependencies)
```

## Usage

```bash
grundig-dss input.dss [output.wav]    # console command (out defaults to the input stem)
# or, without installing:
python3 -m grundig input.dss output.wav
./decode.sh input.dss output.wav
```

```python
from grundig import decode_dss, write_wav
pcm = decode_dss("recording.dss")     # list[int], 16 kHz mono 16-bit
write_wav("recording.wav", pcm)
```

## Files

| File | What |
|---|---|
| `grundig_dss.py` | the decoder (no Wine, no DLL, stdlib only) |
| `gtables.json` | quantization tables (reflection codebooks, gains, pulse/binomial tables, resample FIR) extracted from `dss2wav.dll`'s `.data` |
| `decode.sh` | thin CLI wrapper |

Olympus DSS/DS2 files (`\x02dss`/`\x03dss`/`\x03ds2`) are handled by the main
chain, not this module.
