AI voice lines for the characters in your game
A shopkeeper who says hello out loud feels alive in a way a text bubble never does. asset voice reads one line, exactly as you wrote it, and saves it as an .mp3 named after the line’s id. Give each character its own voice with --voice, and every greeting, warning and tutorial hint from that character sounds like the same person, line after line.
The commands
asset voice shop-hello "Welcome in! Mind the cat, she bites."
asset voice shop-bye "Come back when your pockets are heavier."
asset voice announcer-round2 "Round two!"
asset voice tutorial-jump "Tap the right side of the screen to jump." --mockThe words are spoken as written
The text inside the quotes is the script. Nothing is rewritten or padded, so punctuation does the acting: a comma gives a small pause, an exclamation mark lifts the line, a question mark turns it up at the end. Spell names the way they should sound. If a made-up place keeps coming out wrong, write it the way it is said ("Kel-dar" rather than "Keldhar") and ask again.
Keep a line to one thought. Short lines are easier to trigger at the right moment, easier to cut when the design changes, and they let you vary a greeting by picking one of three at random.
One voice per character
--voice takes a voice id, and passing the same id on every line keeps a character recognisable from the first scene to the last. Leave it out and a default voice reads the line, which is fine for a prototype or a single narrator.
A tidy naming habit helps the agent and you: the character first, then what the line is for. shop-hello, shop-bye, shop-too-poor, guard-halt, guard-pass. The files sort together, and the game code can look a line up from the character and the event.
Where voice lines earn their keep
- Tutorial prompts: a spoken "swipe to dodge" lands while the player's eyes are on the action.
- Announcers: round starts, combos, a win or a loss.
- Shop and quest givers: a greeting and a goodbye make a menu feel like a visit.
- Bosses: one taunt as the fight opens.
Each line is its own paid call, quoted first and refused if it would pass your cap. Asking for the same words in the same voice again costs nothing, as the cache answers it. Run with --mock while the scenes are still moving around, then swap in the real recordings. The docs list every flag the verb takes.
Questions people ask
Can one call record a whole script?
One call speaks one line into one file. Ask each line separately, which also lets the game play each one on its own trigger.
How do I find a voice id?
Voice ids come from the voice service the CLI speaks through. Pick a voice you like there, copy its id, and pass it with --voice on every line for that character.
Do voice lines follow the game’s look?
No. The look is a picture and guides pictures. A spoken line follows its words and its voice id only.
Is there a free way to test the wiring?
Yes. --mock writes a placeholder .mp3 offline with no key and no charge, under the same name the real line will have.
Install it, then ask for the look.
Get an asset keyMake a key in the Tyrbo app, then run asset login. Add --mock to try any command free first.