semvec/pypi-packages huggingface dataset:
precisetranscribe 0.2.1
Utilities for transcribing audio files using the Whisper API.
Requires Python: >=3.9
Keywords: transcription

Transcription with OpenAI's [Whisper](https://github.com/openai/whisper) is very accurate, but it doesn't natively support speaker labelling (diarisation). 

Existing libraries for diarisation like [pyannote](https://github.com/pyannote/pyannote-audio) rely on audio features to separate and identify speakers, but are computationally expensive and often inaccurate. A common failure mode arises when the speaker changes their audio quality, such as when they move closer to or further from the microphone. This can cause the diarisation algorithm to incorrectly identify the speaker as a new person.

I had a simple hypothesis: the cues from transcribed speech are sufficient to identify speakers. I developed a pipeline which passes the transcribed text to GPT-4o with a prompt asking it to identify the speaker.

```mermaid
flowchart LR
    A[Input file #40;audio, video#41;]
    B[Whisper transcription]
    C[Text output]
    D[Label and tidy with GPT-4o]
    E[Output in user-defined format]
    A-- Convert to WAV -->B
    B-->C
    C-->D
    D-->C
    D-->E
```

# Installation

```bash
pip install precisetranscribe
```
pybrewlib 1.0
A set of calculations used in beer-making and wine-making hobbies
Requires Python: >3.0

# Library description
Library contains functions for calculations that can be used in alcohol making.
Most of the functions are related to wine or beer making, but there might be
a small part of code related to stronger alcohols.

## Command-Line interface
Library exposes command line interface, which can be run by runing cli script inside pybrewlib folder.
This has been done for manual testing at the start, but then I have started using it as interface hence,
its left and documented, however not all API functions have been documented.

## Current API

|Name|Type|Description|
|--|--|--|
|alcohol_mass|function| return alcohol mass (volume in liters) |
|alcohol_units|function| return alcohol units in drink (irish) |
|blood_alcohol_content|function| return estimated bac|
|build_sg|function| builds starting gravity from a list of sugar additions expects a list of tuples/list in format: [(gravity before addition, gravity after addition)] |
|build_sg_interactive|function|build starting gravity for wine (if there was extra sugar added) (interactively)|
|calculations|module|calculations exposed by library and used by the cli|
|cli|function|command-line interface for the library|
|dillution_approx_outcome|function| return total quantity of alcohol at given strenght and water required|
|dilution_approx_calc|function|calculate abv of diluted drink|
|dilution_approx_proportions|function|return proportions to get requested strength and quantity of alcohol|
|e_bac|function| estimate blood alcohol content |
|estimate_mixed_abv|function| Estimate abv of a drink mixed from other drinks expects a list in format [(abv of 1st drink, volume)]|
|estimate_mixed_abv_interactive|function| Estimate abv of a drink mixed from other drinks (interractive)|
|sg_for_abv|function|calculate sg for wanted abv|
|sg_strength_calc|function|calculate abv content|
|spirit_dilution_spirit|function|acurate formula for diluting spirit with other spirit returns amount of other spirit required|
|spirit_dilution_water|function|acurate formula for diluting spirit with water returns required amount of water|
guardtypes 1.0.2
Enforces type annotations at runtime

# guardtypes

`guardtypes` is a Python library that enforces type annotations at runtime. It provides a decorator, `enforce`, that checks the types of function arguments and return values against their type hints, raising a `TypeError` if a mismatch is found.

## Installation

To install `guardtypes`, use pip:

```sh
pip install guardtypes
```

## Usage

### Basic Example

The `enforce` decorator can be used to enforce type annotations on function arguments and return values.

```python
from guardtypes import enforce


@enforce
def add(a: int, b: int) -> int:
    return a + b


# This will raise a TypeError because 'b' is not an int
add(1, '2')
```

### Handling Local Context

The `guardtypes` decorator also handles local context, allowing you to use class types within the same function.

```python
from guardtypes import enforce


class Cat:
    def __init__(self, name: str):
        self.name = name

    @staticmethod
    @enforce
    def create(name: str) -> 'Cat':
        return Cat(name)


# This will create an instance of Cat
cat = Cat.create("Whiskers")

# This will raise a TypeError because 'name' should be a str
cat = Cat.create(123)
```

## License

This project is licensed under the MIT License.