Automate addition of audio

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
jmnb
Posts: 22
Joined: Thu May 26, 2022 4:38 am

Automate addition of audio

Post 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!
User avatar
Tony Li
Posts: 21975
Joined: Thu Jul 18, 2013 1:27 pm

Re: Automate addition of audio

Post 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.)
jmnb
Posts: 22
Joined: Thu May 26, 2022 4:38 am

Re: Automate addition of audio

Post by jmnb »

Thanks for the advice! :D
User avatar
Tony Li
Posts: 21975
Joined: Thu Jul 18, 2013 1:27 pm

Re: Automate addition of audio

Post by Tony Li »

Happy to help!
Post Reply