semvec/pypi-packages huggingface dataset:
BFA 0.1.0
CLI tool for RNN-T based text/audio forced alignment.
Requires Python: >=3.12

# BFA Forced-Aligner (Text/Phoneme/Audio Alignment)

A CLI Python tool for text/audio alignment at word and phoneme level.<br />
It supports both **textual and phonetic input** using either the [IPA](https://en.wikipedia.org/wiki/International_Phonetic_Alphabet) and [Misaki](https://github.com/hexgrad/misaki) phonesets.<br />
The integrated G2P model supports both **british and american English**.<br />
The final alignments are output in [**TextGrid**](https://www.fon.hum.uva.nl/praat/manual/TextGrid_file_formats.html) format.

It's based on a RNN-T model (CNN/LSTM encoder + Transformer decoder) and was trained on 460 hours of audio from the [LibriSpeech dataset](https://www.openslr.org/12).<br />
The current architecture only supports audio clips up to about 17.5 seconds (see [contributions](#Contributions)).

**No GPU is required to run this tool**, but a CPU with lots of cores can help.


## Installation

```bash
pip install BFA
```

**Requires Python ≥ 3.12**<br />


## Usage (CLI)

To align a corpus, two directories are expected:
- One that contains all your audio files (**.wav**, **.mp3**, **.flac** and **.pcm** files only)
- One that contains all your annotations (**.txt** and **.lab** files only)

You can find examples of such files in the [example](./example) directory of this repository.
A recursive search will be used so **the only constraint is that both directories uses the same structure**. If you use the same directory for both, then your .wav and .lab pairs should be in the same sub-directory.

```bash
bfa align \
  --audio-dir /path/to/audio_dir \
  --text-dir /path/to/text_dir \
  [--out-dir /path/to/out_dir] \
  [--dtype {words, phonemes}] \
  [--ptype {IPA, Misaki}] \
  [--language {EN-GB, EN-US}] \
  [--n-jobs N] \
  [--ignore-ram-usage] \
  [--config-path /path/to/config_file] \
```


## Performances

Aligning the **460 hours** of audio of the LibriSpeech dataset took **2h30 (realtime factor: x184)** on a **8 cores / 16 threads CPU**. Realtime factor on one core: x11.5.<br />
**1.5Go of RAM per thread are required** (here, 24Go for 16 threads). By default, BFA will check your total RAM before starting jobs.<br />
It **successfully aligned** more than **99%** of the files.<br />


## To Do:

- Test IPA ptype
- Test Word dtype


## Contributions

All contributions are welcomed but my main goal is the following:

Currently, the main limitation of this tool is it's context length (about 17.5 seconds) but RNN-T models can use a streaming implementation and this way handle files of arbitrary sizes.
This would requires making the model causal (currently it isn't, in order to maximize accuracy) and write an inference function that can handle this method.

It would also be interesting to support .TextGrid files for annotations (input).


## Licence

This project is licensed under the MIT License. See the LICENSE file for details.
jsonl-tools 0.1.3
A Python library for working with JSONL files
Requires Python: >=3.7

# jsonl_tools

**jsonl_tools** is a minimalist Python library for working with `.jsonl` (JSON Lines) files. It provides functions similar to Python's built-in `json` module, along with utilities to convert between `.json` and `.jsonl` formats.

## What is JSONL?

JSON Lines (JSONL) is a text format where each line is a separate JSON object. This format is commonly used in data processing, logging, and machine learning systems.

Official site: [https://jsonlines.org](https://jsonlines.org)

## Features

- Functions that are compatible with `json`: `load`, `loads`, `dump`, `dumps`
- Support for reading and writing `.jsonl` files and strings
- Conversion from `.json` (list of objects) to `.jsonl` and vice versa
- No external dependencies
- Compatible with Python 3.7+

## Installation

Install via pip:
``pip install jsonl_tools``

Alternatively, clone the repository manually:

```git
cd jsonl_tools
```

## Usage

### Load JSONL from a file

```python
from jsonl_tools import load

with open("data.jsonl", "r", encoding="utf-8") as f:
    data = load(f)
```

### Load JSONL from a string

```python
from jsonl_tools import loads

s = '{"a": 1}\n{"b": 2}'
data = loads(s)
```

### Write to a JSONL file

```python
from jsonl_tools import dump

data = [{"x": 1}, {"y": 2}]
with open("output.jsonl", "w", encoding="utf-8") as f:
    dump(data, f)
```

### Get a JSONL string

```python
from jsonl_tools import dumps

jsonl_string = dumps([{"a": 1}, {"b": 2}])
```

### Convert Between Formats

#### JSON $\rightarrow$ JSONL

```python
from jsonl_tools import json_to_jsonl

json_to_jsonl("data.json", "data.jsonl")
```

Note: ``data.json must`` contain a top-level list ``([{}, {}, ...])``.

#### JSONL $\rightarrow$ JSON

```python
from jsonl_tools import jsonl_to_json

jsonl_to_json("data.jsonl", "data.json")
```

This will create a ``data.json`` file containing a list of objects.
package-dev-tools 0.7.1
CI/CD tools for Python packages
Requires Python: >=3.10

# Package Dev Tools
[![PyPI version](https://badge.fury.io/py/package-dev-tools.svg)](https://badge.fury.io/py/package-dev-tools)
![PyPI downloads](https://img.shields.io/pypi/dm/package-dev-tools)
![Python version](https://img.shields.io/badge/python-3.10+-brightgreen)
![Operating system](https://img.shields.io/badge/os-linux%20%7c%20macOS%20%7c%20windows-brightgreen)
![Coverage](https://img.shields.io/badge/coverage-100%25-brightgreen)

This project contains scripts and provides pre-commit hooks for:
* automatically adding type annotations in a project
* updating project badges
* bumping package versions
* checking test coverage
* instantiating new projects
* extracting supported Python versions
* ..

## Usage
Use the [pre-commit hooks](https://github.com/quintenroets/package-dev-tools/tree/main/.pre-commit-hooks.yaml) in your .pre-commit-config.yaml
* see [.pre-commit-config.yaml](https://github.com/quintenroets/package-dev-tools/tree/main/.pre-commit-config.yaml) for examples

## Installation
```shell
pip install package-dev-tools
```
VAPL 1.0.10
VAPL - programming language to create voice assistants
Requires Python: >=3.7

# _**VAPL**_ - Voice Assistant programming language

### STYLE
- VARIABLE - ```var NAME = VALUE or EXPRESSION, STATEMENT```
- FUNCTION - ```define NAME(PAR1, PAR2){ CODE  }```
- print - ```out: EXPRESSION or VALUE```
- one-line comment start - ```%: TEXT```
- multiple-lines comments - ```%= TEXT ... some lines ... this function... =%```
- builtIn modules that can be accessed using ```#[NAME] > Import something > As something```
- for loop - ```for ( var VARIABLE; ITERATOR ) { CODE }```
- while loop - ```while ( STATEMENT ) { CODE }```
- if-then-else - ```if(STATEMENT) (optional - then )  { CODE }```
- PATHS
- running functions and some other actions - ```call: x+=1; test(x)```
- uses python evaluation - example ```if(x==5 or x == -5) then {out: "x is equal to 5 or -5"}```
### ABOUT PATHS
- starts with /* and ends with */
- are basically list of instructions
- when path is activated it will run code after ;> **ONLY ONE-LINE**
- uses strings (WHEN TEXT IS IN BETWEEN '(' AND ')' IT CAN BE USED AS VARIABLE IN CODE)
- example:
```
var HELLO = "hello (NAME)"
/*
HELLO	;> out: "hello " + NAME + "!"
*/
```
### Builtin modules:
- Web:
	+ redirect ( url ) - redirects to a website
	+ html ( HTML ) - runs html code 
	+ tts ( text ) - TextToSpeech

## HOW TO INSTALL
```commandline
pip install VAPL
```

## CODE EXAMPLE
### main.py
```python
import VAPL

Code = VAPL.Code('code.vapl', True)
web = VAPL.Web(False)
web.run('127.0.0.1', 81)
```
### code.vapl
```shell
%: BuiltIn Module
#[VAPL.Modules.Web] > redirect, tts
%: WHEN USING Speech To text it will ignore the name and $ignore
%: But name will be displayed as title
$name = 'bob'
$ignore = ['']
out: f'Hello, I am {$name} Vapl.'
out: 'I am the voice assistant made in custom language.'
out: 'You can make me too!'
out: 'Search for VAPL in testpypi or pypi!'
out: ''
define spotify(){
	call: tts('opening spotify')
	call: redirect('https://open.spotify.com/collection/tracks')
}

/*
'hi' ;> call: tts(f'hi')
'goodbye'  ;> call: tts('goodbye')
f'initialize {$name}' ;> call: tts(f'initializing {$name}')
'open spotify' ;> call: spotify()
*/
```