Page 1 of 1

Automate addition of audio

Posted: Mon Aug 08, 2022 3:33 am
by jmnb
I'd like to use an API to record audio in two languages for the dialogue system. I'm not sure the best way to approach this. I need a way to get the data from the database in two languages, and then set it up to play the audio automatically. I also have more than one character, so I would need to be able to associate text with a particular character in order to be able to select the correct voice from the API. That way each character can have their own separate voice. Any help you could provide on this would be much appreciated. Thanks!

Re: Automate addition of audio

Posted: Mon Aug 08, 2022 9:32 am
by Tony Li
Hi,

Here are some suggested steps:

1. Get your written dialogue in as final a form as you can. This reduces the headache of having to go back and record new lines later for changed dialogue. You'll almost certainly have to re-record some things as you playtest and get feedback, but the less you need to do the easier it will be.

2. Choose an entrytag format. (The Cutscene Sequence Tutorials have more details.) The default format is usually fine. It's what pretty much everyone uses.

3. Export a voiceover script. This will export CSV files, which are just text-based spreadsheet files that you can process however you want. Each line in the spreadsheet will contain the character name, entrytag, and dialogue text.

4. When you record lines of dialogue in the default language (e.g., English), save them using the entrytag as the filename. When you record lines of dialogue in the other language (e.g., 'fr' for French), them them using the local entrytag by adding '_fr' to the end of the filename.

5. The easiest way to play the audio is to put the audio files in a folder named 'Resources'. You can have as many of these folders as you want, to organize your files. For example:

Assets/Audio/Voice/Adam/Resources/
Assets/Audio/Voice/Bob/Resources/
Assets/Audio/Voice/Cindy/Resources/
etc.

Later, you can change this to use assetbundles or addressables if you don't want to use Resources.

6. Set the Dialogue Manager's Default Sequence to:

Code: Select all

AudioWait(entrytaglocal);
Delay({{end}});
(The Cutscene Sequence Tutorials explain this in more detail.)

Re: Automate addition of audio

Posted: Tue Aug 09, 2022 3:09 am
by jmnb
Thanks for the advice! :D

Re: Automate addition of audio

Posted: Tue Aug 09, 2022 8:26 am
by Tony Li
Happy to help!