Skip to content

Add new constructor for Speech::ModelCombination to get config for specific model index#182

Draft
larissakl wants to merge 1 commit intomasterfrom
model-combination-constructor
Draft

Add new constructor for Speech::ModelCombination to get config for specific model index#182
larissakl wants to merge 1 commit intomasterfrom
model-combination-constructor

Conversation

@larissakl
Copy link
Contributor

This is a preparation of my one-pass model-combination algorithm which requires not only multiple label scorers, but also an individual lexicon per label scorer (and optionally an individual AM config). In this PR, a new constructor for Speech::ModelCombination is added which additional takes a modelIndex and retrieves the lexicon, AM and label scorer defined in the config for this index, e.g. like this:

[lib-rasr.search-algorithm.label-scorer-1]
type = ...

[lib-rasr.search-algorithm.lexicon-1]
file = ....

[lib-rasr.acoustic-model-1]
state-tying.type = ...

If no individual lexicon or AM is defined, it falls back to the global lexicon or AM.

In Core::Configuration, two new helper functions are added. The first checks if at least one resource under a certain selection is defined and the second returns the parent config for a selection.

I'm happy about any suggestions or ideas how to improve this code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant