App icon for TypingTalk AAC .ttalk file format

Exported phrases from TypingTalk are saved in a .ttalk file. These files are renamed ZIP archives, so the extension can be renamed to .zip and the contents can be examined. These are the contents of a .ttalk archive:

.ttalk contents

File/folder name Description
phrases.json A JSON file with all the data for categories, phrases, their text, colors, etc. The schema for this file is described below.
images/ A folder containing all images referenced in phrases.json. Inside the app, images get converted to either JPEG or PNG format depending on transparency, and scaled down to a max of 500 × 500 pixels if larger. When exported, image file names may either have their original extensions or a generic ".ttimg" extension.
sounds/ A folder containing all sound clips referenced in phrases.json. Inside the app, sounds are converted to Advanced Audio Coding (AAC) format, with the file extension ".m4a". Other audio formats may or may not work when imported, depending on the device running the app.

JSON schema

Top level object of phrases.json
Field name Type Description
version number An integer used to identify the schema version of this file. This value is rarely read from, because all .ttalk archives are backward- and forward-compatible (newer fields are always optional, and unrecognized fields are safely discarded).
As of app version 1.16, the current schema version is 10.
folders array (Folder) An array of Folder objects.
Folder
Field name Type Description
displayName string Name of the folder.
categories array (Category) An array of Category objects.
Category
Field name Type Description
categoryString string Base name of the category. Must be unique among all categories in this folder.
color number (optional) An integer for the RGB color of this category. Can be omitted. See notes on color integers below.
borderColor number (optional) The border color for this category. Can be omitted. See notes on color integers below.
languageCode string (optional) A 2-letter ISO code for the language this category belongs to. e.g. "en" for English. Can be omitted for no associated language. This affects grouping of categories in the app.
label string (optional) The alternate text label for this category. If imagePath is null and label consists solely of emoji characters, this becomes an emoji symbol for the category. Can be omitted.
imagePath string (optional) The path to this category's label image in the .ttalk archive. e.g. if imagePath is "123.ttimg", this category's image is stored under "images/123.ttimg". Can be omitted.
fixedColumns number (optional) The number of grid columns this category should draw its phrases with. If omitted, the grid will be drawn dynamically based on screen size, orientation, etc.
fixedRows number (optional) The number of grid rows this category should draw its phrases with. If fixedColumns is null, this has no effect.
phrases array (Phrase) An array of Phrase objects.
Phrase
Field name Type Description
phraseString string (optional) Base text for this phrase. This text will be spoken & added to the text field when the phrase is tapped. This field is omitted for blank phrases and category links.
color number (optional) An integer for the RGB color of this phrase. Can be omitted. See notes on color integers below.
borderColor number (optional) The border color for this phrase. Can be omitted. See notes on color integers below.
label string (optional) The alternate text label for this phrase. If imagePath is null and label consists solely of emoji characters, this becomes an emoji symbol for the phrase. Can be omitted.
imagePath string (optional) The path to this phrase's label image in the .ttalk archive. e.g. if imagePath is "123.ttimg", this phrase's image is stored under "images/123.ttimg". Can be omitted.
soundPath string (optional) The path to this phrase's sound clip in the .ttalk archive. e.g. if soundPath is "123.m4a", this phrase's sound clip is stored under "sounds/123.m4a". Can be omitted for no sound clip, just normal text-to-speech.
type string (optional) For most phrases, this is null. For category links, type is equal to "categoryLink".
categoryLink string (optional) If type is "categoryLink", this is the categoryString for the category this button will jump to when tapped. The categoryString must exist in the current folder, and the button will take on the appearance of that category. If it cannot be found, this button will render as a broken link.
suffix boolean (optional) If true, appends this phrase's phraseString directly to the text field content without any space at the end. Has no effect when dontAddToField is true. Can be omitted to imply false.
prefix boolean (optional) If true, the next phrase tapped after this one will behave like a suffix. Both suffix & prefix can be true for a single phrase. Has no effect when dontAddToField is true. Can be omitted to imply false.
inputAsText boolean (optional) If true, this phrase will always display as text in the field, regardless of the "Show phrase pictures in text field" setting. Has no effect when dontAddToField is true. Can be omitted to imply false.
dontAddToField boolean (optional) If true, this phrase's text or sound clip will be played immediately when tapped, but no text will be added to the field. This takes priority over suffix, prefix, and inputAsText. Can be omitted to imply false.
Added in schema version 10.
choices array (PhraseChoice) (optional) An array of alternate choices for this phrase. Can be omitted.
PhraseChoice
Field name Type Description
text string The text to be spoken by this alternate choice.
imagePath string (optional) The image path for this alternate choice. Can be omitted.
soundPath string (optional) The sound path for this alternate choice. Can be omitted.

* Colors are represented as plain base-10 integers rather than hexadecimal numbers. Since they're based on Android ColorInt values, they may also require conversion for use outside the app. To convert to a value in the range of 0x000000 to 0xFFFFFF, just perform bitwise AND with 0xFFFFFF. e.g. in JavaScript, (value & 0xFFFFFF). In the future I might make color values export without needing this step.

Feel free to contact me with any more questions. Thank you so much.