RenderTts

From Wiki G1R-MP G1 Remake Multiplayer
Revision as of 23:50, 10 October 2026 by QCherry (talk | contribs) (Release 0.1.7 / BUILD199 / Protocol 39: current API availability, setup and improvements)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

renderTts

AVAILABLE SINCE UPDATE 0.1.7
This function is available since G1R:MP 0.1.7.

Queues asynchronous speech rendering with persistent cache reuse; generateTts and renderTts are aliases.

Syntax

number|false renderTts(string text, table options)

Parameters

Name Type Required Description
text string yes Nonempty UTF-8 text: at most 12000 bytes and 4000 Unicode characters.
options table yes engine + language, or an existing voice/preset (not both). Optional seed, reference/hash, parameters and saveAs. See Server TTS and TTS voices.

Returns

A resource-owned job ID, or false, reason. Acceptance is not completion: wait for onTtsReady or onTtsError.

Notes

  • Server-side only. Available since 0.1.7.
  • See Server TTS, TTS configuration and TTS voices for installation, options, ownership, cache and examples.
  • Invalid requests return false, reason. Profiles, jobs and playback handles belong to the calling resource; do not use handles from another resource or a previous resource lifetime.
  • The exact text/options/model revision/reference hash form the cache request. Identical requests are reused. saveAs creates a stable resource-private name; a different recording cannot silently overwrite it.
  • Overrides replace top-level fields; replacing parameters uses defaults for omitted parameter keys. Release completed job handles with releaseTtsJob; stored recordings remain.