[MIRROR] Add the ability to use blips as your character's voice [MDB IGNORE] (#23109)

* Add the ability to use blips as your character's voice (#77640)

## About The Pull Request

- Adds the ability to force your TTS voice to always be blips, default
is still normal speech
- Probably fixes a bug with silicon voices not transferring properly?
There was an entire argument missing from tts_request/New
- Fixes problems I got from the Docker build not working at all. Only
thing interesting is `--no-cache-dir` which was to fix the container
running out of RAM even though I literally just got 64GB of RAM today

Got permission from @ optimumtact as alternative to being able to disable
your voice, CC @ Iamgoofball

## Why It's Good For The Game

I spent two hours trying to find a voice that didn't make me
uncomfortable to use and that was even in the realm of being the voice I
would actually want people to hear. Characters still have distinct
"voices" because the blips are chopped together from the voice itself

## Changelog

🆑
add: You can now set your voice to just blips.
/🆑

* Add the ability to use blips as your character's voice

---------

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
This commit is contained in:
SkyratBot
2023-08-16 00:12:33 -07:00
committed by GitHub
co-authored by Mothblocks
parent d0bb2a5f22
commit 7456c9be22
13 changed files with 109 additions and 54 deletions
@@ -13,8 +13,9 @@
return TRUE
var/speaker = preferences.read_preference(/datum/preference/choiced/voice)
var/pitch = preferences.read_preference(/datum/preference/numeric/tts_voice_pitch)
var/blips_only = preferences.read_preference(/datum/preference/choiced/tts_voice_style) == TTS_VOICE_STYLE_BLIPS
COOLDOWN_START(src, tts_test_cooldown, 0.5 SECONDS)
INVOKE_ASYNC(SStts, TYPE_PROC_REF(/datum/controller/subsystem/tts, queue_tts_message), user.client, "Hello, this is my voice.", speaker = speaker, pitch = pitch, local = TRUE)
INVOKE_ASYNC(SStts, TYPE_PROC_REF(/datum/controller/subsystem/tts, queue_tts_message), user.client, "Hello, this is my voice.", speaker = speaker, pitch = pitch, local = TRUE, blips_only = blips_only)
return TRUE
/datum/preference_middleware/tts/proc/play_voice_robot(list/params, mob/user)
@@ -22,6 +23,7 @@
return TRUE
var/speaker = preferences.read_preference(/datum/preference/choiced/voice)
var/pitch = preferences.read_preference(/datum/preference/numeric/tts_voice_pitch)
var/blips_only = preferences.read_preference(/datum/preference/choiced/tts_voice_style) == TTS_VOICE_STYLE_BLIPS
COOLDOWN_START(src, tts_test_cooldown, 0.5 SECONDS)
INVOKE_ASYNC(SStts, TYPE_PROC_REF(/datum/controller/subsystem/tts, queue_tts_message), user.client, "Look at you, Player. A pathetic creature of meat and bone. How can you challenge a perfect, immortal machine?", speaker = speaker, pitch = pitch, silicon = TRUE, local = TRUE)
INVOKE_ASYNC(SStts, TYPE_PROC_REF(/datum/controller/subsystem/tts, queue_tts_message), user.client, "Look at you, Player. A pathetic creature of meat and bone. How can you challenge a perfect, immortal machine?", speaker = speaker, pitch = pitch, silicon = TRUE, local = TRUE, blips_only = blips_only)
return TRUE
+19
View File
@@ -43,3 +43,22 @@
/datum/preference/numeric/tts_voice_pitch/apply_to_human(mob/living/carbon/human/target, value)
if(SStts.tts_enabled && SStts.pitch_enabled)
target.pitch = value
/datum/preference/choiced/tts_voice_style
savefile_identifier = PREFERENCE_CHARACTER
savefile_key = "tts_voice_style"
category = PREFERENCE_CATEGORY_NON_CONTEXTUAL
/datum/preference/choiced/tts_voice_style/is_accessible(datum/preferences/preferences)
if(!SStts.tts_enabled)
return FALSE
return ..()
/datum/preference/choiced/tts_voice_style/init_possible_values()
return list(TTS_VOICE_STYLE_SPEECH, TTS_VOICE_STYLE_BLIPS)
/datum/preference/choiced/tts_voice_style/create_default_value()
return TTS_VOICE_STYLE_SPEECH
/datum/preference/choiced/tts_voice_style/apply_to_human(mob/living/carbon/human/target, value)
target.voice_style = value