Closed glynpu closed 1 year ago
So I assume best_path would be done after this.
There definitely should be a way to get the alignment info, either by somehow tracing back the arc_maps (I don't remember
whether these are made available), or perhaps more elegantly, by attaching some kind of integer properties
about the frame indexes and text-position indexes to the FSA at the point we create it, and then accessing those after best-path. Perhaps someone can figure out how to do this.
I think this is something we will find a lot of uses for, but we need to have a function in icefall that makes it available in an easy way.
We could perhaps have an option to the RNN-T training code, to return the alignment.
have a function in icefall
Actually, I am using this feature for a while and I have a function in python that converts the alignment to timestamp information. I will make a PR in icefall
.
Great! Bear in mind we may need the scores/probabilities as well.
Looks OK to me from a brief glance! So are we OK to merge it? Let's merge today unless there are any immediate objections?
@glynpu Could you have a look to check if the failing cases relate to this PR.
@glynpu Could you have a look to check if the failing cases relate to this PR.
The failing cases are not related to this PR. They are mainly about torch.1.13.1 installation problem.
I think it is a fairly safe and independent change (i.e. will not affect other functions), merging now.
Hi Dan, this is the code we are discussing just now. @danpovey Could we get an alignment you mentioned from this lattice?
Maybe we need more unit tests to make sure it works as we expect. Currently, this is only checked by Xiaoyu's and My eyes with following code.
Lattice generated: