Files
Iamgoofball 33824ac7c1 TTS 3.0: Blips Rework, Radio TTS, Unknown Languages are Blips now (#95369)
## About The Pull Request

Re-did blips to be significantly nicer sounding and way better. Alien
speech you don't understand now comes through as Blips. If you have TTS
entirely disabled, you won't hear blips. Blips also now include more
customization options, and a dedicated Blips preview button by clicking
the leaf icon.

<img width="1749" height="354" alt="ApplicationFrameHost_5nKJEvaNV1"
src="https://github.com/user-attachments/assets/ef6c6b61-7c22-4a87-94c9-be50e89c65bb"
/>


https://github.com/user-attachments/assets/8cab7e55-6370-4e4e-99ba-ea2475569453

Radio TTS has been implemented. By default, you will hear all TTS over
the radio, but will not hear yourself over the radio. You can configure
this in Game Settings.


https://github.com/user-attachments/assets/94a44d84-17a9-4e6e-ac5c-3b800b11c159

<img width="743" height="193" alt="chrome_MOIcXaC2gh"
src="https://github.com/user-attachments/assets/907379b7-0689-486c-b29c-9be0a2259b05"
/>

The new TTS stack is located at
https://github.com/Iamgoofball/tgtts-qwen3 and is AGPLv3 licensed. The
new blips design was inspired by
https://github.com/joshxviii/animalese-typing.

The configuration to disable TTS on whispering has been removed, as it
is no longer needed and also interferes with radio TTS functioning
properly.

The Tram now utilizes TTS, and has had a general audio tune-up.


https://github.com/user-attachments/assets/f532d002-939c-43a1-95d0-0f0c43048997

TTS audio is now 3D and in space, see attached.


https://github.com/user-attachments/assets/b00df49a-9d1d-4b27-a8a0-d103099f5c7e

## Why It's Good For The Game

Quality of life improvements to the TTS system, long overdue. Also, TGMC
can migrate to this new method of doing radio audio so they aren't
sending double the TTS requests anymore.

## Changelog

🆑
add: Added support for Radio TTS. You will now hear players over the
radio via the TTS system.
add: Configure this in Game Options under the Sound tab.
sound: Re-did blips to be significantly nicer sounding and way better. 
sound: Alien speech you don't understand now comes through as Blips. If
you have TTS entirely disabled, you won't hear blips.
sound: The Tram and Computers now utilize the TTS system. Configs have
been added to set a consistent voice.
sound: TTS audio now utilizes 3D audio; you can now walk away from
people saying stupid shit and it gets quieter.
sound: Blips also now include more customization options, and a
dedicated Blips preview button by clicking the leaf icon.
del: The configuration to disable TTS on whispering has been removed, as
it is no longer needed and also interferes with radio TTS functioning
properly.
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Lucy <lucy@absolucy.moe>
Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
2026-06-15 18:54:24 -04:00

186 lines
6.7 KiB
Plaintext

/datum/preference/numeric/volume
abstract_type = /datum/preference/numeric/volume
minimum = 0
maximum = 100
/datum/preference/numeric/volume/create_default_value()
return maximum
/// Controls ambience volume
/datum/preference/numeric/volume/sound_ambience_volume
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
savefile_key = "sound_ambience_volume"
savefile_identifier = PREFERENCE_PLAYER
/datum/preference/numeric/volume/sound_ambience_volume/apply_to_client(client/client, value)
client.update_ambience_pref(value)
/datum/preference/toggle/sound_breathing
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
savefile_key = "sound_breathing"
savefile_identifier = PREFERENCE_PLAYER
/datum/preference/toggle/sound_breathing/apply_to_client_updated(client/client, value)
var/mob/living/carbon/carbon_mob = client.mob
if(istype(carbon_mob) && !value)
carbon_mob.breathing_loop.stop()
/// Controls hearing announcement sounds
/datum/preference/toggle/sound_announcements
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
savefile_key = "sound_announcements"
savefile_identifier = PREFERENCE_PLAYER
/// Controls hearing the combat mode sound
/datum/preference/toggle/sound_combatmode
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
savefile_key = "sound_combatmode"
savefile_identifier = PREFERENCE_PLAYER
/// Controls hearing instruments
/datum/preference/numeric/volume/sound_instruments
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
savefile_key = "sound_instruments"
savefile_identifier = PREFERENCE_PLAYER
/// Controls jukebox track volume
/datum/preference/numeric/volume/sound_jukebox
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
savefile_key = "sound_jukebox"
savefile_identifier = PREFERENCE_PLAYER
/datum/preference/numeric/volume/sound_jukebox/apply_to_client_updated(client/client, value)
var/mob/client_mob = client.mob
if(!isnull(client_mob))
SEND_SIGNAL(client_mob, COMSIG_MOB_JUKEBOX_PREFERENCE_APPLIED)
/datum/preference/choiced/sound_tts
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
savefile_key = "sound_tts"
savefile_identifier = PREFERENCE_PLAYER
/datum/preference/choiced/sound_tts/init_possible_values()
return list(TTS_SOUND_ENABLED, TTS_SOUND_BLIPS, TTS_SOUND_OFF)
/datum/preference/choiced/sound_tts/create_default_value()
return TTS_SOUND_ENABLED
/datum/preference/choiced/sound_tts_radio
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
savefile_key = "sound_tts_radio"
savefile_identifier = PREFERENCE_PLAYER
/datum/preference/choiced/sound_tts_radio/init_possible_values()
return list(TTS_SOUND_ALL_RADIO, TTS_SOUND_DEPARTMENTAL_RADIO, TTS_SOUND_NO_RADIO)
/datum/preference/choiced/sound_tts_radio/create_default_value()
return TTS_SOUND_ALL_RADIO
/datum/preference/toggle/sound_tts_hear_self_radio
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
savefile_key = "sound_tts_hear_self_radio"
savefile_identifier = PREFERENCE_PLAYER
default_value = FALSE // turn this on at your own peril
/datum/preference/numeric/volume/sound_tts_volume
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
savefile_key = "sound_tts_volume"
savefile_identifier = PREFERENCE_PLAYER
/datum/preference/numeric/volume/sound_tts_volume/apply_to_client_updated(client/client, value)
var/mob/client_mob = client.mob
if(!isnull(client_mob))
SEND_SIGNAL(client_mob, COMSIG_MOB_TTS_VOLUME_PREFERENCE_APPLIED)
/datum/preference/numeric/volume/sound_tts_radio_volume
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
savefile_key = "sound_tts_radio_volume"
savefile_identifier = PREFERENCE_PLAYER
/datum/preference/numeric/volume/sound_tts_radio_volume/apply_to_client_updated(client/client, value)
var/mob/client_mob = client.mob
if(!isnull(client_mob))
SEND_SIGNAL(client_mob, COMSIG_MOB_TTS_RADIO_VOLUME_PREFERENCE_APPLIED)
/datum/preference/numeric/volume/sound_tts_radio_volume/create_default_value()
return 75
/datum/preference/choiced/sound_achievement
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
savefile_key = "sound_achievement"
savefile_identifier = PREFERENCE_PLAYER
/datum/preference/choiced/sound_achievement/init_possible_values()
return list(CHEEVO_SOUND_PING, CHEEVO_SOUND_JINGLE, CHEEVO_SOUND_TADA, CHEEVO_SOUND_OFF)
/datum/preference/choiced/sound_achievement/create_default_value()
return CHEEVO_SOUND_PING
/datum/preference/choiced/sound_achievement/apply_to_client_updated(client/client, value)
var/sound/sound_to_send = LAZYACCESS(GLOB.achievement_sounds, value)
if(sound_to_send)
SEND_SOUND(client.mob, sound_to_send)
/// Controls hearing lobby music
/datum/preference/numeric/volume/sound_lobby_volume
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
savefile_key = "sound_lobby_volume"
savefile_identifier = PREFERENCE_PLAYER
/datum/preference/numeric/volume/sound_lobby_volume/apply_to_client_updated(client/client, value)
if (value && isnewplayer(client.mob))
client.playtitlemusic()
else
client.mob.stop_sound_channel(CHANNEL_LOBBYMUSIC)
/// Controls hearing admin music
/datum/preference/numeric/volume/sound_midi
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
savefile_key = "sound_midi"
savefile_identifier = PREFERENCE_PLAYER
/// Controls ship ambience volume
/datum/preference/numeric/volume/sound_ship_ambience_volume
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
savefile_key = "sound_ship_ambience_volume"
savefile_identifier = PREFERENCE_PLAYER
/datum/preference/numeric/volume/sound_ship_ambience_volume/apply_to_client_updated(client/client, value)
client.mob.refresh_looping_ambience()
/// Controls radio noise volume
/datum/preference/numeric/volume/sound_radio_noise
savefile_key = "sound_radio_noise"
savefile_identifier = PREFERENCE_PLAYER
/// Controls hearing AI VOX announcements
/datum/preference/numeric/volume/sound_ai_vox
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
savefile_key = "sound_ai_vox"
savefile_identifier = PREFERENCE_PLAYER
/// Choice of which ghost poll prompt to use
/datum/preference/choiced/sound_ghost_poll_prompt
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
savefile_key = "sound_ghost_poll_prompt"
savefile_identifier = PREFERENCE_PLAYER
/datum/preference/choiced/sound_ghost_poll_prompt/create_default_value()
return GHOST_POLL_PROMPT_1
/datum/preference/choiced/sound_ghost_poll_prompt/init_possible_values()
return list(GHOST_POLL_PROMPT_DISABLED, GHOST_POLL_PROMPT_1, GHOST_POLL_PROMPT_2)
/// Volume which ghost poll prompts are played at
/datum/preference/numeric/sound_ghost_poll_prompt_volume
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
savefile_key = "sound_ghost_poll_prompt_volume"
savefile_identifier = PREFERENCE_PLAYER
minimum = 0
maximum = 200
/// default value is max/2 because 100 1x modifier, while 200 is 2x
/datum/preference/numeric/sound_ghost_poll_prompt_volume/create_default_value()
return maximum/2