Enabling Hypii on Linux version of Hypnospace Outlaw
If you've ever played Hypnospace Outlaw and ran it on Linux version, you probably wondered why Hypii is not working. Basically, devs couldn't find a way to enable TTS on Linux since it's so complex in general. This guide will try to at least give you some way to get Hypii functional again.
Credits
I did initially write this article on Discord server and here (but couldn't publish it on time), but I didn't manage to solve the issue with odd voice behavior, this was solved by Alyxx the Rat who made this guide on Steam.
Speech dispatcher
First of all, you need to install a speech dispatcher that provides access to text to speech engines.
You can use following commands as root based on your Linux distribution (check what's your distro based on if you can't find yours):
Debian:
$ sudo apt install speech-dispatcher
Fedora (Red Hat:
$ sudo dnf install speech-dispatcher
Arch Linux:
$ sudo pacman -Syu speech-dispatcher
At this point, it should be running without any issues.
To check if speech dispatcher is running, run it and see if it says that it's running:
$ speech-dispatcher
Speech engine
After installing the dispatcher, we also need an engine. In this case, we'll use eSpeak-NG.
$ sudo apt install speech-dispatcher-espeak-ng
At this point, we should be able to use TTS to play speech voice. Try it out with 'spd-say':
$ spd-say "Hello world"
Enabling speech dispatcher in Steam
Even with speech dispatcher enabled, the game won't perform any speech since it's not enabled. You'll have to enable speech dispatcher with a parameter before you run it.
- Open properties of "Hypnospace Outlaw" in Steam.
- In "General" -> "Launch options", add "--enable-speech-dispatcher" (no quotes) and close.
If you don't use Steam, launch the executable (or append to existing command) with "--enable-speech-dispatcher" parameter.
At this moment, if you have speech-dispatcher, you should be able to play sounds in game BIOS with speech buttons and in name editor on login screen at least.
However, you won't be able to play any speech in game yet since developers disabled this feature on Linux. Follow the part to resolve that.
Force enabling Hypii speech
Options for robot voice and captions are disabled and hardcoded if there are no voices.
To enable the voices, you'll have to do some steps for enabling toggle for robot and captions:
- Navigate to the game folder.
- Make a backup copy of
package.nw
first and then extractdata.js
frompackage.nw
and open it in your preferred text editor. - Search for
HypiiRobot
string indata.js
. - Check if the first search result is the following:
[3,154,null,623024275741261,false,[[1,[2,"HypiiRobot"]],[7,[0,1]]]],[80,187,null,854277302118531,false,[[10,6],[3,1]]],[81,187,null,176678765389064,false,[[10,6],[3,1]]]
- If this result matches yours, replace
HypiiRobot
withHypiiRobotHack
- On that same search result, look for string
[3,1]
that should be located after string854277302118531
and replace1
with0
within that string. - On that same search result, look for string
[3,1]
that should be located after string176678765389064
and replace1
with0
within that string. - Check if the first search result looks like this now:
[3,154,null,623024275741261,false,[[1,[2,"HypiiRobotHack"]],[7,[0,1]]]],[80,187,null,854277302118531,false,[[10,6],[3,0]]],[81,187,null,176678765389064,false,[[10,6],[3,0]]]
- Find the second search result for "HypiiRobot".
- Second result should be the following:
[3,154,null,694855591259663,false,[[1,[2,"HypiiRobot"]],[7,[0,1]]]]
- If this result matches yours, replace
HypiiRobot
withHypiiRobotHack
. - Check if the second search result looks like this now:
[3,154,null,694855591259663,false,[[1,[2,"HypiiRobotHack"]],[7,[0,1]]]]
- Save changes to data.js and add it back to package.nw by overwriting existing data.js in archive.
You should be able to launch the game by now.
Note that HypiiRobotHack
is not a real command, it's just a dummy command to prevent HypiiRobot
command from being invoked.
Hopefully, you should be able to disable robot voice in game settings and also be able to have Hypii saying stuff. Note that the first voice speech will be delayed due to initialization.
Fixing odd voice behavior
Even with voice being enabled and working, the output sounds wrong.
- Make a new file
hypnos.conf
in/usr/share/speech-dispatcher/conf/clients
- Add the following text in it:
BeginClient "*:HypnOS:*"
DefaultLanguage "en"
EndClient
- Save and close the file.
- Open existing file
speechd.conf
in/usr/share/speech-dispatcher/conf
- Find
DefaultLanguage
string, remove#
comment and update it to this:
DefaultLanguage "en"
- Find
DefaultModule
string, remove#
comment and update it to this:
DefaultModule "espeak"
- Restart and check if it's working now.
End
If everything is configured correctly, you can now use Hypii in Hypnospace Outlaw!