this fork uses an older version and has its own little awful hacks to work better with /tg/ it will only generate female voice and weird python3.6 dependency removed
as such just install python3.9
on your 20.04
ubuntu VM install the requirements with python3.9 (sudo python3.9 -m pip -r requirements.txt
) and pray that pybuildtools
installs correctly, and just do sudo python3.9 setup.py
or something
if the relevant archive for the files is down, just hack it a little bit further to ignore downloading since i included them in the cache
anyway usage is simple:
add your words to the wordlist
if desired also improve the lexicon.txt
run sudo python3.9 create.py
and find your results in the dist folder
TTS-based announcer inspired by Half Life's announcement system.
This project was originally written in 2013 when I was still learning python, so it's a bit rough around the edges. I am slowly trying to improve the code.
This system has only been tested on Ubuntu. Therefore, this should be installed and run on an Ubuntu system. A VM is recommended, but not necessary.
- Run
sudo apt install python3.6 && pip install -r requirements.txt
to install and configure Python 3.6 for Ubuntu. - Run
sudo python3.6 setup.py
to install and configure SoX, Festival, and oggenc.
- NOTE: During the install process, setup.py will download and install packages, and install new Festival voices.
Simply edit voxwords.txt and announcements.txt to taste, and run generate.sh.
Everything you need will end up in dist/
. Note that old HL VOX sounds like beep
, bloop
, etc are not included and are expected to be in sound/vox/
.
If words come out incorrectly pronounced, add the word to lexicon.txt following the guide at the top of the file. This will generate the required LISP script for you.
- Open
config.yml
- Change
codebase
totg
so it'll generate the correct code for your server.
You may also wish to duplicate announcements.txt
and voxwords.txt
and modify them for TG's needs. If you choose to do this, make sure to point to the new files in config.yml
.
You can select which voice to use for each sex in config.yml
in the voices:
list.
Sex | Meaning |
---|---|
default | Non-AI automated announcements, like vox_login . |
mas | Masculine voice |
Each voice requires manual tuning and fuckery in order to work with the standardized echoes and reverbs added later during generation, so not every voice in festival is available here.
ID | Sex | Festival ID | Notes |
---|---|---|---|
us-clb | F | nitech_us_clb_arctic_hts | Used by default on /vg/. US female with no accent. |
us-rms | M | nitech_us_rms_arctic_hts | Used by default on /vg/. US male with no accent, sounds kinda like DECTalk without post-processing. |
us-slt | F | nitech_us_slt_arctic_hts | US female with midwestern accent and flatter voice. Buggy at times: Can drop to a british accent. |
Simply edit voxwords.txt or announcements.txt and add the desired phrase:
apple
zebra
wordfile = This is a sample phrase that will be saved to wordfile.ogg
To test a phrase as though it were from in-game, run (replace $SEX
with fem
or mas
):
play dist/sounds/vox_$SEX/{sarah,connor,report,to,medbay,for,health,inspection}.ogg
If it's a single letter, add it to the voxwords.txt as a = A.