Utterances ({{ utterances|length }})

{% for u in utterances %}
{{ u.speaker_name or u.character_name or 'Narrator' }} {{ u.type }} {% if u.emotion %} {{ u.emotion }} {% endif %}

{{ u.text }}

{% if u.context_before %} ...{{ u.context_before[-60:] }} {% endif %}
{% if u.audio_path %} {% set parts = u.audio_path.split('/') %} {% set ch_part = parts[-2] if parts|length >= 2 else '' %} {% set fname = parts[-1] %} {% if ch_part.startswith('ch') %} {% set ch_id = ch_part[2:] %} {% else %} {% set ch_id = chapter_id %} {% endif %} {% if u.duration_ms %} {{ "%.1f"|format(u.duration_ms / 1000) }}s {% endif %} {% else %} No audio {% endif %}
{% endfor %}