Invox Dictation SDK Version:

Templates Functions


Functions to manage the Invox Dictation Templates Repository. Templates are predefined text blocks that can be inserted during dictation.

User Templates

GetUserTemplateRepository

FunctionDescriptionParametersReturns
INVOX.GetUserTemplateRepository()Returns the user template repository object.—Object
const userTemplates = INVOX.GetUserTemplateRepository();

Repository methods

The repository returned by GetUserTemplateRepository() exposes get, add, remove, and replace. Create a template through INVOX.TemplateFactory and pass the existing template object when removing or replacing it.

const userTemplates = INVOX.GetUserTemplateRepository();
const template = INVOX.TemplateFactory.createTextTemplate(
    "My Template",
    "Template content here...",
    false,
);

await userTemplates.add(template);
const templates = await userTemplates.get();
await userTemplates.remove(template);
await userTemplates.replace(
    template,
    INVOX.TemplateFactory.createTextTemplate("Updated Template", "Updated content...", false),
);

Specialty Templates

GetSpecialtyTemplateRepository

FunctionDescriptionParametersReturns
INVOX.GetSpecialtyTemplateRepository()Returns the specialty template repository object.—Object
const specialtyTemplates = INVOX.GetSpecialtyTemplateRepository();

Repository method

The specialty template repository is read-only and exposes get.

const specialtyTemplates = INVOX.GetSpecialtyTemplateRepository();
const templates = await specialtyTemplates.get();