Skip to content
This repository was archived by the owner on Jun 9, 2022. It is now read-only.
This repository was archived by the owner on Jun 9, 2022. It is now read-only.

JSGF/FSG model build/load log weight incompatibility #79

@lv-gh

Description

@lv-gh

test.gram:

#JSGF V1.0 UTF-8;
grammar test;
public <test> = hello /10/ world;

jsgf weights > 1.0 are OK (and i suppose are pretty valid) to jsgf_build_fsg_internal() and that grammar can be used for decoding (-jsgf) and/or exported to fsg:

sphinx_jsgf2fsg -jsgf test.gram -fsg test.fsg

FSG_BEGIN <test.test>
NUM_STATES 3
START_STATE 0
FINAL_STATE 2
TRANSITION 0 1 1.000000 hello
TRANSITION 1 2 9.999998 world
FSG_END

But resulting fsg can't be loaded:

ERROR: "fsg_model.c", line 667: Line[6]: transition spec malformed; Expecting float as transition probability

because fsg_model_read() requires all log weights/probabilities to be <= 1.0:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions