semvec/pypi-packages huggingface dataset:
tts-webui.descript-audiotools 0.7.5
Utilities for handling audio.
License: MIT

# AudioTools

Object-oriented handling of audio signals, with fast augmentation routines, batching, padding, and more.

## Installation
```
pip install git+https://github.com/descriptinc/audiotools
```
OR
```bash
git clone https://github.com/descriptinc/audiotools
cd audiotools
pip install .
```

## Documentation

For documentation, see [the docs](https://descriptinc.github.io/audiotools/).

### Deploying documentation

To build the documentation, do:

```bash
cd docs/
make html
open _build/html/index.html
```

Once you're satisfied with your docs, push them to the gh-pages branch via

```bash
cd docs
bash publish_docs.sh
```

## Quickstart

```python
import audiotools
from audiotools import AudioSignal

signal = AudioSignal("tests/audio/spk/f10_script4_produced.wav", offset=5, duration=5)
signal.play() # Play back the signal in your terminal using ffplay

signal.low_pass(8000) # Low-pass the signal
signal.play() # Play back the low-passed version of the signal
```

For more, see the [documentation](##Documentation).

### Install hooks

First install the pre-commit util:

https://pre-commit.com/#install

    pip install pre-commit  # with pip
    brew install pre-commit  # on Mac

Then install the git hooks

    pre-commit install
    # check .pre-commit-config.yaml for details of hooks

Upon `git commit`, the pre-commit hooks will be run automatically on the stage files (i.e. added by `git add`)

**N.B. By default, pre-commit checks only run on staged files**

If you need to run it on all files:

    pre-commit run --all-files
clockitpy 0.1.0
A lightweight Python library to measure function execution time.
License: MIT
Requires Python: >=3.7

# clockitpy �

A small Python library to measure function execution time easily.

## Installation

```bash
pip install clockitpy
```

## Usage

### Using as a decorator

```python
from clockitpy import measure_time

@measure_time
def my_function():
    # Your code here
    sum([i for i in range(1000000)])

my_function()
# Output: my_function executed in 0.045123 seconds
```

### Using timeit function

```python
from clockitpy import timeit

def my_function():
    return sum([i for i in range(1000000)])

duration, result = timeit(my_function)
print(f"Execution time: {duration:.6f} seconds")
print(f"Result: {result}")
```

## Features

- **measure_time**: A decorator to automatically measure and print execution time
- **timeit**: A function to measure execution time and get both duration and result

## Requirements

- Python >= 3.7

## License

MIT License - see LICENSE file for details