semvec/pypi-packages huggingface dataset:
video2sub 0.1.1
Transcribes video/audio/url to subtitles.
License: MIT
Requires Python: >=3.8.1,<4.0.0

# video2sub

video2sub is a command-line tool that transcribes video/audio/url to subtitles. It supports various subtitle formats such as txt, srt, vtt, tsv, and json. The tool uses speech recognition models from [whisper](https://github.com/openai/whisper) to perform transcription.

## Requirements

Python 3.8+  
ffmpeg

## Installation

Install [ffmpeg](https://ffmpeg.org/download.html).

(Optional) Install [CUDA](https://developer.nvidia.com/cuda-toolkit) & [cuDNN](https://developer.nvidia.com/cudnn). You can either install them system wide or create a conda environment using `environment.yml`.

Install [pipx](https://github.com/pypa/pipx).

Install video2sub using pipx:

```sh
pipx install video2sub --include-deps
```

(Optional) Copy `config.vide2sub.example.yml` to `~/.config/` (win `%UserProfile%\.config`) then rename it to `config.video2sub.yml`. Edit it to your prefer default value.

## Usage

```sh
video2sub [video_url] [--lang] [--model] [--proxy] [--output] [--verbose] [--force]
```

|Argument|Description|
|---|---|
|video_url|The URL of the video or path of the video/audio file.|
|--lang|The language code of the audio file to be transcribed. Default: "en".|
|--model|The name/path to the speech recognition model to be used for transcription. Default: "small".|
|--proxy|Proxy to be used for downloading the video from url.|
|--output|Output format: txt, vtt, srt, tsv, json. Default: "txt".|
|--verbose|Show output.|
|--force|Force to retrieve then transcribe video regardless of existing audio or subtitle file.|

Note: If the --lang or --model arguments are not specified, the tool will use the default values which can be set by the user in the configuration file `~/.config/video2txt.yml`.

## Examples

1. Transcribe a video from a URL using default config:

    ```sh
    video2sub https://www.youtube.com/watch?v=dQw4w9WgXcQ
    ```

1. Transcribe a video from a English spoken video file using medium model and save it as a .vtt subtitle:

    ```sh
    video2sub my_video.mp4 --lang en --model medium --output vtt
    ```

1. Transcribe an audio file and save it as a .srt subtitle:

    ```sh
    video2sub my_audio.mp3 --output srt
    ```
chattychattybangbang 0.0.27
chat utilities
License: MIT

# chattychattybangbang [docs](https://microprediction.github.io/chattychattybangbang)
Utilities for using chatgpt more reliably


### Install

    pip install chattychattybangbang
    
### Set key

    import os
    os.environ['OPEN_AI_KEY'] = 'getakeyfromopenaisite' 
    
### Example
Asks ChatGPT a question, then calls it again to QA the answer. 


    from chattychattybangbang.castigateuntilvaluesare import castigate_until_values_are
    question = """
      I would like you to pick three companies from the sp500 index. 
      Return a dictionary containing the main color in their logo (pick one only)
      The keys of the dictionary should be the company tickers. 
      Just provide the dict and nothing else in your response, please. 
    """
    d = castigate_until_values_are(question=question, value_description='a color', max_retries=5)
    print(d)
    
    {'AAPL': 'white', 'MSFT': 'red', 'GOOGL': 'green'}

See [examples](https://github.com/microprediction/chattychattybangbang/tree/main/examples) for presidential poetry appreciation, etc. 

### Article
See [Reliably getting answers out of chatgpt](https://medium.com/@mike.roweprediger/reliably-getting-answers-out-of-chatgpt-by-forcing-it-to-qa-itself-feb1f56782b9) on medium. Thanks to Michael Rowe. 

### One day certification course
Just [kidding](https://microprediction.github.io/chattychattybangbang/certificate) but check out our [awesome 10x prompting guide](https://microprediction.github.io/chattychattybangbang/awesome).