Skip to content

Adding Dialogue Beep SFX

Dia:
    "Dialogue voice beep often used as
    substitute for voice acting in video games."
:
    "Especially in the older titles
    and smaller budget productions."
:
    "Although not really used in modern titles anymore,
    there's many indie games that still use this today."

TL;DR

Play the dialogue beep audio with the DialogueLabel's character_drawn signal.

  1. Add the dialogue voice beep audio file to your project. In this article, we'll use one of the sound effect from Text/Dialogue Bleeps Pack by dmochas .


  2. Add AudioStreamPlayer node, attach the beep audio file to it, and reference it as beep_player variable.

    @export var beep_player : AudioStreamPlayer
    
    • AudioStreamPlayer node in the scene tree

    • AudioStreamPlayer referenced to beep_player variable


  3. Connect the signal character_drawn from DialogueLabel to method _on_dialogue_label_character_drawn().

    func _on_dialogue_label_character_drawn():
        pass # Replace with function body.
    
    • character_drawn signal being highlighted in the Node dock


  4. On the signal method, play the audio from the beep_player using play(). Only if its not already playing.

    func _on_dialogue_label_character_drawn():
        if not beep_player.playing:
            beep_player.play()
    


Code summary

MyScene
  ├─ Stage
  ├─ PanelContainer
  │     └─ VBoxContainer
  │         ├─ Label
  │         └─ DialogueLabel
  └─ AudioStreamPlayer
extends Control

var dlg : Dialogue # Load/create Dialogue here

@export var stage : Stage
@export var beep_player : AudioStreamPlayer

func _input(event):
    if event.is_action_pressed("ui_accept"):
        stage.progress()

func _ready():
    stage.start(dlg)

func _on_dialogue_label_character_drawn():
    if not beep_player.playing:
        beep_player.play()


Download

Download scene & script

Got any questions? feel free to ask them in the GitHub Discussions!