mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-08-26 18:24:18 +00:00
fix MMI decode graph
This commit is contained in:
parent
a54f9a9b41
commit
4b6edaa4a3
@ -39,6 +39,7 @@ from icefall.decode import (
|
|||||||
)
|
)
|
||||||
from icefall.env import get_env_info
|
from icefall.env import get_env_info
|
||||||
from icefall.lexicon import Lexicon
|
from icefall.lexicon import Lexicon
|
||||||
|
from icefall.mmi_graph_compiler import MmiTrainingGraphCompiler
|
||||||
from icefall.utils import (
|
from icefall.utils import (
|
||||||
AttributeDict,
|
AttributeDict,
|
||||||
get_texts,
|
get_texts,
|
||||||
@ -493,11 +494,12 @@ def main():
|
|||||||
|
|
||||||
logging.info(f"device: {device}")
|
logging.info(f"device: {device}")
|
||||||
|
|
||||||
graph_compiler = BpeCtcTrainingGraphCompiler(
|
graph_compiler = MmiTrainingGraphCompiler(
|
||||||
params.lang_dir,
|
args.lang_dir,
|
||||||
device=device,
|
device=device,
|
||||||
sos_token="<sos/eos>",
|
oov="<UNK>",
|
||||||
eos_token="<sos/eos>",
|
sos_id=1,
|
||||||
|
eos_id=1,
|
||||||
)
|
)
|
||||||
sos_id = graph_compiler.sos_id
|
sos_id = graph_compiler.sos_id
|
||||||
eos_id = graph_compiler.eos_id
|
eos_id = graph_compiler.eos_id
|
||||||
|
Loading…
x
Reference in New Issue
Block a user