Best way to trigger voice lines?

Hi. I have some voice lines that I want to trigger.

I can go about it 2 ways as I see it:
The “A” way.

I have 4 words in the game. I want to be able to control in what order those 4 words are played, to create many combinations of sentences from the 4 words. A (weird) example could be this:
I have the following words. “Hello”, “Goodbye”, “Start”, “Stop”.
I want to be able to dynamically create, from a parameter any combination of those words. For instance “Hello Start Stop Goodbye” or “Stop Start Goodbye Hello” or any other combination.

I also want to have 3 versions of each word, so the sentence wont sound the exact same, even though I have the exact same sentence triggered 10 times in a row.

So far so good.

I have set up an event where I, on the time line, have the 4 different words, each with their own playlist of 3 variations of each word. I then set up destination markers and transition markers, driven by a parameter called “Speak”. The “speak” parameter is set as “User:Labeled” and each value is tied to a word.

So if I press play and go scroll through each of the values on the parameter, I get sentences.

The idea is then that the programmer will write a command that contains a string of the right words, with a small delay between each parameter change. That should then form a sentence.

The problem is though, that I can end up in a situation where 2 parameter changes have happened before the word is finished and then there would be a word skipped in the sentence.
Is there a smarter way to do this?
Or to stack/que parameter changes, so I make sure that they all are recieved and trigger the correct word?

Another way (the “B” way), would be to go with a Programmer instrument. The problem there is that I don’t get the randomization. I would have to make one single audio file for each sentence, and don’t get the granularity/randomization that I would like.

Any ideas or suggestions?
Thanks :slight_smile:

1 Like

Hi,

What version of FMOD are you using?

Unfortunately, there isn’t this specific functionality in Studio. You could utilize Studio | Studio Guide - Event Callback to trigger sending the next parameter which would make sure they are only sent at the end of the current event. An alternative would be using FMOD Studio | Instrument Reference - Command Instrument.

I think this would be the best option as you could have all the audio files in a single FMOD Studio | Dialogue and Localization - Audio Table which could then utilize a single instrument. You could then create the sentence via code and use an FMOD Studio | Studio Guide - Event Callback to trigger the whole sentence.

This could still be applied to the programmer instrument using parameters and FMOD Studio | Authoring Events - Automation.

Thanks. Using 2.02.15

I will have an in depth look at your answers once the programmer has time.

Thanks for getting back to me

1 Like

By the way. You said that I could use the command instrument. What would that approach look like/how would it solve stuff?
Thanks

Hi,

You could use the command instruments to set the parameter and automate the value via code. This way the parameters are only set when the command instrument is reached by the playback position.

CodeControlledValue can be changed hopefully without skipping other words.

Let me know if this fits the behavior you are looking for.

I have to say that I don’t fully follow you. This is what I am doing:

I have a parameter called “Speak” that is set to User:Labeled and then value 0=Stop, Value1=WordA, Value2=b etc.

I have placed the “Word A” (etc) transition at the end of each word.
The problem is that if I quickly skip the “Speak” value, faster than the words are being said/are finished, there will be underlying words that will not be played.

Thanks

Hi,

Thank you for sharing the screenshot.

Looking at the event I believe your best option would be to use individual events that have callbacks on FMOD_STUDIO_EVENT_CALLBACK_STOPPED (FMOD Engine | Studio API Reference - FMOD_STUDIO_CALLBACK_TYPE). You then pass the next event with the desired parameters to be played which would allow for much easier expansion rather than having to add more transition regions to the parent event.

I would also suggest utilizing FMOD Studio | Glossary - Defaults this allows for events to have the same base setup and quick expansion if more words are added.

Thanks :slight_smile:

1 Like