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.1

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.1
File Size Uploaded Provenance Actions
hlvox-0.22.1.tar.gz 28.9 kB Without provenance Details for hlvox-0.22.1.tar.gz

Built distribution (wheel)

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

Total release size: 49.6 kB

Release files / hlvox-0.22.1.tar.gz

Download URL hlvox-0.22.1.tar.gz
Size 28.9 kB
Tags Source
SHA-256 checksum
How to use checksums
384275478d8a6221d4b48e8d455d9952c05e1a16cbc0643ba2aaaacfe7e0d200
BLAKE2b-256 checksum
How to use checksums
785d9452b6d13114ad91e77ddf29290c90ffee077fee9925c7d0d0714aa359f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

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

Download URL hlvox-0.22.1-py3-none-any.whl
Size 20.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c50366f7dc94a5f457ab4555fd4283b7fe016a990eef6c855308a22205a1ec89
BLAKE2b-256 checksum
How to use checksums
358bd28991379a965cd469e04b12ffdd7134bd575f47714aca3fecfe790a0186
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Security for hlvox 0.22.1

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.1 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