Skip to main content

HLVox

pipeline status coverage report PyPI version

Originally intended to create sentences from the word snippets for the Half Life 1 Vox, this project can take a folder of word audio files and piece them into sentences. This repo when used standalone (ie by running voice.py directly) will output the sentences as audio files.

Getting Started

To use this project, you will first need a folder full of voice files. If you have Half Life 1 installed, the voices can be extracted from the VPK files using something like GCFScape.

Prerequisites

Python dependencies are managed with uv in this workspace.

An installation of FFMpeg is required. On Ubuntu, just run the following:

apt update
apt install ffmpeg

For persistence, a local sqlite database can be used, or a postgresql database. These are not exposed through the basic CLI.

Installing

How to set up a basic dev environment:

Pull this repo

git pull https://gitlab.com/bhagen/hlvox.git

Change into the new repo directory

cd hlvox

Sync Python dependencies with uv

uv sync

Run commands via uv run from this repo root

uv run --project hlvox python --version

Quick Start

If you want to jump right into generating a sentence, you can point voice.py at a folder of voice audio files!

python hlvox/voice.py --voice-dir ~/my_folder_of_voice_files "the sentence I want to generate"

Your sentence will be exported in the same directory that you ran the file from.

Installing package locally for development

From the repo root:

uv run --project hlvox pip install --editable hlvox

Running the tests

Run tests from the repo root:

uv run --with pytest --with pytest-cov --with coverage --project hlvox --directory hlvox pytest --cov=hlvox ./tests

Documentation Generation

I used Sphinx to create autodoc documentation from docstrings in the modules.

Change into doc directory

cd doc

(If you've modified the source code, grab the new apidocs

sphinx-apidoc -f -o ./source ../hlvox

Generate documentation

make html

Authors

  • Blair Hagen - Initial work - bhagen

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

  • Thanks to Valve for making such an amazing voice

Metadata

Release files for hlvox 0.22.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hlvox 0.22.0
File Size Uploaded Provenance Actions
hlvox-0.22.0.tar.gz 28.4 kB Without provenance Details for hlvox-0.22.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hlvox 0.22.0
File Interpreter ABI Platform Actions
hlvox-0.22.0-py3-none-any.whl Python 3 none any Details for hlvox-0.22.0-py3-none-any.whl

Total release size: 49.0 kB

Release files / hlvox-0.22.0.tar.gz

Download URL hlvox-0.22.0.tar.gz
Size 28.4 kB
Tags Source
SHA-256 checksum
How to use checksums
c8ad788e38aaad13fa772c19ed5f225d4323206ed8730301440a94d94a69e4a2
BLAKE2b-256 checksum
How to use checksums
32bfdfa925bada449e2dc4a59f9bb6e0d2dcfdec3100147b96916f0d219da406
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.15

Release files / hlvox-0.22.0-py3-none-any.whl

Download URL hlvox-0.22.0-py3-none-any.whl
Size 20.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4c7d8079c43b4abed2eab68d5e6b54c7b242c57cc25feff56204c3f1d0870a82
BLAKE2b-256 checksum
How to use checksums
f4f487bd1f73fb73283efaba80193acec7fb932d77273d5d8229144762ba39c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.15

Security for hlvox 0.22.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.22.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page