Options
All
  • Public
  • Public/Protected
  • All
Menu

Module \mmir-tooling\src\tools

Index

Variables

Functions

Object literals

Variables

Const ALL_SPEECH_CONFIGS_TYPE

ALL_SPEECH_CONFIGS_TYPE: "speech-all" = "speech-all"

Const ALL_SPEECH_CONFIGS_TYPE

ALL_SPEECH_CONFIGS_TYPE: any = settingsUtils.getAllSpeechConfigsType()

Const CONFIG_GRAMMAR_ASYNC_EXEC

CONFIG_GRAMMAR_ASYNC_EXEC: "grammarAsyncExecMode" = "grammarAsyncExecMode"

Const CONFIG_GRAMMAR_DISABLE_STRICT_MODE

CONFIG_GRAMMAR_DISABLE_STRICT_MODE: "grammarDisableStrictCompileMode" = "grammarDisableStrictCompileMode"

Const CONFIG_IGNORE_GRAMMAR_FILES

CONFIG_IGNORE_GRAMMAR_FILES: "ignoreGrammarFiles" = "ignoreGrammarFiles"

Const applyToAllSpeechConfigs

applyToAllSpeechConfigs: "__apply-to-all-configs__" = "__apply-to-all-configs__"

Const asrCoreId

asrCoreId: "mmir-plugin-encoder-core.js" = "mmir-plugin-encoder-core.js"

Const cpath

cpath: "/controllers" = "/controllers"

Let entryMode

entryMode: "id" | "file" = "id"

Const gengrammars

gengrammars: string = "/gen" + gensubgrammars

Const genstates

genstates: string = "/gen" + gensubstates

Const gensubgrammars

gensubgrammars: "/grammar" = "/grammar"

Const gensubstates

gensubstates: "/state" = "/state"

Const gensubviews

gensubviews: "/view" = "/view"

Const genviews

genviews: string = "/gen" + gensubviews

Const gpath

gpath: "/gen" = "/gen"

Const hpath

hpath: "/helpers" = "/helpers"

Const log

log: any = logUtils.log

Const log

log: any = logUtils.log

Const log

log: any = logUtils.log

Const log

log: any = logUtils.log

Const lpath

lpath: "/config/languages" = "/config/languages"

mmirModuleBaseConfig

mmirModuleBaseConfig: any = _.cloneDeep(require('mmir-lib/lib/modulesBaseConfig'))

Const mpath

mpath: "/models" = "/models"

Const reDictionaryInfo

reDictionaryInfo: RegExp = /mmirf\/settings\/dictionary\/([^/]+)/

Const reGrammarInfo

reGrammarInfo: RegExp = /mmirf\/grammar\/([^/]+)/

Const reJsonGrammarInfo

reJsonGrammarInfo: RegExp = /mmirf\/settings\/grammar\/([^/]+)/

Const reSateModelInfo

reSateModelInfo: RegExp = /mmirf\/state\/([^/]+)/

Const reSpeechConfigInfo

reSpeechConfigInfo: RegExp = /mmirf\/settings\/speech\/([^/]+)/

Const reViewInfo

reViewInfo: RegExp = /mmirf\/view\/([^/]+)\/([^/]+)/

Const spath

spath: "/config/states" = "/config/states"

Const ttsCoreId

ttsCoreId: "audiotts.js" = "audiotts.js"

Const vpath

vpath: "/views" = "/views"

Const warn

warn: any = logUtils.warn

Const warn

warn: any = logUtils.warn

Const warn

warn: any = logUtils.warn

Functions

_addPath

_getEntry

  • _getEntry(entry: string): string

addBuildConfig

addConfig

addCtrl

addDictionary

addGrammar

addHelper

addJsonGrammar

addModel

addSpeechConfig

addStateModel

addStateModelXml

addToConfigList

  • addToConfigList(runtimeConfiguration: RuntimeConfiguration, configListName: string, entry: string | { id: string }): void

addView

addViewTemplate

applyCustomPaths

  • applyCustomPaths(paths: {}, customPaths: {}): void

applyPluginConfig

applyPluginSpeechConfig

applyRemovePaths

  • applyRemovePaths(paths: {}, removePathsList: string[]): void

applySetting

  • applySetting(field: string, opt: {}, globalOpt: {}, defaultValue?: any): void
  • HELPER: do set the field in options, if it is not explicitly specified, either to the globally specified value, or the default/fallback value for the field

    Parameters

    • field: string

      the field name for the option

    • opt: {}

      the element's options (e.g. GrammarOption)

      • [field: string]: any
    • globalOpt: {}

      the global options for that type of element (e.g. GrammarOptions)

      • [field: string]: any
    • Optional defaultValue: any

      the default value for the option/field (in case neither opt nor globalOpt for that field is defined)

    Returns void

binToJsonObj

  • binToJsonObj(buffer: Buffer, filePath: string): any

constainsPlugin

  • check if plugin is already contained in pluginList

    NOTE: uses deep comparision, i.e. entries with same id (plugin.id) are considered deferent, if their (other) properties differ (even if the IDs match).

    Parameters

    • plugin: PluginOptions

      the plugin

    • pluginList: PluginOptions[] | null | undefined

      the list of plugins to check

    • deepComparison: boolean

      if true, makes deep comparision, instead of comparing the IDs

    Returns false | PluginOptions

    false if plugin is NOT contained in pluginList, otherwise the duplicate entry from pluginList

contains

containsEntry

  • containsEntry(list: Array<string | ({ id: string })>, value: string | ({ id: string })): boolean

createBuildConfig

createConfigEntry

createDefaultSettingsFor

createDirectoriesJson

Export assignment createResourcesConfig

  • createResourcesConfig(removePathsList?: string[], customPaths?: {}): ResourceConfig
  • create config for mmir resources:

    • paths: the mapping moduleID -> resourcePath (combined default mmir paths & removePathsList & customPaths)
    • workers: list of resourcePaths that are entry points for WebWorkers
    • fileResources: list of resourcePaths that refer to "raw"/binary files (e.g. mp3 audio, css stylesheets)
    • textResources: list of resourcePaths that refer to plain text files
    • resourcesPaths: mapping for resourcePaths {[sourcePath: string]: TargetPath}, i.e. specifies replacement of source-file by the traget-file

    Parameters

    • Optional removePathsList: string[]
    • Optional customPaths: {}
      • [id: string]: string

    Returns ResourceConfig

    the resource config object

createSettingsEntryFor

detectByteOrder

  • detectByteOrder(buffer: Buffer): BufferEncoding

doApplySpeechConfigValue

doLoadAllFilesFor

getConfigDefaultValue

getConfigEnv

getConfiguration

getFileType

  • getFileType(filePath: string): "js" | "json"

getIdFor

  • getIdFor(settingsFilePath: string): string

getLanguages

getPluginEntryFrom

getSettings

getSpeechConfigDefaultValue

getTypeFrom

isAsrPlugin

  • isAsrPlugin(pluginId: string): boolean

isExclude

isPluginExportConfigInfoMultiple

isSettingsType

  • isSettingsType(type: SettingsType, filePath: string): boolean

isWebpackConfig

mergeBuildConfigs

normalizeConfigurations

normalizeImplName

  • normalizeImplName(implName: string): string

normalizeMediaManagerPluginConfig

normalizeModName

  • normalizeModName(modName: string): string

normalizePluginEntry

parseConfigDir

parseRootDir

processDuplicates

readDir

  • scan for

    • configuration.[json | js]
    • /dictionary.[json | js]
    • /grammar.[json | js]
    • /speech.[json | js]

    NOTE: if .js file, it MUST be a CommonJS module that exports the settings object as its only/default export, i.e. ~ "module.exports = settingsObject;"; any dynamic code is evaluated at compile-time, i.e. the exported settings-object must not contain dynamic content

    Parameters

    Returns void

    [description]

readJsonAsync

  • readJsonAsync(filePath: string): Promise<any>

readJsonSync

  • readJsonSync(filePath: string): any

readSettingsFile

  • readSettingsFile(filePath: string, fileType?: "json" | "js", async?: boolean): any
  • read settings file as JSON or "plain" CommonJS module and return PlainObject

    Parameters

    • filePath: string

      the filePath

    • Optional fileType: "json" | "js"
    • Optional async: boolean

    Returns any

    | Promise<{[field: string]: any}>} the settings object (or if async, a Promise that resolves to the settings object)

removeBom

  • removeBom(content: string): string

requireJson

  • requireJson(filePath: string): any

resolveAndAddAliasPaths

  • resolveAndAddAliasPaths(alias: {}, paths: {}): {}

toAliasId

Object literals

defaultResourcesConfig

defaultResourcesConfig: object

fileResources

fileResources: string[] = ['vendor/sounds/beep-notification.mp3','vendor/styles/simpleViewLayout.css','vendor/styles/stdlne-wait-dlg.css']

packages

packages: undefined[] = []

paths

paths: null = null

resourcesPaths

resourcesPaths: {}

Type declaration

textResources

textResources: string[] = ['env/grammar/grammarTemplate_reduced.tpl']

workers

workers: string[] = ['workers/scionQueueWorker.js','workers/asyncGrammarWorker.js','workers/jisonCompiler.js','workers/jsccCompiler.js','workers/pegjsCompiler.js']

Const deprecatedImplFileIdMap

deprecatedImplFileIdMap: object

webasratntimpl.js

webasratntimpl.js: string = "webasrAtntImpl.js"

webasrgooglev1impl.js

webasrgooglev1impl.js: string = "webasrGooglev1Impl.js"

Const implFileIdMap

implFileIdMap: object

for webAudioInput module's specific service/implementations: mapping from file-name to load-module-ID in MediaManager/plugin-loading mechanism (to be used in configuration.json)

webasrgoogleimpl.js

webasrgoogleimpl.js: string = "mmir-plugin-asr-google-xhr.js"

webasrnuanceimpl.js

webasrnuanceimpl.js: string = "mmir-plugin-asr-nuance-xhr.js"

Const moduleIdMap

moduleIdMap: object

mapping from file-name to load-module-ID in MediaManager/plugin-loading mechanism (to be used in configuration.json)

mmir-plugin-tts-core-xhr.js

mmir-plugin-tts-core-xhr.js: string = "audiotts.js"

webaudioinput.js

webaudioinput.js: string = "mmir-plugin-encoder-core.js"

Generated using TypeDoc