107 lines
3.3 KiB
Markdown
107 lines
3.3 KiB
Markdown
# AAC Encoder/Decoder Assignment (Multimedia)
|
|
|
|
## About
|
|
|
|
This repository contains a staged implementation of a simplified AAC-like audio coder/decoder pipeline, developed in the context of the Multimedia course at Aristotle University of Thessaloniki (AUTh).
|
|
The project is organized into incremental levels, where each level introduces additional functionality and requirements (e.g., segmentation control, filterbanks, and progressively more complete encoding/decoding stages).
|
|
The purpose of this work is to implement the specified processing chain faithfully to the assignment specification, validate correctness with structured tests, and maintain a clean, reproducible project structure throughout development.
|
|
|
|
## Repository Structure
|
|
|
|
The repository is organized under the `source/` directory and split into three incremental levels:
|
|
|
|
- `source/level_1/`
|
|
Baseline implementation of the required processing chain for Level 1.
|
|
|
|
- `source/level_2/`
|
|
Placeholder for Level 2 implementation (to be filled step-by-step).
|
|
|
|
- `source/level_3/`
|
|
Placeholder for Level 3 implementation (to be filled step-by-step).
|
|
|
|
Each level contains:
|
|
- a module file (e.g., `level_1/level_1.py`)
|
|
- a dedicated `tests/` directory for module-level tests (pytest)
|
|
|
|
## Level Descriptions
|
|
|
|
### Level 1
|
|
|
|
**Goal:** Implement the core analysis/synthesis chain for Level 1 as defined in the assignment specification.
|
|
|
|
Implemented components (current status):
|
|
- SSC (Sequence Segmentation Control)
|
|
- Filterbank (MDCT analysis) and inverse filterbank (IMDCT synthesis)
|
|
- End-to-end encoder/decoder functions:
|
|
- `aac_coder_1()`
|
|
- `i_aac_coder_1()`
|
|
- Demo function:
|
|
- `demo_aac_1()`
|
|
|
|
Tests (current status):
|
|
- Module-level tests for SSC
|
|
- Module-level tests for filterbank and inverse filterbank (including OLA-based reconstruction checks)
|
|
- Internal consistency tests for MDCT/IMDCT
|
|
- Module-level tests for `aac_coder_1` / `i_aac_coder_1`
|
|
|
|
### Level 2
|
|
|
|
**Goal:** ...
|
|
|
|
|
|
### Level 3
|
|
|
|
**Goal:** ...
|
|
|
|
## How to Run
|
|
|
|
All commands below assume you are inside the `source/` directory.
|
|
|
|
### Run Level 1 Demo
|
|
|
|
Run the Level 1 demo by providing an input WAV file and an output WAV file:
|
|
|
|
```bash
|
|
python -m level_1.level_1 <input.wav> <output.wav>
|
|
```
|
|
Example:
|
|
```bash
|
|
python -m level_1.level_1 ../material/LicorDeCalandraca.wav ../material/LicorDeCalandraca_out.wav
|
|
```
|
|
The demo prints the overall SNR (in dB) between the original and reconstructed audio.
|
|
|
|
### How to Run Tests
|
|
|
|
Tests are written using `pytest` and are organized per level.
|
|
|
|
From inside `source/`, run all tests:
|
|
```bash
|
|
pytest
|
|
```
|
|
|
|
To run only level_1/tests
|
|
```bash
|
|
pytest level_1/tests
|
|
```
|
|
|
|
To run a specific test file:
|
|
```bash
|
|
pytest level_1/tests/test_SSC.py
|
|
```
|
|
|
|
|
|
|
|
## Notes on Development Workflow
|
|
|
|
- The project is developed incrementally, level-by-level.
|
|
- Tests are primarily module-level and specification-driven.
|
|
- Internal helper testing is avoided in general, except for MDCT/IMDCT which are treated as reusable “library-like” primitives.
|
|
|
|
## Disclaimer
|
|
|
|
This project was developed solely for educational purposes.
|
|
It is provided "as is", without any express or implied warranties.
|
|
The author assumes no responsibility for any misuse, data loss, security incidents, or damages resulting from the use of this software.
|
|
This implementation should not be used in production environments.
|
|
|
|
All work, modifications, and results are the sole responsibility of the author. |