Documentation
Quick InfoVersion: Alpha R3
Made for RPG Maker MZ 1.10.0
REQUIRED: All [CGMZ] Plugins require [CGMZ] Core placed above them in the Plugin Manager.
OptionsThis plugin can also check if the Config Manager has an option for TTS. To set this up, you will need to add an option with the symbol "cgmz_tts" that is a simple on/off toggle.
Unsupported EnvironmentsThe text to speech API comes built in to most web browsers, and should be supported by all major desktop browsers. However, if you are targeting a mobile deploy, some mobile browsers may not support the plugin. These seem include Opera Android among others. You can view which browsers support this feature here
If it is not listed as supported on that website, this plugin will not work in that environment. This plugin does check if the feature is supported so will not crash, it just will not have any speech from your text.
Plugin CommandsThis plugin supports the following plugin commands:
Speak
Say some text as text to speech. Includes options for volume, pitch, and rate of speech.
Developer NotesIf a user has TTS enabled through this plugin, it will attempt to read from list windows as the user selects a new entry if the following function is defined in the window object:
CGMZ_getTextToSpeechForIndex(index)
This function should return the text that should be read for the index, which will be the index (number) the player has selected. If your text may have text codes, you can optionally use the function call
CGMZ_getTextWithoutTextCodes(text)
to remove any text codes and get the base text as a player would read it.
Example of reading item names in an item list window:
Window_ItemList.prototype.CGMZ_getTextToSpeechForIndex = function(index) {
const item = this.itemAt(index);
if(!item || !item.hasOwnProperty('name')) return null;
return this.CGMZ_getTextWithoutTextCodes(item.name);
};
Saved GamesThis plugin is fully compatible with saved games. This means you can:
✓ Add this plugin to a saved game and it will work as expected.
✓ Change any plugin params and changes will be reflected in saved games.
✓ Remove the plugin with no issue to save data.
Filename
The filename for this plugin MUST remain CGMZ_TextToSpeech.js. This is what it comes as when downloaded. The filename is used to load parameters and execute plugin commands. If you change it, things will begin behaving incorrectly and your game will probably crash. Please do not rename the js file.
Known Issues
This plugin currently has no known issues that need to be fixed. If you believe you have encountered a bug, please report it to Casper Gaming.
Compatibility
This plugin currently has no known compatibility issues with other RMMZ plugins. If you believe you have encountered a conflict, please report it to Casper Gaming.
Version HistoryVersion AlphaR2
- Added option to ignore switch and option in plugin command
- Added item, skill, actor, enemy, shop list name reading
- Added framework for lists to read TTS