Skip to content

Implement phone-level IPA alignment writing tiers.ipa_phone #351

Description

@TarahAssistant

Current state

tiers.ipa_phone is reserved in the annotation schema and mapped in python/textgrid_io.py:34,47 as the TextGrid Phones tier. No production code writes it. Verified via grep: zero matches for tiers['ipa_phone'] = across python/. Tier slot exists in the schema, no writer, no reader (except export config).

User-visible effect

  • TextGrid exports include an empty Phones tier.
  • Phone-marking workflows are not supported.

Why deferred

PARSE does not currently do individual phone marking. The tier is reserved for a future capability but is not thesis-critical right now. Confirmed by Lucas 2026-05-10.

When implemented — fix shape

Mirror the pattern PR #350 used for ortho_words:

  1. Full-mode IPA writer: extend _compute_speaker_ipa at python/server_routes/annotate.py:1678 to compute phone-level intervals via the chosen phoneme aligner (candidate: reuse xlsr-53-espeak-cv-ft already used for ORTH word alignment) and assign tiers['ipa_phone'].
  2. Partial-mode refresh (concept-windows / edited-only): same in _compute_speaker_ipa_concept_windows at python/server_routes/annotate.py:1614.
  3. Tagged-only refresh: extend _persist_speaker_rerun_writes in python/app/http/tag_filtered_rerun_handlers.py with an align_ipa_phones DI callable mirroring align_ortho_words from PR fix(ortho): rebuild word tier after partial reruns #350, threaded through the loop and all three production callers (compute job, sync HTTP, MCP).
  4. Single-lexeme rerun: also covered by the same DI pattern — the frontend's saveSpeaker flow needs to refresh the per-window phone intervals.
  5. Wrap each alignment call in try/except + logger.exception for graceful degrade on aligner failure (mirrors PR fix(ortho): rebuild word tier after partial reruns #350's pattern).
  6. Tests: precise property assertions (inside-window phones whitespace-join to expected sequence; outside-window phones byte-equal pre-run) + graceful-degrade on stubbed alignment failure.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions