You are viewing a potentially older version of this package. View all versions.
LordAshes-TextToSpeechPlugin-1.0.0 icon

TextToSpeechPlugin

Adds keyboard initiated, chaarcter specific, situation specific, quotations that are displayed and said via Text-To-Speech

Date uploaded 5 years ago
Version 1.0.0
Download link LordAshes-TextToSpeechPlugin-1.0.0.zip
Downloads 290
Dependency string LordAshes-TextToSpeechPlugin-1.0.0

This mod requires the following mods to function

bbepisTaleSpire-BepInExPack-5.4.10 icon
bbepisTaleSpire-BepInExPack

Unified BepInEx all-in-one modding pack - plugin framework, detour library

Preferred version: 5.4.10
brcoding-SetInjectionFlagPlugin-2.3.0 icon
brcoding-SetInjectionFlagPlugin

Allows players to flag mods are installed

Preferred version: 2.3.0
LordAshes-FileAccessPlugin-1.3.1 icon
LordAshes-FileAccessPlugin

Provides standardized methods for accessing both local file and url resources. Automatically handles searching local folders for assets.

Preferred version: 1.3.1
LordAshes-ChatService-1.2.0 icon
LordAshes-ChatService

Dependency plugin to add services to the chat.

Preferred version: 1.2.0

README

TaleSpire-TextToSpeechPlugin

Provides keyboard initiated situational character specific quotues via displayed and TTS.

Installation

The plugin ZIP file contains a folder called "TaleSpire_CustomData". This folder needs to be, manually, moved to the Talespire directory. This folder does not exists as part of the base TaleSpire game. It is used to LordAshes plugins to keep custom configurations and support files separate from the base game files. However, if you have other Lord Ashes plugins installed then this folder may already exits. In such a case copy the contents into that folder. The end result should be something like:

\Steam\steamapps\common\TaleSpire\TaleSpire_CustomData\GetSpeechInstalledVoices.exe \Steam\steamapps\common\TaleSpire\TaleSpire_CustomData\Newtonsoft.Json.dll \Steam\steamapps\common\TaleSpire\TaleSpire_CustomData\TextToSpeech.json \Steam\steamapps\common\TaleSpire\TaleSpire_CustomData\TTSCommandLine.exe

Due to issues integrating the Text To Speech functionality directly into the plugin, the plugin executes an external command (TTSCommandLine) to perform the TTS functionality. The TTSCommandLine command takes two parameters, the character name and text to be spoken. If the text contains spaces (which it likely will) it needs to be surrounded by quotes. For example:

TTSCommandLine Jon "Hello everyone, my name is Jon."

Feel free to use the command line application in other projects.

Initial Setup

Edit the TextToSpeech.json found in the TaleSpire_CustomData folder. The first section of this file has a triggers section which relates situations to a numeric value. The numeric value indicate which keyboard key triggers that particular situation. These values are integer values of the corresponding Unity.KeyCode. The user can define as many situations with corresponding triggers as desired. Each "Situation" should have a corresponding list of quotes in each of the character definitions. When the triggering key is pressed, the system will look up the name of the currently selected mini and then choose a random quote from the quote list for that particular situation.

The next section of the file contains the definitions for each supported character, selecting a TTS voice, a TTS speak rate and listing one or more quotes for each situation. This section of the file should be set up with a character for each mini that is going to make use of this feature (typically for each player mini) and the list of quotes for each situation appropriate for that particular character.

The GetSpeechInstalledVoices application can be run to list all of the installed TTS voices. Use the name that appears between square brackets.

Usage

When in TaleSpire, select the desired mini and then press the trigger key for one of the situations (e.g. the default configruation minds the "Ready" situation to the 5 key and the "Attack" situation to the 6 key). The characters will display an appropriate quote in its speech bubble and make a request, using the Internet Server Plugin, to all clients to play the corresponding Text-To-Speech message.