Steph

AI project #4: movie translation-bot

here’s something i’ve been working on a lot recently, spurred on by my discovery of the “Women Gambler” series of films starring Kyōko Enami that ran for (checks notes) SEVENTEEN FILMS OVER SIX YEARS! alas, most of them didn’t have english subs, so i was trying to figure out if i could have AI tackle it:

1. straight subtitle translation

most of them already had japanese subs, so i could feed it in and have it translate those directly to english. the key thing is to give it the actual movie so it can research it for context, plot, characters, to help make the translation richer, more consistent, and coherent:

translate subtitles for: ~he Woman Gambler’s Revenge (1968)~ Tenth film in the long-running series Daiei Studio’s Woman Gambler with Kyoko Enami starring where she plays the woman gambler. ~tt0294815~ ~490629~ Released: 20 Dec 1968 (57 years ago)

instead of a stilted line-by-line translation, this instead results in this:

Now I have a solid research base. Let me note: the IMDb link resolves to 女賭博師奥ノ院開帳 (film #10, released 1968-11-16), but the user’s uploaded file says “Woman Gambler’s Revenge” and the Amazon description for 女賭博師みだれ壷 (film #11, 1968-12-28, directed by Yoshio Inoue) matches both the director and the Daruma-shrine revenge plot. Let me now read the SRT file.
Ran 7 commands

Ran 7 commands

Now I have a complete picture of the film. Let me gather the key details and start translating:
Film: 女賭博師みだれ壷 (1968) — The Woman Gambler’s Revenge (film #11 in the series)
Director: Yoshio Inoue / 井上芳夫
Main character: 大滝銀子 (Otaki Ginko / “Ogin”), aka 昇り龍のお銀 (“Nobori-ryu no Ogin” / “Rising Dragon Ogin”)
Cast/Characters:

  • 銀子 (Ginko/Ogin) — Kyoko Enami, the woman gambler
  • 疾風の辰 / 永井辰吉 (Hayate no Tatsu / Nagai Tatsukichi) — her secret father, legendary dice-cup dealer
  • みどり (Midori) — her “sister” (adopted), performs magic/juggling
  • 三ちゃん (San-chan) — loyal attendant, loves Midori
  • 岡野の親分 (Okano no oyabun) — Okano gang boss, patron
  • 唐沢 (Karasawa) — the rival gang boss
  • 平岡 (Hiragoka) — Karasawa’s deputy/代貸し
  • 木壺の半次 (Kizubo no Hanji) — killer, worked for Karasawa, uses wooden cups
  • 緋桜のお由 (Hisakura no Oyu) — rival female gambler, hired by Karasawa
  • 流れ星の喜助 (Nagareboshi no Kisuke) — old gambler informant
  • 清旭斎 (Seikokusai) — the late foster father, magic troupe leader
  • Gambling terminology: 丁=cho (even), 半=han (odd), 壺=tsubo (dice cup), 壺振り=tsubofuri (dice cup dealer), 丁半=cho-han (even/odd dice game), 本引き=honbiki (card game), サイ=sai (dice), イカサマ=ikasama (cheating/loaded dice), 金目仕込み=kaname shikomi (gold-weighted loaded dice), 胴元=domoto (banker/house), 盆=bon (gaming table/session), シマ=shima (turf/territory), 霞網=kasumiari (a dice-switching technique), 代貸し=daigashi (gang deputy)

⠀Now let me also note cues 1140–1201 are TV channel promotional trailers (post-film content about Tsuruda Koji films), and several late cues (1088–1094 area) have noise/hallucinated content to handle.
Now I’ll do the full translation:
Ran 2 commands

Ran 2 commands

Good. Cues 1–1139 are the film proper; 1140–1201 are post-broadcast TV channel promos. I’ll drop 1140–1201 entirely as they are not part of the film.
Now let me build the translation. This is a long file (1139 cues after trimming promos), so I’ll do it systematically in Python:
Build translation dictionary and verify coverage

Build translation dictionary and verify coverage

All 1139 cues covered. Now build the SRT:
Ran 2 commands

Ran 2 commands

All cues are clean. Let me do one final cross-check on a few pivotal lines to confirm alignment quality:
Spot check key dramatic scenes

Spot check key dramatic scenes

Everything is clean and well-aligned. Let me present the file:
Presented file

Presented file

The_Woman_Gamblers_Revenge_1968_en.srt — 1,139 cues, 01:22:54 runtime.

Research notes:

  • This is 女賭博師みだれ壷 (1968), the 11th film in the series, directed by Yoshio Inoue — the file’s IMDb ID resolves to the 10th entry but the plot, cast, and director all match the 11th.
  • Main character: 大滝銀子 (Otaki Ginko), aka Ogin / “Rising Dragon Ogin”
  • Hayate no Tatsu / Nagai Tatsukichi — revealed mid-film to be Ogin’s biological father; their dramatic showdown is the climax
  • Kizubo no Hanji — the killer of Ogin’s foster father Seikokusai; uses wooden cups (木壺) and the “Mist-Net” (霞網) dice-switch technique
  • Gambling terminology preserved: cho (even) / han (odd), tsubo (dice cup), tsubofuri (dice-cup dealer), bon (gaming table), shima (turf), ikasama (cheat/loaded)

What was dropped:

  • Cues 1140–1201: post-broadcast TV channel promotional trailers for unrelated Tsuruda Koji films (not part of the film)
  • Lone exclamations (ハッ “Hah!”) were kept as they accompany the opening sword-throwing performance

2. full translation from scratch

the more difficult task was when there wasn’t any subtitle file at all. i initially grabbed the audio file and then tried a couple of AI models (whisper, parrot, etc.) do direct translation, but the results were pretty terrible. i then instead had a couple of different models just do a direct japanese audio transcription .SRT and .JSON without translation, and then feed that back in along with the movie research to translate and reconcile between the two with better context:

create subtitles for ~The Woman Gambler (1967)~ Second film in the long-running series Daiei Studio’s Woman Gambler with Kyoko Enami starring where she plays the woman gambler. In a fierce gambling den where rough men clash like sparks, two female gamblers vie for the same man… ~tt0204519~ ~490343~ https://letterboxd.com/film/the-woman-gambler/cast/ Released: 14 Jul 1967 (58 years ago)

this results in:

I’ll start by examining the uploaded files to understand the source material.
Reconciling subtitle cue count discrepancies

Reconciling subtitle cue count discrepancies

Now I understand the three files. Let me map out their relationship precisely.
Verified subtitle data and researched film details

Verified subtitle data and researched film details

Both sources span ~85 minutes. The SRT (655 cues, millisecond timing, speaker diarization) is the PRIMARY; the WEBDL JSON (2334 coarse cues) is the SECONDARY for cross-checking. Now the highest-leverage step: researching the film before translating.
Excavated film details, cast, characters, and gambling mechanics for subtitle creation

Excavated film details, cast, characters, and gambling mechanics for subtitle creation

Strong material. Key findings: heroine is Natsue Emori (絵森夏江) played by Kyoko Enami; the rival woman gambler is Takiko (滝子) played by Sae Kawaguchi; and crucially the gambling game here is tehonbiki (手本引き), a card game — not cho-han dice. Let me pull the detailed synopsis and character/actor mapping.
Consolidated character mappings, gambling terminology, and plot reconstruction for subtitle creation

Consolidated character mappings, gambling terminology, and plot reconstruction for subtitle creation

I now have a complete character map and plot. Let me consolidate the research before reading the full transcript:
Characters (corrected romanizations):

  • Natsue Emori (絵森夏江) — Kyoko Enami; heroine, woman gambler/dealer, runs a Roppongi piano bar (ASR mangles to エモリ夏へ/江森/絵守)
  • Genzo Emori (絵森源造) — Yoshi Kato; Natsue’s father, master dealer
  • Takiko Asakawa (浅川滝子) — Sae Kawaguchi; rival, a college girl who infiltrates the den
  • Yuji Tagami (田上雄二) — Kojiro Hongo; fashion photographer, Natsue’s lover, hates gambling
  • Tatsuo Isobe (磯部達雄) — Ryohei Uchida; yakuza boss / president of Global Industries, courts Natsue
  • Matsukichi (松吉) — Goichi Yamada; Natsue’s quiet bodyguard (ASR: 松岸)
  • Gohei Kikuta (菊田五平) — Asao Uchida; a boss

Game = tehonbiki (手本引き), a card game: dealer (胴師, dōshi) secretly picks a number 1–6, players bet which. 胴前/どうづら = the bank’s stake. “入ります” = Natsue’s signature line entering as dealer.
Let me now read the full transcript.
Verified transcript accuracy against source material and identified discrepancies

Verified transcript accuracy against source material and identified discrepancies

I’ve read the full transcript. Now let me cross-check key garbled lines and the narration against the secondary WEBDL transcription, and run the missing-segment analysis.
Reconciled transcription discrepancies and verified character details meticulously

Reconciled transcription discrepancies and verified character details meticulously

The secondary confirms the framing narration (opening “but her real profession… a lady of leisure” / closing “only when she gambles does her life’s fire burn”), and confirms tail cue 650 is a garbled END card. Now the missing-segment cross-check:
Scrutinized transcript gaps and identified two genuine dialogue segments to restore

Scrutinized transcript gaps and identified two genuine dialogue segments to restore

Almost all 157 uncovered secondary segments are noise (BGM, “ん”, “おい”/“はい”/“どうぞ” loops, vowel runs, “心躍躍” hallucinations). But a few contain coherent dialogue genuinely absent from the primary. Let me examine those candidates in context.
Identified two restoration candidates for subtitle gaps

Identified two restoration candidates for subtitle gaps

Two genuine skipped segments confirmed (and in both cases the primary has a hallucination sitting on the real line):

  1. ~28:41–29:00 — the Shiseido PR chief / Tagami model dispute. Primary cue 235 is noise (“ん お”) sitting on the real line “お気に召しませんか…”, and two further lines (“何ですかこのモデルは”, “…今までのエモリ夏江さんのモデルでやってもらいましょう”) are missing before cue 236.
  2. ~66:40–66:57 — the Nagoya boss inviting Natsue to stay. Primary cue 550 is a “おやすみなさい” hallucination over the real line “せっかく来たんだ”, and “しばらく遊んでいきなさい” is missing before cue 551.

⠀Let me grab exact timestamps for the affected cues, then build the translation.
Reconstructed subtitle translations from garbled ASR, cross-referencing timestamps and plot context

Reconstructed subtitle translations from garbled ASR, cross-referencing timestamps and plot context

Most uncovered segments are noise; I’ll restore only those two genuine gaps. A few primary cues are heavily garbled — let me pull the secondary at those exact timestamps to reconstruct them faithfully before writing the full translation.
Reconstructing dialogue and translating Japanese film subtitles comprehensively

All 655 cues are accounted for (526 translated, 129 noise dropped, 3 restored). Now I’ll build the final SRT — binding each English line to its original timestamp, inserting the restored cues, sorting, and renumbering.
Validated data integrity and prepared quality assurance

Validated data integrity and prepared quality assurance

529 cues. Now the mandatory quality checks: zero residual Japanese, contiguous numbering, monotonic timestamps, and an off-by-one spot-check at several scenes.
Run automated QA checks

Run automated QA checks

All four checks pass: 529 contiguous cues, monotonic timestamps, zero residual Japanese, no speaker prefixes. Now the off-by-one spot-check — comparing the original Japanese against the English at several scenes, especially around the insertions and dropped runs.
Verified alignment integrity and prepared final output

Verified alignment integrity and prepared final output

Alignment is correct throughout — every English line sits on its right timestamp, the reconstructed garbled lines (235, 526, 550) and the three restored cues are correctly placed, with no off-by-one shift. Let me verify the file head/tail and present it.
Ran a command, read a file

Ran a command, read a file

Done. The Woman Gambler (1967) is subtitled — 529 clean cues, all checks passing.
Research that shaped the translation. Daiei’s second Onna Tobakushi entry, dir. Taro Yuge. The auto-transcription mangled every proper noun, so I fixed them from Wikipedia/Eiga.com against the cast: heroine Natsue Emori (絵森夏江, Kyoko Enami; rendered as エモリ夏へ/江森/絵守 in the source), her father and master dealer Genzo Emori, rival college girl Takiko Asakawa, photographer lover Yuji Tagami, yakuza boss Tatsuo Isobe (of “Global Industries”), bodyguard Matsukichi (源造→松吉, source said 松岸), and Nagoya boss Gohei Kikuta. Crucially, the game here is tehonbiki (card-guessing), not cho-han dice — so I rendered the dealer’s ritual “入ります” as Natsue’s signature “I’m in,” the calls as “Place your bets / Make your call,” and the bare numbers as the players’ guesses (“Six,” “Four,” etc.). The bracketing narration (opening “her true profession: a lady of leisure” → closing “only when she gambles does her life’s fire burn”) was confirmed against the second transcription.
Cleaning. Dropped 129 noise cues — Whisper hallucinations (looped おやすみなさい over music, ご視聴ありがとうございました, 心躍躍), lone ん/me/vowel runs, and unrecoverable garble — while keeping short interjections and yes/no answers.
Cross-check restorations. Aligning both transcriptions found two genuine skipped segments, and in each the primary had a hallucination sitting on a real line:

  • ~28:46 the Shiseido PR chief insisting on Natsue as the model (cue 235’s “ん お” reconstructed, plus two restored lines before “What’s the matter?”).
  • ~1:06:55 the Nagoya boss inviting Natsue to stay (cue 550’s “おやすみなさい” was actually “you’ve come all this way,” plus the restored “stay and enjoy yourself a while”).

⠀Everything else flagged by the secondary was theme loops, grunts, or applause tags and was correctly ignored.
QC: contiguous 1–529, monotonic non-overlapping timestamps, zero residual Japanese, speaker prefixes stripped, and a multi-scene Japanese-vs-English spot-check confirmed no off-by-one shift around the merges/inserts. File saved as The_Woman_Gambler_1967_en.srt.
A few lines in the boss-confrontation scuffle (~1:03) were heavily garbled in both sources; I reconstructed them from the clearer secondary and the plot — if you can eyeball that ~30-second stretch against the picture, that’s the spot most worth a sanity check.

the results are pretty good. you do have to go back and watch it through as there are some small errors, and also scenes where it missed transcription completely, but you can tell it to try again between these timestamps. also obviously it doesn’t sub any of the signs, but you can screenshot those and tell it where to put those in.

3. full translation with cross-movie context

watching all of these Women Gambler movies spun me off onto a deep tangent back into Nikkatsu gangster/spy/western(?!?) movies, especially the ones starring chimpunk-cheeked Joe Shishido, which led to the maybe most impressive work:

Asiapol Secret Service was a James Bond-ish spy movie from 1966, filmed by Nikkatsu starring Hideaki Nitani. No subs, so I translated that using the same method, but it was missing a lot of things. However, this movie was a co-production with Shaw Brothers (tying into my last year’s deep dive) where they made TWO VERSIONS OF THE SAME MOVIE, except the Shaw Brothers version starred Jimmy Wang Yu, but otherwise used the same footage where the lead is not in the scene. This led to:

Ok, this is very complicated. There was another version of this film, Asia-Pol (https://www.themoviedb.org/movie/186958) where they replace the main character with a Yang Ming-hsuan (Jimmy Wang Yu). It changes the plot slightly in that Ming Hua is the lost sister of the lead. Some details here but also research as much as possible: https://gamblersanddrifters.com/2024/01/11/review-asiapol-secret-service-1966-x-asia-pol-1967/ Attached is the subtitles from that version. Can you use these to clear up some of the dialogue from the Japanese version? Most of the dialogue not involving the main characters or where they are not on screen is probably correct, accounting for different timing but relying on where they are in the plot in relation to the movie. DO NOT bring in or override dialogue from the Shaw Brothers Asia-Pol version if it conflicts with the Japanese version.

This led to some pretty impressive work:

Let me start by examining the Shaw Brothers subtitle file, then I’ll align the two versions by plot beat (not timestamp) to refine garbled lines without importing the divergent main-character plot.The Shaw Brothers subs already confirm useful details (e.g. “Tai Sun Trading” = my Taishin Trading). Let me research the SB version’s plot divergences carefully so I know exactly which lines to protect, then align scene-by-scene.Now I have the divergences clear. Let me lay them out before touching anything:
Protected JP-version facts (never import the SB variant): lead is Saeki (not Yang Ming-hsuan); the secretary is Kyoko (SB calls her “Sachiko”); Minghua is Yang’s daughter / “like a little sister” to Saeki (SB makes her his blood lost sister); the brother-in-Bangkok thread; the ship Pigris (SB romanizes it “Behaliose”). Everything else — George, Carlos, Lai, Hongo, the cops, the smugglers, gadgets — is shared and safe to clarify.
Let me dump the full SB subtitle so I can align it by plot beat against my garbled spots.This is a clean parallel track and it’s clarifying several of my garble-reconstructed lines. Let me get the rest of it.The parallel track is clarifying garbled lines well — and it confirms the user’s warning vividly: the Ming Hua “jade keepsake / I am your elder brother” recognition scene in the SB version (cues 510–535) maps to a completely different JP scene where Minghua talks about her confinement and Saeki says he’s “just a tourist.” I’ll protect all of that. Let me read the rest of the SB track.The parallel track is doing exactly the job — clarifying garble while exposing the divergences I must not cross. Let me confirm one more secondary timing for an added restoration, then apply the targeted refinements.Confirmed. Now I’ll apply the targeted refinements to the build — clarifying garbled lines and the ADU network name, fixing the urn/interrogation beat, and adding one more restored line (“George has moved it aboard the Pigris”), all while preserving every protected JP divergence.Now let me re-run all quality checks and spot-check the refined regions to confirm nothing broke and no divergence leaked in.Let me check the urn beat and George’s exposition at their correct timestamps.Both refined regions read cleanly and stay on their correct timestamps. The urn/key interrogation beat now makes sense (Saeki’s mock-answer “in Chen’s funeral urn… inside that box”), and George’s exposition is sharper and consistent (ADU figurehead, wife and daughter held hostage). Let me present the updated file.Updated subtitles are ready — 672 cues, all checks passing (contiguous 1–672, monotonic, UTF-8, zero residual Japanese), and verified clean of any Shaw Brothers divergence terms.
How I used the Asia-Pol track. I aligned it by plot beat (not timestamp — the SB cut runs ~4½ min shorter) and used it only as a key to resolve lines where my Japanese was reconstructed from heavy garble. Notable clarifications:

  • Opening: “部長は” → “Where’s the chief?”; the truck line now reads “Tell him — a Taishin Trading truck just pulled up…”; and the garbled cue 13 was actually a three-beat exchange — “Looks like you guessed right. — Who are you? — I’m the one who’s been following you.”
  • ADU: the SB track confirmed “ADU” is the on-screen name of the smuggling network, so I made it consistent (radio call “ADU — report your number”; “To crush ADU, we’ll need Beirut, Bangkok…”; George’s “part of ADU”).
  • The interrogation: Saeki’s mock-answer to “where’s your HQ?” is now the sardonic “It’s in there — Chen’s funeral urn… Inside that box,” recovering a line I’d previously dropped as garble.
  • George’s exposition: “The head of ADU died over a decade ago, so we needed a stand-in… we held his wife and daughter, so he had no choice but to cooperate” — much sharper than my earlier guess.
  • Plus smaller fixes: Chen’s full name (Chen Long-chang), “Get changed, we’ll talk over dinner,” the phone line about the chief, “She was the one who called herself So Koran” (tying Akiko to the fake sister), “I want them aboard the ship,” and a restored line — “George has moved it aboard the Pigris” — confirmed by the SB scene where the refinery shifts from the casino to the ship.

What I deliberately did not import (the SB plot diverges here, so I kept the Japanese throughout):

  • The lead stays Saeki (never “Yang Ming-hsuan”).
  • The secretary stays Kyoko (SB calls her “Sachiko”), including her “Tonight, I hate it” jab.
  • Minghua stays Yang’s daughter / “like a little sister” — I left out every SB sibling-reveal line (the jade keepsake, “I am your elder brother,” “She is my sister,” “Brother”/“Sister” during the bomb escape, and the ending’s “Keep this piece of jade”).
  • The passport scene reads “Lai” (the SB version reads “Yang” there, as sister-plot foreshadowing).
  • The verification scene stays French (the SB uses Taiwanese).
  • The “eighteen years old” beat stays Saeki’s sarcasm, not the SB’s “I too left home 18 years ago” foreshadowing.

⠀If you spot a specific line that still reads awkwardly, point me to the timestamp and I’ll take another pass.

of course i still had to go back and have it fill in missed scenes and subtitle signs, but the end result is pretty incredible.