Open exact dialogue audio from Scenes #226

Manually merged
github merged 2 commits from gh-pr/226/head into gh-pr/226/base 2026-11-26 20:19:37 +00:00
Owner

@⁠kaoru-maki on GitHub · 2026-11-25 00:25 UTC · original
kaoru-maki:scenes-dialogue-audio → master · +785 −51 · 7 files · 2 commits · merged 2026-11-25 01:54 UTC

Summary

Follow-up to the Scenes dialogue discussion. Scenes can read an optional local dialogue index and show the speaker, native speaker hash, subtitle key and text for each occurrence. The README documents the local input contract.

  • Open in Audio checks the archive, bank offset, stream position, 29-bit ID and encoded range against the local audio index. Position and range distinguish streams with the same ID.
  • Open voice excerpt highlights the parent stream. Play excerpt plays a verified channel and frame range from an interleaved stem. The range is relative to the 48 kHz decoded channel after Opus pre-skip, with an exclusive end.
  • Unresolved rows keep the speaker and subtitle without an audio action. Full-bank browsing and export stay available in Audio.

Validation

  • Synthetic coverage includes duplicate subtitle keys, unresolved occurrences, colliding stream IDs, stale addresses, unknown stem IDs and exact PCM frame selection.
  • The diff contains source, documentation and synthetic test values.
  • The GUI suite passed 27 tests (2 ignored), and all 9 core audio tests passed with Opus decoding enabled.
  • Eight local excerpts across four scenes matched full-stem decoding followed by a separate frame slice exactly. Compared with an independent decode, all eight ranges aligned and the maximum difference was one 16-bit PCM unit. All eight invalid-range controls were rejected.

Local index generator

The second commit adds sixng scene-dialogue. It joins verified occurrence records with selected local GXT exports and the existing SixNG audio index to produce scene_dialogue.json. Occurrence order and native speaker hashes are retained. The command reports missing or conflicting text and leaves a row without an audio action when its target cannot be validated.

The synthetic CLI test covers a shared display label, a repeated subtitle key, colliding stream IDs, conflicting subtitle variants and a rejected target. The generated index for all eight locally validated excerpts in four scenes matched the index used in the previous playback check, including the native speaker, text, encoded ranges and frame ranges.

**@⁠kaoru-maki** on GitHub · 2026-11-25 00:25 UTC · [original](https://github.com/holdmysocks/SixNG/pull/226) `kaoru-maki:scenes-dialogue-audio` → `master` · +785 −51 · 7 files · 2 commits · merged 2026-11-25 01:54 UTC ### Summary Follow-up to the [Scenes dialogue discussion](https://git.gtahub.st/github/holdmysocks--SixNG/pulls/222). Scenes can read an optional local dialogue index and show the speaker, native speaker hash, subtitle key and text for each occurrence. The README documents the local input contract. - **Open in Audio** checks the archive, bank offset, stream position, 29-bit ID and encoded range against the local audio index. Position and range distinguish streams with the same ID. - **Open voice excerpt** highlights the parent stream. **Play excerpt** plays a verified channel and frame range from an interleaved stem. The range is relative to the 48 kHz decoded channel after Opus pre-skip, with an exclusive end. - Unresolved rows keep the speaker and subtitle without an audio action. Full-bank browsing and export stay available in Audio. ### Validation - Synthetic coverage includes duplicate subtitle keys, unresolved occurrences, colliding stream IDs, stale addresses, unknown stem IDs and exact PCM frame selection. - The diff contains source, documentation and synthetic test values. - The GUI suite passed 27 tests (2 ignored), and all 9 core audio tests passed with Opus decoding enabled. - Eight local excerpts across four scenes matched full-stem decoding followed by a separate frame slice exactly. Compared with an independent decode, all eight ranges aligned and the maximum difference was one 16-bit PCM unit. All eight invalid-range controls were rejected. ### Local index generator The second commit adds `sixng scene-dialogue`. It joins verified occurrence records with selected local GXT exports and the existing SixNG audio index to produce `scene_dialogue.json`. Occurrence order and native speaker hashes are retained. The command reports missing or conflicting text and leaves a row without an audio action when its target cannot be validated. The synthetic CLI test covers a shared display label, a repeated subtitle key, colliding stream IDs, conflicting subtitle variants and a rejected target. The generated index for all eight locally validated excerpts in four scenes matched the index used in the previous playback check, including the native speaker, text, encoded ranges and frame ranges.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 20:19:35 +00:00
github manually merged commit dcb8cff1a2 into gh-pr/226/base 2026-11-26 20:19:37 +00:00
Author
Owner

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

I put together a small synthetic example for the scene-dialogue workflow. It maps normalized dialogue events to verified 48 kHz audio ranges. The subscene clock resets from 900 ms to 120 ms while playback order is preserved. Two participants share the display label “Operator,” and a caption with multiple participants stays in review.

I checked the example against SixNG v0.9.0. English is the default, with Spanish, French, German and Portuguese also covered. Each locale yields two playable ranges and one text-only row. The archive includes the generated inputs, a reproducer and the verification results. Its audio carrier is generated from silence.

scene-dialogue-fixture-5lang.zip

**@⁠kaoru-maki** on GitHub · 2026-11-25 20:28 UTC · [original](https://github.com/holdmysocks/SixNG/pull/226#issuecomment-7173717322) I put together a small synthetic example for the `scene-dialogue` workflow. It maps normalized dialogue events to verified 48 kHz audio ranges. The subscene clock resets from 900 ms to 120 ms while playback order is preserved. Two participants share the display label “Operator,” and a caption with multiple participants stays in review. I checked the example against SixNG v0.9.0. English is the default, with Spanish, French, German and Portuguese also covered. Each locale yields two playable ranges and one text-only row. The archive includes the generated inputs, a reproducer and the verification results. Its audio carrier is generated from silence. [scene-dialogue-fixture-5lang.zip](https://github.com/user-attachments/files/35432693/scene-dialogue-fixture-5lang.zip)
Author
Owner

@⁠holdmysocks on GitHub · 2026-11-25 20:31 UTC · original

Thanks for putting this together. The cases it covers are useful: the subscene clock reset, a display label shared by two participants, and a multi-participant caption that stays in review.

Rather than taking it as a zip attachment, could you open a PR that adds it as a test? Something like:

  • the generated inputs and expected results as plain text files under the test data, small enough to read in the diff;
  • the audio carrier generated by the test at run time (silence is fine), not checked in as binary audio;
  • a test that runs scene-dialogue on them for each locale and compares against the expected rows.

That way it's reviewable line by line and runs in CI on all three platforms. Please keep all values synthetic, with no strings, hashes or audio taken from game files.

v0.10.0 was released today, so please check against that or master.

**@⁠holdmysocks** on GitHub · 2026-11-25 20:31 UTC · [original](https://github.com/holdmysocks/SixNG/pull/226#issuecomment-7173811699) Thanks for putting this together. The cases it covers are useful: the subscene clock reset, a display label shared by two participants, and a multi-participant caption that stays in review. Rather than taking it as a zip attachment, could you open a PR that adds it as a test? Something like: - the generated inputs and expected results as plain text files under the test data, small enough to read in the diff; - the audio carrier generated by the test at run time (silence is fine), not checked in as binary audio; - a test that runs `scene-dialogue` on them for each locale and compares against the expected rows. That way it's reviewable line by line and runs in CI on all three platforms. Please keep all values synthetic, with no strings, hashes or audio taken from game files. v0.10.0 was released today, so please check against that or master.
Author
Owner

@⁠kaoru-maki on GitHub · 2026-11-27 07:00 UTC · original

Hey @⁠holdmysocks! Thanks again for merging #226 and #315. Could you check your Discord DMs when you get a chance?

**@⁠kaoru-maki** on GitHub · 2026-11-27 07:00 UTC · [original](https://github.com/holdmysocks/SixNG/pull/226#issuecomment-7212046960) Hey @⁠holdmysocks! Thanks again for merging #226 and #315. Could you check your Discord DMs when you get a chance?
This discussion has been locked. Commenting is limited to contributors.
No description provided.