I made a fun dialogue system for my game recently. I thought it would be great to have a gibberish system to translate text dialogue to the user’s preferred language while still feeling conversational. I think I can work out translation side pretty easily, but what I found to be a blocker was making convincingly conversational gibberish sounds. The solution was obvious; Pure Data excels at this task. Below is a rough sketch of a patch I made to generate the ‘words.’

I took an oscillator and created an 8 step sequencer of slopes. These slopes will randomly animate the pitch of the oscillator from one value to the other. The slope step is chosen at random by a random number generator that is triggered by each word of the dialogue. The oscillator goes out to another oscillator to give us that robotic FM synthesis sound. I think it’s a solid foundation that I can build on going forward. Maybe sample rate reduction on the voice or some type or robotic effect.

Here’s a video of it in action:

A bit about the Unity side of things

Let’s talk a bit about the Unity side of this! You’ll see in the Unity editor screenshot there is an editor script for the dialogue triggers and the manager for all the objects to assign information to and manage Pure Data messages to send at the start and end of the conversation. In the case of the video above, it sends a message of thronStart to the patch. When dialogue has reached the last line, it sends throneEnd which I have routed to start the metronome and song. This editor script is great because I can make different versions of the voice patch and change the character name associated to give voices some variation. This is stored in the Pure Data Character Name field (in screenshot, defined as orbVoice .)

Next I hope to make the system more aware of pauses in speech. Currently it’s just triggering at a uniform space of time between words. I’d like for it to later recognize commas or periods and translate those to pauses and more dynamic delivery of the phrase. Maybe even have properties for each line of dialogue to define the emotion of the delivery (angry, sad, scared, etc.) Onward!