Guide
How to add UI sounds to a Godot 4 project
4 December 2026
Put one AudioStreamPlayer node in the scene for each kind of sound, give it a WAV file, send it to its own audio bus, and connect each button's pressed signal to the player's play method. For hover, connect mouse_entered, and focus_entered for players on a keyboard or gamepad. The steps below are for Godot 4.
1. Bring the files in
Copy the WAV files into a folder inside the project, for example res://audio/ui/. Godot imports them when the editor window next has focus. The Godot manual suggests WAV for short and repetitive sound effects, which is what a click is.
A UI sound does not need to be large. The manual says there is no audible benefit to 24-bit audio in a game, and that many sound effects can be mono. If the source files are 24-bit stereo, select them in the FileSystem dock, open the Import dock, switch on Force Mono, and reimport. The files on disk are not changed.
2. Make a bus for the interface
Open the Audio panel at the bottom of the editor and add a bus. Name it UI. A separate bus gives you one fader for every interface sound, which is what a volume slider in an options menu needs, and it keeps clicks out of any reverb you put on the game's own sounds.
3. Add the players
Add an AudioStreamPlayer node and name it Click. This is the non-positional player: it sounds the same wherever the camera is. Drag a click WAV onto its Stream property and set its Bus to UI. Add a second one named Hover with a softer sound.
If a player is told to play while it is still playing, it starts again from the beginning. For fast repeated clicks, raise Max Polyphony on the player so the sounds overlap.
4. Connect the buttons
For one or two buttons, select the button, open the Node dock, and connect its pressed signal to the Click player, choosing play as the method to call. For a whole menu, put every button in a group named ui_buttons and connect them in a short script on the parent of the two players:
extends Node
@onready var click: AudioStreamPlayer = $Click
@onready var hover: AudioStreamPlayer = $Hover
func _ready() -> void:
for button in get_tree().get_nodes_in_group("ui_buttons"):
button.pressed.connect(click.play)
button.mouse_entered.connect(hover.play)
button.focus_entered.connect(hover.play)A mouse fires mouse_entered. A keyboard or a gamepad moves focus, which fires focus_entered. Connect both, or players without a mouse hear nothing as they move through the menu.
5. Keep it playing across scenes
A click on a Start button is often cut short, because the button's scene is freed while the sound is still playing. Save the script and its two players as a small scene and add it as an autoload in Project Settings. It then stays loaded for the whole run.
An autoload's _ready runs once, before the first scene is added, so the loop above finds no buttons there. Replace it with the scene tree's node_added signal, which fires for every node as it enters the tree, in every scene loaded from then on:
func _ready() -> void:
get_tree().node_added.connect(_on_node_added)
func _on_node_added(node: Node) -> void:
if node is BaseButton and node.is_in_group("ui_buttons"):
node.pressed.connect(click.play)
node.mouse_entered.connect(hover.play)
node.focus_entered.connect(hover.play)A button only needs to be in the ui_buttons group. Menus loaded later are connected as they appear.
Choosing the sounds
- Hover should be the quietest and shortest sound in the game. It plays the most.
- Confirm and cancel should differ in pitch or direction, so they can be told apart without looking.
- An error sound should be lower and duller, never louder.
- Set the
UIbus a few decibels under the game's own effects and judge it with music playing.
Cold Relay Interface: 130 UI and Game Sounds has one cold, clean character across the whole set, so a hover, a confirm and an error sound like they belong to the same game. The licence covers your own apps, games and videos, commercial ones included.
Questions
Which node plays a UI sound in Godot 4?
AudioStreamPlayer. It is the standard, non-positional player, so the sound has the same volume wherever the camera is. AudioStreamPlayer2D and AudioStreamPlayer3D are for sounds that come from a place in the world.
Should UI sounds be WAV, Ogg Vorbis or MP3?
WAV. The Godot manual suggests WAV for short and repetitive sound effects, and Ogg Vorbis for music, speech and long sound effects.
Why does my click cut off when the scene changes?
The player node was freed with the old scene. Keep the players in a small scene of their own and add that scene as an autoload in Project Settings, so it stays loaded across scene changes.