---
title: "AudioTrack"
sidebar_label: "AudioTrack"
description: "The clika_runtime.io AudioTrack class."
---

<!-- Generated by tools/api_reference/generate_api_docs.py. Do not edit. -->

The audio track a VideoWriter carries beside its frames: sample_rate in Hz, channels (1 mono, 2 stereo, ...) and codec, the audio codec name; '' picks the container's default encoder (AAC in an MP4). Declared at VideoWriter.open(audio=...); the samples arrive through write_audio and land in the file at close.

## `channels` (property)

The interleaved channel count.

## `codec` (property)

The audio codec name; '' picks the container's default.

## `sample_rate` (property)

The sample rate in Hz.

## `__init__`

```python
__init____init__(self, sample_rate: int, channels: int, codec: str = '') -> None
```

__init__(self, sample_rate: int, channels: int, codec: str = '') -> None

AudioTrack(sample_rate, channels, codec='')

A track of `channels` interleaved channels at `sample_rate` Hz, encoded with `codec` ('' = the container's default).
