Censuring audio swear words with beeps

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
EntertainmentForge
Posts: 23
Joined: Sun Nov 29, 2020 8:50 pm

Censuring audio swear words with beeps

Post by EntertainmentForge »

How would you implement censorship beeps in voice acting using Dialogue System? I am making a game that will have swear words but I'd like to let players turn on censorship if they don't want them.

I am thinking about having two audio clips for each file with a swear word. In that case, how could I choose to play a different clip if my censorship option is enabled?

An even better option would be playing a beep sound over the audio clips exactly at the specified time (during curse word). Is there maybe any feature like that?

Thank you!
User avatar
Tony Li
Posts: 21962
Joined: Thu Jul 18, 2013 1:27 pm

Re: Censuring audio swear words with beeps

Post by Tony Li »

Hi,

I recommend two separate audio files -- one explicit and one edited to beep out swear words.

It's safer. If you tried the other approach and the timing was off for some reason, it might not correctly beep at the right time.

And it's also easier because you can use the Dialogue System's built-in localization system. Define an additional language named "Explicit" and use it for text and for entrytaglocal in sequences. Example:

(Warning -- explicit language below)
  • Dialogue Text: "This s**t is dope as f**k!"
  • Explicit: "This shit is dope as fuck!"
  • Sequence: AudioWait(entrytaglocal)
This assumes that you've defined a custom Localization field in your dialogue entry template named "Explicit" and that you've named your audio clips something like "Player_7_42" and "Player_7_42_Explicit". (See Entrytags)

To play explicit text and audio, change the language to "Explicit": DialogueManager.SetLanguage("Explicit").
EntertainmentForge
Posts: 23
Joined: Sun Nov 29, 2020 8:50 pm

Re: Censuring audio swear words with beeps

Post by EntertainmentForge »

I was also thinking about using it as another language. But won't I have to have every audio file twice in that case? Since it will load only files that have "Explicit". Is there a way to only load "Explicit" if there is "Explicit" version? And if not to load normal audio file?

To clarify. If line is just Player_7_42, play that. But if it also has Player_7_42_Explicit, then load that line (if censorship is turned on)
User avatar
Tony Li
Posts: 21962
Joined: Thu Jul 18, 2013 1:27 pm

Re: Censuring audio swear words with beeps

Post by Tony Li »

That's a good point. You could duplicate SequencerCommandAudioWait.cs (e.g., as something like SequencerCommandPlayVoice.cs) and customize it to look for the "_Explicit" version of the specified file if the language is set to Explicit. If it doesn't find it, or if the language isn't set to Explicit, play the regular file.
Post Reply