Files
Bubberstation/code/__HELPERS/tts.dm
SkyratBot 6c9be73f51 [MIRROR] Adds TTS to the game. Players can select their own voices in preferences. [MDB IGNORE] (#21232)
* Adds TTS to the game. Players can select their own voices in preferences.

* [SEMI-MODULAR] [MIRROR FIX] Fixes the TTS PR. (#21267)

Fixes the TTS PR.

---------

Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
Co-authored-by: Iamgoofball <iamgoofball@gmail.com>
2023-05-19 01:47:19 +01:00

5 lines
199 B
Plaintext

/proc/tts_speech_filter(text)
// Only allow alphanumeric characters and whitespace
var/static/regex/bad_chars_regex = regex("\[^a-zA-Z0-9 ,?.!'&-]", "g")
return bad_chars_regex.Replace(text, " ")