GUIDE

GameMaker text to speech: voice lines for your game

GameMaker is the tool of choice for many solo developers, and voice acting is usually the first thing cut from the budget. Text to speech gives every line a voice the day it is written: for a prototype, placeholder dialogue, or a game that keeps a synthetic voice on purpose.

The free SuperClonica engine voices lines offline on an ordinary processor and writes OGG, WAV or MP3, all formats GameMaker imports. This guide shows how to voice a script, bring it into a project, play the lines from GML, and which voices you can ship.

How voice lines work in GameMaker

Voiced lines are files made in advance; a released game does not need the engine on the player’s machine.

  • Each line becomes a sound asset, imported from a WAV, OGG or MP3 file.
  • audio_play_sound plays it; audio_play_sound_at places it in the room.
  • For hundreds of lines, keep OGG files as included files and stream them with audio_create_stream instead of importing each one.
  • The engine speaks 31 languages; Chinese is not supported yet.

Pick voices free online

On the page of any voice, type a line of your character, 30 to 100 characters, choose the language and press Voice it. In a few seconds you hear whether the voice fits the shopkeeper, the knight or the final boss, with no account.

Voice the script

Keep the dialogue in a spreadsheet with an id, a language and the text, and let a short script voice every row.

  • Install the engine: python -m pip install superclonica-cpu.
  • Voice each line: superclonica --text "Welcome, traveler! Potions are half price today." --voice F2 --lang en --normalize --output snd_shopkeeper_01.ogg. --normalize keeps every line at the same loudness.
  • Name the files after their asset names, so imports and code stay in sync.
  • The same text, voice and seed always give the same audio, so only changed lines need to be voiced again.

Play the lines from GML

Play an imported line with audio_play_sound(snd_shopkeeper_01, 10, false), where 10 is the priority and false means no loop. For streamed files, create the sound once with audio_create_stream("voice/shopkeeper_01.ogg") and play the index it returns the same way. Write numbers as words, “fifty gold” rather than “50 gold”, because digits are read as plain numbers.

Voices you can ship

For a jam game or a prototype, any catalog voice is fine. For a released game, use a voice you have the rights to: the ten stock voices of the model, M1 to M5 and F1 to F5, or your own voice trained in the SuperClonica studio from a clean 5 to 10 second recording of an actor who agreed, on a computer with an NVIDIA graphics card, or a custom voice ordered on the exchange. Fan-made character voices are for parody and fan games, not for commercial ones.