Skip to content

Commit

Permalink
Visualize speaker self-overlaps in the details plot
Browse files Browse the repository at this point in the history
  • Loading branch information
thequilo committed Aug 29, 2024
1 parent e3aee5a commit 8a42758
Show file tree
Hide file tree
Showing 4 changed files with 310 additions and 303 deletions.
8 changes: 4 additions & 4 deletions meeteval/viz/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def create_viz_folder(

file = out / f"{session_id}.html"
file.write_text(indent(doc.getvalue()))
print(f'Wrote {file.absolute()}')
print(f'Wrote file://{file.absolute()}')

###########################################################################

Expand All @@ -88,7 +88,7 @@ def create_viz_folder(
def get_wer(v):
error_rate = meeteval.wer.combine_error_rates(*[
meeteval.wer.ErrorRate.from_dict(
av.data['info']['wer']['hypothesis'])
av.data['info']['wer'])
for av in v.values()
]).error_rate
return f'{error_rate * 100:.2f} %'
Expand Down Expand Up @@ -171,7 +171,7 @@ def get_wer(v):
for (i, alignment), av in v.items():
with tag('td'):
with tag('span', klass='number'):
wer = av.data['info']['wer']['hypothesis']['error_rate']
wer = av.data['info']['wer']['error_rate']
doc.text(f"{wer * 100:.2f} %")
doc.text(' (')
with tag('a', href=f'{session_id}_{i}_{alignment}.html'):
Expand Down Expand Up @@ -221,7 +221,7 @@ def get_wer(v):

with open(out / "index.html", "w") as text_file:
text_file.write(indent(doc.getvalue()))
print(f'Open {(out / "index.html").absolute()}')
print(f'Open file://{(out / "index.html").absolute()}')


def html(
Expand Down
13 changes: 9 additions & 4 deletions meeteval/viz/visualize.css
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,13 @@ code {
}

.pill.warn {
background-color: #f3ebc9;
border: 1px solid #ffcc00;
background-color: #ffff00;
border: 1px solid #eed202;
}

.pill.warn:hover:not(.no-border) {
background-color: #ffff00;
border: 1px solid #eed202;
}

.pill:hover:not(.no-border) {
Expand Down Expand Up @@ -132,9 +137,9 @@ code {
}

/* Icons */
i {
i, .icon {
display: inline-block;
font-size: 1.2em;
/* font-size: 1.2em; */
margin-right: 5px;
}

Expand Down
Loading

0 comments on commit 8a42758

Please sign in to comment.