Export native speaker hashes from PSIN dialogue turns #1300

Open
github-bot wants to merge 1 commit from github-bot/gh-1300 into main AGit
Owner

@⁠kaoru-maki on GitHub · 2026-11-24 21:32 UTC · original
kaoru-maki:psin-native-speaker → main · +234 −1 · 4 files · 1 commits · open

Claimed in the coordination issue as: PSIN-NATIVE-SPEAKER (claim)

What and why

Add text_tables.py --native-speakers to export the character hash selected by each PSIN conversation turn. Resolve the turn's slot within that conversation's participant array and keep the source and record offsets for each occurrence. This covers typed cues outside the AU_ naming pattern and leaves the existing --dialogue CSV compatible with current consumers.

The report leaves the character hash empty for missing, repeated or zero-hash slots. It validates the LSCH layout and bounds typed arrays and strings within their blocks. The native cue and label are sufficient to join on subtitle_hash locally. The report makes no assumption about a cue's wave number or AWC address.

Tested

  • python3 -IB tests/test_psin_dialogue.py, tests/test_text_tables.py, tests/test_psin_data.py and tests/test_psin_index.py (101 passed, 1 skipped).
  • python3 -IB tests/test_docs_cli_flags.py, tests/test_text_write_line_endings.py and tests/test_docs_links.py (23 passed).
  • Local aggregate check on Xbox 1.0.2.1: matched the existing offset, slot and hash references for 7,044 rows across 137 typed PSIN resources that yielded zero pairs under the AU_ expression.
  • git diff --check and scripts/check_no_game_data.py on all changed files.

GPUs tested: n/a (CPU-only, macOS arm64).

AI-assisted: yes.

Checklist

  • Based on the current main and merges cleanly.
  • One topic.
  • Only code, format documentation and synthetic test inputs are included.
**@⁠kaoru-maki** on GitHub · 2026-11-24 21:32 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1300) `kaoru-maki:psin-native-speaker` → `main` · +234 −1 · 4 files · 1 commits · open Claimed in the coordination issue as: PSIN-NATIVE-SPEAKER ([claim](https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14)) ### What and why Add `text_tables.py --native-speakers` to export the character hash selected by each PSIN conversation turn. Resolve the turn's slot within that conversation's participant array and keep the source and record offsets for each occurrence. This covers typed cues outside the `AU_` naming pattern and leaves the existing `--dialogue` CSV compatible with current consumers. The report leaves the character hash empty for missing, repeated or zero-hash slots. It validates the LSCH layout and bounds typed arrays and strings within their blocks. The native cue and label are sufficient to join on `subtitle_hash` locally. The report makes no assumption about a cue's wave number or AWC address. ### Tested - `python3 -IB tests/test_psin_dialogue.py`, `tests/test_text_tables.py`, `tests/test_psin_data.py` and `tests/test_psin_index.py` (101 passed, 1 skipped). - `python3 -IB tests/test_docs_cli_flags.py`, `tests/test_text_write_line_endings.py` and `tests/test_docs_links.py` (23 passed). - Local aggregate check on Xbox 1.0.2.1: matched the existing offset, slot and hash references for 7,044 rows across 137 typed PSIN resources that yielded zero pairs under the `AU_` expression. - `git diff --check` and `scripts/check_no_game_data.py` on all changed files. GPUs tested: n/a (CPU-only, macOS arm64). AI-assisted: yes. ### Checklist - [x] Based on the current `main` and merges cleanly. - [x] One topic. - [x] Only code, format documentation and synthetic test inputs are included.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:46:34 +00:00
Author
Owner

@⁠kaoru-maki on GitHub · 2026-11-24 22:49 UTC · original

A follow-up on how we used the native speaker hash. We resolve each PSIN turn's speaker slot in that conversation's participant table, then match the full participant hash to a cast handle in the corresponding scene. The cast record points to the model's asset ID. We resolve the display name through the model's character alias when available, or through the dialogue character registry's GXT key when the model has no alias.

In one confirmed case, two cast members use the same model and both display as Intruder. The turn's slot and the full participant hash distinguish them. We retain separate speaker identities and use the localized text as a display label.

The local census has 66 verified model-to-label mappings. The archive preflight found dialogue slots for 44 of them. Verification of the associated audio is still in progress.

**@⁠kaoru-maki** on GitHub · 2026-11-24 22:49 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1300#issuecomment-7146681252) A follow-up on how we used the native speaker hash. We resolve each PSIN turn's speaker slot in that conversation's participant table, then match the full participant hash to a cast handle in the corresponding scene. The cast record points to the model's asset ID. We resolve the display name through the model's character alias when available, or through the dialogue character registry's GXT key when the model has no alias. In one confirmed case, two cast members use the same model and both display as `Intruder`. The turn's slot and the full participant hash distinguish them. We retain separate speaker identities and use the localized text as a display label. The local census has 66 verified model-to-label mappings. The archive preflight found dialogue slots for 44 of them. Verification of the associated audio is still in progress.
Author
Owner

@⁠kaoru-maki on GitHub · 2026-11-24 23:46 UTC · original

The 66-model follow-up is complete. Across 22 archives, we evaluated 18,305 candidate records. We added 6,730 verified subtitle, speaker and original-audio links for 38 characters, covering 5 h 51 min of isolated original speech. Another 4,182 records already had a named match, and 7,393 were held for further evidence in this run.

The PSIN participant hash resolves the turn to a scene cast member. The model or character registry supplies the display label. We use the cue, GXT key and full wave identity to resolve the exact archive stream, then cross-check the text with ASR tied to that isolated original. Separate participant hashes keep their own identities when a model and display label are shared.

In our current catalog snapshot, 32,921 of 42,423 exact subtitle keys have a verified original, or 77.6% of that key set.

**@⁠kaoru-maki** on GitHub · 2026-11-24 23:46 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1300#issuecomment-7147784836) The 66-model follow-up is complete. Across 22 archives, we evaluated 18,305 candidate records. We added 6,730 verified subtitle, speaker and original-audio links for 38 characters, covering 5 h 51 min of isolated original speech. Another 4,182 records already had a named match, and 7,393 were held for further evidence in this run. The PSIN participant hash resolves the turn to a scene cast member. The model or character registry supplies the display label. We use the cue, GXT key and full wave identity to resolve the exact archive stream, then cross-check the text with ASR tied to that isolated original. Separate participant hashes keep their own identities when a model and display label are shared. In our current catalog snapshot, 32,921 of 42,423 exact subtitle keys have a verified original, or 77.6% of that key set.
Author
Owner

@⁠kaoru-maki on GitHub · 2026-11-25 20:29 UTC · original

Here is a synthetic downstream example for the native speaker export. It combines each participant hash and cue key with verified audio ranges. The example preserves event order when a subscene clock resets. It also shows how two participants can share a display label without sharing an identity and how a caption with multiple participants can be flagged for review.

The archive includes five localization tables, a reproducer and results from SixNG v0.9.0. All inputs were generated for this example.

scene-dialogue-fixture-5lang.zip

**@⁠kaoru-maki** on GitHub · 2026-11-25 20:29 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1300#issuecomment-7173745526) Here is a synthetic downstream example for the native speaker export. It combines each participant hash and cue key with verified audio ranges. The example preserves event order when a subscene clock resets. It also shows how two participants can share a display label without sharing an identity and how a caption with multiple participants can be flagged for review. The archive includes five localization tables, a reproducer and results from SixNG v0.9.0. All inputs were generated for this example. [scene-dialogue-fixture-5lang.zip](https://github.com/user-attachments/files/35432693/scene-dialogue-fixture-5lang.zip)
Author
Owner

@⁠kaoru-maki on GitHub · 2026-11-25 21:00 UTC · original

@⁠ubiquitarianism, could you approve the two GitHub Actions workflows awaiting maintainer approval for this PR so CI can run? Thanks!

**@⁠kaoru-maki** on GitHub · 2026-11-25 21:00 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1300#issuecomment-7174494379) @⁠ubiquitarianism, could you approve the two GitHub Actions workflows awaiting maintainer approval for this PR so CI can run? Thanks!
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1300/head:github-bot/gh-1300'
git switch 'github-bot/gh-1300'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1300'
git switch 'github-bot/gh-1300'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1300'
git switch 'github-bot/gh-1300'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1300'
git switch 'main'
git merge --squash 'github-bot/gh-1300'
git switch 'main'
git merge --ff-only 'github-bot/gh-1300'
git switch 'main'
git merge 'github-bot/gh-1300'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.