Dinky Feature: Scratch Audio
TL;DR —in Dinky you can record temp audio for each line of your script.
Reminder: Dinky is an editor that adds spoken dialogue features to Ink. You can find another article about it over here.
The Why of Temporary Audio
Temporary spoken dialogue is really handy for the team when creating a game, for multiple reasons. At a minimum, it shows that the dialogue system is hooked up properly, and will work when a real voice actor has recorded your script. But it can do a lot more than that.
TTS — Text To Speech — is often used during development to fill that placeholder need, and in fact Dinky will happily do that for you if you set it up right, but I don’t like TTS; it’s only really useful for showing that the dialogue system fires. TTS systems are no good at emotion, sarcasm, irony, and are no use for figuring out timing or to get across the real purpose of a conversation.
Real recorded voice by a human who knows what a line is for is much, much better, even if the recording is terrible and the acting isn’t great. It gets you much closer to a realistic timing for a line (“How long does this corridor have to be to get that speech across?”) and convey intent to the development team and early playtesters.
Enter scratch audio. Often in studios that’s done by going round and getting people to record rough lines, and then cutting them up and putting them in game. I’m keen on the writer themselves doing it, partly because the writer knows the intent of their own lines so doesn’t have to teach that to someone else.
Dinky lets you record scratch audio for each line in the game, using your normal system microphone — most likely what you have in your meeting headset. It won’t be fantastic quality, but that doesn’t matter for scratch audio.
Setting it up
First make sure you have Audio Status folders set up for your project in Project Settings, ideally with a status and folder called Scratch. Read the Dink Documentation if you’re not clear what that means.
Then go to the Scratch Audio tab in Project Settings, and just tick Enable Scratch Audio. Select the audio status to use for scratch audio. That means that any audio files in that folder will be counted as scratch audio, and if you record some using Dinky that’s where it’ll be stored.
You can also set the Recording Format. I mostly use WAV (and it’s that by default) but you can use Ogg if you like and if it’s more useful for your runtime. Dinky will record and playback either.
Recording
Dink format lines i.e. ones like:
Get Ian Thomas’s stories in your inbox
Join Medium for free to get updates from this writer.
CHARACTER: Something being said.
Are eligible for scratch audio recording. When you have the cursor over one of these lines, you’ll see a red Record Scratch button on the toolbar. Click on it and you’ll be given a countdown — after a count of three, speak into the microphone! (The first time it’ll ask for permission, probably.) When you’re done, hit space. (Esc would cancel, and you can then just do it again.) Try and start speaking immediately after the recording starts, and hit space as soon as you can once you’re done — trimming this audio is tricky to do automatically as you’re likely to have a bit of mic noise.
Now you have scratch audio in the folder you selected! You can use it for your game.
Playback
If you want to test it, use the Test Audio button on the toolbar, or hit Shift+Space on a Dink line with recorded audio, or click on the little play icon to the left of your line. That works for TTS, Scratch, or whatever audio file of the highest status that’s found for the line. (If that doesn’t make any sense, have a read of the Audio File Status feature in the Dink manual.)
Scratch Needed
If you tick the Check Scratch? checkbox, then your project will be scanned for lines which don’t have scratch or where scratch is out of date (the text has changed since your recorded it).
Then you’ll see a normal error banner at the top of the project, and you can skip backwards and forwards through scratch that needs updated and record more.
Under the Hood
There’s a sneaky little tech trick going on, which the Dink compiler itself also uses: when you edit the text for a line, Dinky calculates a hash value from that text. Then it stores it in the Wav file or the Ogg file, as part of the recording data. If you change the line of text, the number is calculated again, and compared to the existing Wav or Ogg file to see if it needs to be changed. If so, Dinky will tell you. Just rerecord your line!










