Skip to content

Development

Setup

1. Clone the repository

git clone https://github.com/mratanusarkar/audim.git
cd audim

Using local FFmpeg is optional but recommended for speeding up the video encoding process.

Install FFmpeg

sudo apt install ffmpeg libx264-dev
brew install ffmpeg
choco install ffmpeg

Download and install FFmpeg from the official website:

Download and install FFmpeg from the official website:

3. Setting up the project environment

We recommend using uv to manage your project environment since audim was developed using uv, and you can replicate the same environment by just running:

uv sync

But, feel free to use any python based environment and package manager of your choice.

About uv

uv is a fast, simple, and secure Python package manager. It is recommended to use uv to manage your project environment.

3.1 Installing uv

Note

If you are using conda base environment as the default base environment for your python projects, run the below command to activate the base environment.

If not, skip this step and continue with the next step.

conda activate base

If you don't have uv installed, you can install it by running:

# Install uv
pip install uv

# Setup project environment
uv venv

source .venv/bin/activate

uv pip install -e ".[dev,docs]"
# Install uv
pip install uv

# Setup project environment
uv venv

.venv\Scripts\activate

uv pip install -e ".[dev,docs]"

4. Create input and output directories

mkdir ./input ./output

Create a test.py or run.py to test your python script using audim.

touch test.py

ideally, if done correctly, the setup should be like this:

audim/
├── audim/
├── docs/
├── input/
├── output/
├── README.md
└── test.py # or run.py

Note

  • You would dump your input files in the input directory.
  • The output files will be dumped in the output directory.
  • See Usage for more details or see sample scripts to get some inspiration.

Code Quality

Before committing, please ensure that the code is formatted and styled correctly. Run the following commands to check and fix code style issues:

# Check and fix code style issues
ruff format .
ruff check --fix .

Run the project

feel free to create a run.py or test.py file to test the project. They will be untracked by git.

implement your usage logic in the run.py file.

Run the script with:

python run.py

Build and serve the documentation

You can build and serve the documentation by running:

uv pip install -e .[docs]
mkdocs serve