Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add jobs to study alignments #558

Open
wants to merge 20 commits into
base: main
Choose a base branch
from
Open

Conversation

Icemole
Copy link
Collaborator

@Icemole Icemole commented Nov 19, 2024

PlotViterbiAlignmentJob: job to plot the Viterbi alignment. The point of this job is to check for a specific issue in the final alignments.


DumpSegmentTextAlignmentJob: job to dump text/alignment pairs for a specific corpus and set of alignment files. The point of this job is to review in a fast way the text against the corresponding alignments.

The output is a compressed text file of the form:

<segment-id>
<segment-text>
<id-0> <timestamp-start-0> <timestamp-end-0> <alignment-0> <weight-0>
...

Feel free to propose any other format in the comments.

@Icemole Icemole changed the title Job to dump text/alignment pairs Add jobs to view alignments Nov 19, 2024
@Icemole Icemole changed the title Add jobs to view alignments Add jobs to study alignments Nov 19, 2024
@DanEnergetics
Copy link
Contributor

I prefer the second to last or last dumping format that you suggested. They would make it easiest to get a quick grasp on the duration of certain phonemes for me.

mm/alignment.py Outdated Show resolved Hide resolved
mm/alignment.py Outdated Show resolved Hide resolved
mm/alignment.py Outdated Show resolved Hide resolved
mm/alignment.py Outdated Show resolved Hide resolved
mm/alignment.py Outdated Show resolved Hide resolved
General: abstracted function to get alignment data to a public function, reformatted code, added docstrings. PlotViterbiAlignmentJob: added title in plot with segment text.
@Icemole
Copy link
Collaborator Author

Icemole commented Nov 20, 2024

I prefer the second to last or last dumping format that you suggested. They would make it easiest to get a quick grasp on the duration of certain phonemes for me.

Maybe we can specify a default mapping (csv file?) and an optional custom mapping to be provided by the user.

Edit/update: I tried to do this but faced issues with detailed print schemas: if we want to print timestamps and so on, we should provide the alignments as a tuple (timestamp, allophone_id, hmm_state, weight), the string corresponding to simply the triphone + HMM state doesn't do it. Of course, this could be easily solved by adding the specific triphone to the tuple, but that tuple format wouldn't be consistent with the rest, and I'd like the user to know what they're doing.

Let me know if you still want this custom printing approach.

mm/alignment.py Outdated Show resolved Hide resolved
mm/alignment.py Outdated Show resolved Hide resolved
mm/alignment.py Outdated Show resolved Hide resolved
Icemole and others added 3 commits November 20, 2024 10:54
General: job fixes. DumpText...: updated output format (now more verbose).
Co-authored-by: michelwi <[email protected]>
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.

3 participants