Skip to main content

Storage

This item is only intended to be used by the module's authors. Private

Types

PhonemeClip

interface PhonemeClip {
clipStartnumber
clipEndnumber
disableboolean?
}

A phoneme clip is used within a voicpack to define the time region of the voicepack audio which contains the corresponding phonetic sound.

Voicepack

interface Voicepack {
namestring
aliasesArray<string>?
idstring
languagestring
phonemes{[PhonemeIPA]PhonemeClip}
}

Pronunciation

interface Pronunciation {
modeSpeechMode
phonemes{PhonemeIPA | number}
}

PronunciationDictionary

interface PronunciationDictionary {
languagestring
inheritsstring?
}

Blacklist

type Blacklist = {string}

Functions

loadVoicepack

Storage.loadVoicepack(voicepackVoicepack) → boolean

getVoicepack

Storage.getVoicepack(idstring) → Voicepack

getVoicepackName

Storage.getVoicepackName(aliasstring) → string?

extendBlacklist

Storage.extendBlacklist(blacklistBlacklist) → number

getBlacklist

Storage.getBlacklist() → Blacklist

addDictionaryToLibrary

Storage.addDictionaryToLibrary(dictionaryPronunciationDictionary) → boolean

getDictionary

Storage.getDictionary(languagestring) → PronunciationDictionary?

addToCache

Storage.addToCache(
keystring,
itemany
) → ()

getCached

Storage.getCached(keystring) → any

Checks to see if an item with the key exists within the cache, otherwise returns nil

prepareCacheKey

Storage.prepareCacheKey(keystring) → ()

Used to prepare a key entry before an item is added

clearCache

Storage.clearCache() → ()

Used to clear all items in the cache

Show raw api
{
    "functions": [
        {
            "name": "loadVoicepack",
            "desc": "",
            "params": [
                {
                    "name": "voicepack",
                    "desc": "",
                    "lua_type": "Voicepack"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 27,
                "path": "src/Utility/Storage.luau"
            }
        },
        {
            "name": "getVoicepack",
            "desc": "",
            "params": [
                {
                    "name": "id",
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Voicepack"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 49,
                "path": "src/Utility/Storage.luau"
            }
        },
        {
            "name": "getVoicepackName",
            "desc": "",
            "params": [
                {
                    "name": "alias",
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "string?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 58,
                "path": "src/Utility/Storage.luau"
            }
        },
        {
            "name": "extendBlacklist",
            "desc": "",
            "params": [
                {
                    "name": "blacklist",
                    "desc": "",
                    "lua_type": "Blacklist"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 66,
                "path": "src/Utility/Storage.luau"
            }
        },
        {
            "name": "getBlacklist",
            "desc": "",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Blacklist"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 79,
                "path": "src/Utility/Storage.luau"
            }
        },
        {
            "name": "addDictionaryToLibrary",
            "desc": "",
            "params": [
                {
                    "name": "dictionary",
                    "desc": "",
                    "lua_type": "PronunciationDictionary"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 87,
                "path": "src/Utility/Storage.luau"
            }
        },
        {
            "name": "getDictionary",
            "desc": "",
            "params": [
                {
                    "name": "language",
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "PronunciationDictionary?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 104,
                "path": "src/Utility/Storage.luau"
            }
        },
        {
            "name": "addToCache",
            "desc": "",
            "params": [
                {
                    "name": "key",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "item",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 112,
                "path": "src/Utility/Storage.luau"
            }
        },
        {
            "name": "getCached",
            "desc": "Checks to see if an item with the key exists within the cache, otherwise\nreturns nil",
            "params": [
                {
                    "name": "key",
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 135,
                "path": "src/Utility/Storage.luau"
            }
        },
        {
            "name": "prepareCacheKey",
            "desc": "Used to prepare a key entry before an item is added",
            "params": [
                {
                    "name": "key",
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 174,
                "path": "src/Utility/Storage.luau"
            }
        },
        {
            "name": "clearCache",
            "desc": "Used to clear all items in the cache",
            "params": [],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 191,
                "path": "src/Utility/Storage.luau"
            }
        },
        {
            "name": "init",
            "desc": "",
            "params": [],
            "returns": [],
            "function_type": "static",
            "private": true,
            "source": {
                "line": 198,
                "path": "src/Utility/Storage.luau"
            }
        },
        {
            "name": "updateCache",
            "desc": "",
            "params": [],
            "returns": [],
            "function_type": "static",
            "private": true,
            "ignore": true,
            "source": {
                "line": 213,
                "path": "src/Utility/Storage.luau"
            }
        },
        {
            "name": "cache",
            "desc": "",
            "params": [
                {
                    "name": "key",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "item",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [],
            "function_type": "static",
            "private": true,
            "ignore": true,
            "source": {
                "line": 252,
                "path": "src/Utility/Storage.luau"
            }
        },
        {
            "name": "remove",
            "desc": "",
            "params": [
                {
                    "name": "key",
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "returns": [],
            "function_type": "static",
            "private": true,
            "ignore": true,
            "source": {
                "line": 267,
                "path": "src/Utility/Storage.luau"
            }
        },
        {
            "name": "deepClone",
            "desc": "",
            "params": [
                {
                    "name": "t",
                    "desc": "",
                    "lua_type": "{[I]: V}"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "{[I]: V}"
                }
            ],
            "function_type": "static",
            "private": true,
            "ignore": true,
            "source": {
                "line": 281,
                "path": "src/Utility/Storage.luau"
            }
        },
        {
            "name": "overlapTable",
            "desc": "",
            "params": [
                {
                    "name": "base",
                    "desc": "",
                    "lua_type": "{[any]: any}"
                },
                {
                    "name": "layer",
                    "desc": "",
                    "lua_type": "{[any]: any}"
                }
            ],
            "returns": [],
            "function_type": "static",
            "private": true,
            "ignore": true,
            "source": {
                "line": 304,
                "path": "src/Utility/Storage.luau"
            }
        }
    ],
    "properties": [],
    "types": [
        {
            "name": "CacheKey",
            "desc": "",
            "lua_type": "string",
            "private": true,
            "source": {
                "line": 332,
                "path": "src/Utility/Storage.luau"
            }
        },
        {
            "name": "Cache<V>",
            "desc": "",
            "lua_type": "{[CacheKey]: V}",
            "private": true,
            "source": {
                "line": 340,
                "path": "src/Utility/Storage.luau"
            }
        },
        {
            "name": "CacheEntry",
            "desc": "",
            "fields": [
                {
                    "name": "timeAdded",
                    "lua_type": "number",
                    "desc": ""
                },
                {
                    "name": "item",
                    "lua_type": "any",
                    "desc": ""
                }
            ],
            "private": true,
            "ignore": true,
            "source": {
                "line": 352,
                "path": "src/Utility/Storage.luau"
            }
        },
        {
            "name": "PhonemeClip",
            "desc": "A phoneme clip is used within a voicpack to define the time\nregion of the voicepack audio which contains the corresponding\nphonetic sound.",
            "fields": [
                {
                    "name": "clipStart",
                    "lua_type": "number",
                    "desc": ""
                },
                {
                    "name": "clipEnd",
                    "lua_type": "number",
                    "desc": ""
                },
                {
                    "name": "disable",
                    "lua_type": "boolean?",
                    "desc": ""
                }
            ],
            "source": {
                "line": 367,
                "path": "src/Utility/Storage.luau"
            }
        },
        {
            "name": "Voicepack",
            "desc": "",
            "fields": [
                {
                    "name": "name",
                    "lua_type": "string",
                    "desc": ""
                },
                {
                    "name": "aliases",
                    "lua_type": "Array<string>?",
                    "desc": ""
                },
                {
                    "name": "id",
                    "lua_type": "string",
                    "desc": ""
                },
                {
                    "name": "language",
                    "lua_type": "string",
                    "desc": ""
                },
                {
                    "name": "phonemes",
                    "lua_type": "{[PhonemeIPA]: PhonemeClip}",
                    "desc": ""
                }
            ],
            "source": {
                "line": 384,
                "path": "src/Utility/Storage.luau"
            }
        },
        {
            "name": "Pronunciation",
            "desc": "",
            "fields": [
                {
                    "name": "mode",
                    "lua_type": "SpeechMode",
                    "desc": ""
                },
                {
                    "name": "phonemes",
                    "lua_type": "{PhonemeIPA | number}",
                    "desc": ""
                }
            ],
            "source": {
                "line": 400,
                "path": "src/Utility/Storage.luau"
            }
        },
        {
            "name": "PronunciationDictionary",
            "desc": "",
            "fields": [
                {
                    "name": "language",
                    "lua_type": "string",
                    "desc": ""
                },
                {
                    "name": "inherits",
                    "lua_type": "string?",
                    "desc": ""
                },
                {
                    "name": "dictionary",
                    "lua_type": "Dictionary<Pronunciation>",
                    "desc": ""
                }
            ],
            "source": {
                "line": 414,
                "path": "src/Utility/Storage.luau"
            }
        },
        {
            "name": "Blacklist",
            "desc": "",
            "lua_type": "{string}",
            "source": {
                "line": 425,
                "path": "src/Utility/Storage.luau"
            }
        },
        {
            "name": "ModeProcessResult",
            "desc": "",
            "lua_type": "Array<PhonemeIPA | number>",
            "private": true,
            "source": {
                "line": 433,
                "path": "src/Utility/Storage.luau"
            }
        },
        {
            "name": "ModeDefinition",
            "desc": "",
            "private": true,
            "source": {
                "line": 441,
                "path": "src/Utility/Storage.luau"
            }
        }
    ],
    "name": "Storage",
    "desc": "",
    "private": true,
    "source": {
        "line": 6,
        "path": "src/Utility/Storage.luau"
    }
}