You are viewing a potentially older version of this package. View all versions.
PixelIndieDev-TTSCompany-1.1.0 icon

TTSCompany

This library makes it easy to add TTS speech to your Lethal Company mods

Date uploaded 3 weeks ago
Version 1.1.0
Download link PixelIndieDev-TTSCompany-1.1.0.zip
Downloads 62
Dependency string PixelIndieDev-TTSCompany-1.1.0

This mod requires the following mods to function

BepInEx-BepInExPack-5.4.2305 icon
BepInEx-BepInExPack

BepInEx pack for Mono Unity games. Preconfigured and ready to use.

Preferred version: 5.4.2305
xilophor-LethalNetworkAPI-3.4.2 icon
xilophor-LethalNetworkAPI

A library/API to allow developers to easily add networking to their mods.

Preferred version: 3.4.2
AinaVT-LethalConfig-1.4.6 icon
AinaVT-LethalConfig

Provides an in-game config menu for players to edit their configs, and an API for other mods to use and customize their entries.

Preferred version: 1.4.6
qwbarch-Concentus-2.3.0 icon
qwbarch-Concentus

Portable C# implementation of the Opus audio compression codec

Preferred version: 2.3.0

README

TTS-Company

A text-to-speech library mod for Lethal Company that integrates the lightweight, local Piper TTS engine. This library makes it easy for devs to add TTS speech to their mods, with generation happening fully offline on the player's machine.

All players in the lobby must have TTS-Company installed. Players missing the mod will not hear any generated text-to-speech audio.

Marked as AI-Generated cause of the AI TTS it produces.

For devs

What it does

  • Provides a API for other mods to generate local, low-latency text-to-speech audio.
  • Spawns, manages, and prepares the underlying background Piper process so it's ready to handle audio requests.
  • Uses the Piper TTS engine to generate text-to-speech directly on your machine without relying on external web APIs.
  • Caches generated voice lines to significantly cut down on processing overhead and maximize in-game performance for recurring phrases.
  • Gives developers the ability to pre-generate specific text-to-speech audio lines ahead of time to guarantee instant and seamless playback when needed.

What it doesn't do

  • Does nothing on its own: It solely initializes the background process and exposes the code API. It will not add chat commands, voice lines, or gameplay features unless paired with a mod that uses this library.
  • Does not send any data to external servers: all audio synthesis is completely offline.

License & Credits

This mod is licensed under the GPL-3.0 License due to its dependencies and bundled components.

Third-Party Software & Libraries

This mod makes use of the following third-party software:

Piper TTS

  • License: GPL-3.0 License
  • Usage: Included as modified source code, compiled into a frozen server executable via PyInstaller.
  • Source Code: The source code used to build the executable is included as a .7z archive inside /PiperTTS.

Concentus

  • License: Microsoft Public License
  • Usage: Used as a pure C# library for local Opus audio encoding and decoding.

Concentus.OggFile

  • License: MIT License
  • Usage: Used alongside Concentus to parse, package, and structure the processed audio data into the .ogg file container format.

CHANGELOG

1.2.1

  • TTSCompanyUtils.IsNetworkObjectCurrentlySpeaking() now has an useGlobalAudioSource option
  • TTSCompanyUtils.IsNetworkObjectAwaitingTTSGeneration() now has an useGlobalAudioSource option
  • TTSCompanyUtils.GetTTSNetworkObjectState() now has an useGlobalAudioSource option
  • Replaced Concentus with a Concentus dependency
  • Fixed '...' being read as seperate sentences

v1.2.0

  • Added GetAllFoundTTSVoiceNames() to the Utils
  • Added GetAllLoadedTTSVoiceNames() to the Utils
  • Made performance improvements
  • Changed some of the debug input names to provide more information
  • Fixed a missing capital letter in GetRandomLoadedTTSVoiceName()
  • Fixed an issue that caused a memory leak

v1.1.0

  • TTS speech now has the ability to be heard by entities
  • Added StopSpeakingTTSAtNetworkObject() to the API
  • Added a third test keybind that says three sentences using the default settings

v1.0.2

  • Added the changelog

v1.0.1

  • Added the documentation descriptions in the mod itself

v1.0.0

  • Initial release