> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pixeltable.com/llms.txt
> Use this file to discover all available pages before exploring further.

# AudioSplitter

> <a href="https://github.com/pixeltable/pixeltable/blob/main/pixeltable/iterators/audio.py#L16" id="viewSource" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/badge/View%20Source%20on%20Github-blue?logo=github&labelColor=gray" alt="View Source on GitHub" style={{ display: 'inline', margin: '0px' }} noZoom /></a>

# <span style={{ 'color': 'gray' }}>class</span>  pixeltable.iterators.AudioSplitter

Iterator over chunks of an audio file. The audio file is split into smaller chunks,
where the duration of each chunk is determined by chunk\_duration\_sec.
The iterator yields audio chunks as pxt.Audio, along with the start and end time of each chunk.
If the input contains no audio, no chunks are yielded.

Args:
chunk\_duration\_sec: Audio chunk duration in seconds
overlap\_sec: Overlap between consecutive chunks in seconds.
min\_chunk\_duration\_sec: Drop the last chunk if it is smaller than min\_chunk\_duration\_sec

## <span style={{ 'color': 'gray' }}>method</span>  build\_chunks()

```python theme={"theme":{"light":"light-plus","dark":"dark-plus"}}
build_chunks(
    start_time_sec: float,
    total_duration_sec: float,
    chunk_duration_sec: float,
    overlap_sec: float,
    min_chunk_duration_sec: float
) -> list[tuple[float, float]]
```

## <span style={{ 'color': 'gray' }}>method</span>  close()

```python theme={"theme":{"light":"light-plus","dark":"dark-plus"}}
close() -> None
```

Close the iterator and release all resources

## <span style={{ 'color': 'gray' }}>method</span>  create()

```python theme={"theme":{"light":"light-plus","dark":"dark-plus"}}
create(**kwargs: Any) -> tuple[type[ComponentIterator], dict[str, Any]]
```

## <span style={{ 'color': 'gray' }}>method</span>  input\_schema()

```python theme={"theme":{"light":"light-plus","dark":"dark-plus"}}
input_schema() -> dict[str, pixeltable.type_system.ColumnType]
```

Provide the Pixeltable types of the init() parameters

The keys need to match the names of the init() parameters. This is equivalent to the parameters\_types
parameter of the @function decorator.

## <span style={{ 'color': 'gray' }}>method</span>  output\_schema()

```python theme={"theme":{"light":"light-plus","dark":"dark-plus"}}
output_schema(
    *args: Any,
    **kwargs: Any
) -> tuple[dict[str, pixeltable.type_system.ColumnType], list[str]]
```

Specify the dictionary returned by next() and a list of unstored column names

**Returns:**

* `tuple[dict[str, pixeltable.type_system.ColumnType], list[str]]`: a dictionary which is turned into a list of columns in the output table
  a list of unstored column names

## <span style={{ 'color': 'gray' }}>method</span>  set\_pos()

```python theme={"theme":{"light":"light-plus","dark":"dark-plus"}}
set_pos(pos: int) -> None
```

Set the iterator position to pos
