Forum rules - please read before posting.

Voice over texts

I want to add sound in conjunction with the action type Dialogue
For example, when text appears, I want a sound to appear, like typing on a keyboard

Comments

  • If the sound is unique to each speech line, you can use the Speech Manager to assign individual audio clips - see this tutorial for details.

    If instead you want to have a sound that plays as each character appears (due to the "speech scrolling" option), you can assign a clip at the top of the Speech Manager.

    Or do you want the same sound to appear each time, without scrolling?

  • Yes i want to have a sound that plays as each character appears (due to the "speech scrolling" option), i assign a clip at the top of the Speech Manager but it's still not working

  • What is the Speech scroll audio is field beneath set to?

    If set to SFX, such sound will be played from the scene's "Default Sound" object, which you can set at the top of your Scene Manager.

    If set to Speech, sound is instead played from each character's "Speech AudioSource", which you can set in their Inspector.

  • Well, I have implemented the method and the sound is working now, but the problem is that it is not synchronized with the texts, as the texts end and the sound is still working even when I put a check on the sound option for each letter.

  • How long is the sound? The intent is for the assigned clip to be very short.

    You can use a custom script, however, to end the sound once scrolling has completed:

    using UnityEngine;
    using AC;
    
    public class StopSpeechAudio : MonoBehaviour
    {
    
        private void OnEnable () { EventManager.OnEndSpeechScroll_Alt += OnEndSpeechScroll; }
        private void OnDisable () { EventManager.OnEndSpeechScroll_Alt -= OnEndSpeechScroll; }
    
        private void OnEndSpeechScroll (Speech speech)
        {
            KickStarter.sceneSettings.defaultSound.Stop ();
        }
    
    }
    
  • the audio clip is very short, where should I put this script?

  • Attaching it to any GameObject in the scene will cause it to take effect.

  • Everything works now, thanks Chris

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.