If your game has recorded audio files for the dialogs, they will play automatically when the say command runs. This solution is much more convenient than using the animation method. This one should be kept for little events. Plus, the method we recommand here for audio speech will be more easy to update files and dialogs if necessary, without touching the Godot file.
Globally, we use a SamplePlayernode to play speech files, meaning you can use any of the streamed formats supported (.ogg, .spx, .mpc, .opus). To configure the speech format, use the project setting application/speech_suffix(default value is ".spx" even if opus is now considered as better).
If the speech_suffix does not appear in the settings, you can still edit the engine.cfg file manually. It will be in the first section named application :
You can use Audacity to improve and convert your audio files to ogg. If you just need to convert, soundconverter can eport to ogg and opus. For mpc you could use the musepack tools which can also be used as an external export command in Audacity.
name="Escoria in Daïza"
Your audio speech files should be inside the directory audio/speech, grouped by language directories. The game will look for the file inside the directory for the current language. For example
This structure shows 2 versions for the same dialog, one in English, one in French. It’s important that the speech files have the same name for a same phrase. This name will be the one we will use in the esc scenario. You have to make it as simple as possible. More than that, you may have plenty of speech files. Define naming rules to helps you find the speech file you’ll need.
The audio speech files are named after the translation ID of each speech line, with the speech_suffix attached to them. For example the command
say player player_speak_1:"What do you mean?"
will search for the fileplayer_speak_1.spx(or any other set format). If you want your game to be available in several languages, see the previous "Internationalisation" chapter to learn about string translation IDs.
You can use the skip_dialogsetting to automatically advance the dialog when the audio file finishes playing.
Il y a une erreur de communication avec le serveur Booktype. Nous ne savons pas actuellement où est le problème.
Vous devriez rafraîchir la page.