{% extends "wagtailadmin/base.html" %} {% load i18n %} {% load l10n %} {% load wagtailimages_tags wagtailadmin_tags %} {% block titletag %}{% blocktrans with title=transcript.pk %}Editing {{ title }}{% endblocktrans %}{% endblock %} {% block extra_js %} {{ block.super }} {{ form.media.js }} {% url 'wagtailadmin_tag_autocomplete' as autocomplete_url %} {% endblock %} {% block extra_css %} {{ block.super }} {{ form.media.css }} {% endblock %} {% block content %} {% trans "Editing" as editing_str %} {% include "wagtailadmin/shared/header.html" with title=editing_str subtitle=transcript.pk icon="media" usage_object=transcript %} {% block form_row %}
{% csrf_token %}
    {% for field in form %} {% if field.name == 'file' %} {% include "cast/wagtail/_file_field_as_li.html" %} {% elif field.name == 'thumbnail' %} {% include "cast/wagtail/_thumbnail_field_as_li.html" %} {% else %}
  • {% include "wagtailadmin/shared/field.html" %}
  • {% endif %} {% endfor %}
  • {% if user_can_delete %} {% trans "Delete" %} {% endif %}

{% if known_speaker_review.total %}

{% trans "Known-speaker suggestions" %}

{% blocktrans with confident=known_speaker_review.confident uncertain=known_speaker_review.uncertain total=known_speaker_review.total %} Voxhelm returned {{ total }} known-speaker suggestions: {{ confident }} confident and {{ uncertain }} uncertain (needs review). {% endblocktrans %}

{% trans "The bulk action applies known-speaker names to public Podlove, DOTe, and WebVTT output by start time and may smooth uncertain segments between confident speakers. Use the segment review table to override a segment or leave it blank." %}

{% csrf_token %}
{% csrf_token %} {% for hidden_field in known_speaker_review_form.hidden_fields %} {{ hidden_field }} {% endfor %} {% for row in known_speaker_review_rows %} {% endfor %}
{% trans "Time" %} {% trans "Text" %} {% trans "Suggestion" %} {% trans "Resolution" %}
{% if row.timestamp_label %} {{ row.timestamp_label }} {% else %} — {% endif %} {% if row.text %} {{ row.text }} {% else %} {% trans "No text available" %} {% endif %} {% if row.speaker %} {{ row.speaker }} {% else %} {% trans "No suggestion" %} {% endif %} {{ row.field.errors }} {{ row.field }}
    {% if known_speaker_review_form.non_field_errors %}
  • {{ known_speaker_review_form.non_field_errors }}
  • {% endif %}

{% endif %}

{% trans "Map speakers to contributors" %}

{% if speaker_mapping_rows %}

{% trans "Store approved speaker mappings for public transcript output without rewriting the raw Podlove, DOTe, or WebVTT files." %}

{% if transcript_audio_sources %}
{% endif %} {% if not contributor_assignments %}

{% trans "No episode contributors are available for this transcript's audio. Use one-off display names for speakers who should not become reusable contributors." %}

{% endif %}
{% csrf_token %} {% for hidden_field in speaker_mapping_form.hidden_fields %} {{ hidden_field }} {% endfor %}
    {% for row in speaker_mapping_rows %}
  • {{ row.mapping.speaker_label }}
    {{ row.mapping.get_review_state_display }} {% if not row.mapping.active %} · {% trans "inactive" %}{% endif %}

    {% include "wagtailadmin/shared/field.html" with field=row.target_field %} {% include "wagtailadmin/shared/field.html" with field=row.display_name_field %}
    {% if row.samples %}
      {% for sample in row.samples %}
    1. {% if sample.has_start_time and transcript_audio_sources %} {% elif sample.timestamp_label %} {{ sample.timestamp_label }} {% else %} {% endif %}

      {{ sample.text }}

    2. {% endfor %}
    {% else %}

    {% trans "No transcript samples found for this speaker." %}

    {% endif %}
  • {% endfor %}
    {% if speaker_mapping_form.non_field_errors %}
  • {{ speaker_mapping_form.non_field_errors }}
  • {% endif %}

{% trans "Voice-reference candidates" %}

{% if voice_reference_candidate_groups %} {% for group in voice_reference_candidate_groups %}

{% if group.contributor %} {{ group.contributor.display_name }} {% else %} {{ group.speaker_label }} {% endif %}

{% if not group.contributor %}

{% trans "Map this speaker label to one contributor before creating a voice reference." %}

{% endif %} {% for row in group.rows %} {% endfor %}
{% trans "Speaker" %} {% trans "Start" %} {% trans "End" %} {% trans "Duration" %} {% trans "Text" %} {% trans "Audition" %} {% trans "Reference" %}
{{ row.candidate.speaker_label }} {{ row.candidate.start_timestamp_label }} {{ row.candidate.end_timestamp_label }} {{ row.candidate.duration_label }} {{ row.candidate.text }} {% if transcript_audio_sources %} {% else %} {% trans "No playable audio" %} {% endif %} {% if row.duplicate_reference %} {% trans "Existing reference" %} {% elif row.contributor %}
{% csrf_token %}
{% else %} {% trans "Needs contributor mapping" %} {% endif %}
{% endfor %} {% else %}

{% trans "No source-range candidates were found for this transcript." %}

{% endif %} {% else %}

{% trans "No speaker labels were found in the Podlove, DOTe, or WebVTT transcript files." %}

{% endif %}
{% endblock %} {% endblock %}