semvec/pypi-packages huggingface dataset:
energy-vad 1.0.0
Intents for Home Assistant
License: MIT
Requires Python: >=3.7.0
Keywords: home, assistant, intent, recognition

# Energy VAD

Simple energy-based voice activity detector (VAD) with no external dependencies.

Energy threshold is calibrated from initial audio, or can be set manually.

## Installation

``` sh
pip install energy-vad
```

## Example

``` python
import wave
from energy_vad import EnergyVad

vad = EnergyVad()

with wave.open("test.wav", "rb") as wav_file:
    assert wav_file.getframerate() == 16000
    assert wav_file.getsampwidth() == 2
    assert wav_file.getnchannels() == 1
    
    chunk = wav_file.readframes(vad.samples_per_chunk)
    while len(chunk) == vad.bytes_per_chunk:
        result = vad.process_chunk(chunk)
        if result is None:
            # calibrating
            pass
        elif result:
            # speech
            print("!", end="")
        else:
            # silence
            print(".", end="")

        chunk = wav_file.readframes(vad.samples_per_chunk)
        
print("")
print("Energy threshold:", vad.threshold)

# Clear calibrated threshold
vad.reset_calibration()
```
velma 0.0.1
Modern Reimplementation of vera built with C internals
License: MIT
Requires Python: >=3.8
Keywords: vera, c_tokenizer

# velma

Velma is the reimplementation of [vera](https://github.com/verateam/vera)
 python-API built with C internals.

## main differences

- Velma suppports python-based plugins while vera support both lua and python.
- It provides a python package built with setuptools and C extension rather than relying on `<boost/python.hpp>`. This avoid relying on the system python environment, and provide support for virtual env.
- Tokenization is done with C in mind rather than C++.

## Installation

Start by [cloning this repository](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository).

### pip based

> [!NOTE]
> It is recommended to use python virtual env's rather than doing a system-wide install.
> See [Creation of virtual environments](https://docs.python.org/3/library/venv.html) for more information

```bash
# (in repository's root)
pip install .
```

### Using nix

The repository flake provides `velma` nix derivation (`buildPythonPackage`).

```
nix build github:Sigmanificient/velma
```

or creating a python env:

```nix
let
  # assuming `velma-flake.url = "github:Sigmanificient/velma"` in flake inputs
  velma = velma-flake.outputs.${system}.velma;
  selectPythonPackages = ps: [ velma ... ];
in 
(pkgs.python311.withPackages (ps: selectPythonPackages)
```

## Development

To see available commands in the Makefile, use the following:

```bash
make help
```

### Building a standalone shared object

If you need to build a standlone `shared object`:

```bash
make -f standalone_shared_object.mk
```

### IDE support (via compile_commands.json)

```bash
make compiledb
```