Dialogue Audio Profile
Audio profile for dialogue typing sounds
A dialogue audio profile defines how typing sounds are played during dialogue. Set this as the sound of a speaker entry. The DialogueAudioProfileListener will automatically detect it and apply the profile during dialogue.
Поля
| Поле | Тип | По умолчанию | Описание |
|---|---|---|---|
defaultSound | Var<Sound> | EMPTY | Default sound for standard characters |
vowelSound | Var<Sound>? | — | Sound for vowels (a, e, i, o, u, y). If null, uses defaultSound. |
punctuationSound | Var<Sound>? | — | Sound for punctuation marks (. ! ? , ; :). If null, uses defaultSound. |
spaceSound | Var<Sound>? | — | Sound for spaces (usually NONE or very quiet). If null, no sound for spaces. |
pitchJitter | Float | 0.0 | Pitch variance for natural feel (0.0 = no variance, 0.1 = subtle, 0.3 = very noticeable) |
punctuationVolume | Float | 1.0 | Volume multiplier for punctuation sounds |
speedMultiplier | Float | 1.0 | Speed multiplier for typing sounds (higher = faster playback) |
layer | AudioLayer | VOICE | Audio layer to use for dialogue typing soundsЗначения:MASTERMUSICAMBIENTSFXVOICE |
fadeIn | Duration | ofMillis(100) | Minecraft cannot change the volume of a sound that is already playing, so this field does not produce a progressive fade (not used yet). |
fadeOut | Duration | ofMillis(200) | Minecraft cannot change the volume of a sound that is already playing, so this field does not produce a progressive fade (not used yet). |
vowelCharacters | Set<Char> | — | — |
punctuationCharacters | Set<Char> | — | — |
How to use it
The profile gives each typed character a sound: spaceSound for whitespace, punctuationSound for the characters in punctuationCharacters, vowelSound for vowelCharacters, and defaultSound for everything else. A character class left empty falls back to nothing (the vowel and punctuation fields do not fall back to defaultSound in the code, despite their help text).
The extension spreads the text over the duration of the dialogue and plays one sound per character. speedMultiplier shortens or lengthens the delay between sounds, pitchJitter adds a random pitch change of up to that value, and punctuationVolume scales the punctuation sounds. The sounds go through the VOICE layer by default, so they follow each player's voice volume.
fadeIn and fadeOut are not used: Minecraft cannot change the volume of a sound that is already playing.
The listener looks for this profile through the sound of the dialogue speaker, using the profile's ID. Test it with a short dialogue before building a full cast.