feat(subtitles): add local Japanese subtitle generation

- Generate Japanese SRTs through the overlay modal or launcher
- Support managed whisper.cpp models and optional dialogue detection
This commit is contained in:
2026-09-07 21:43:53 -07:00
parent c14c690875
commit 2d623838d5
82 changed files with 4001 additions and 54 deletions
+23
View File
@@ -91,6 +91,7 @@ function createEmptyShortcuts(): ConfiguredShortcuts {
openRuntimeOptions: null,
openJimaku: null,
openTsukihime: null,
openSubtitleGeneration: null,
openSessionHelp: null,
openControllerSelect: null,
openControllerDebug: null,
@@ -1580,6 +1581,28 @@ test('session binding: Ctrl+Alt+S dispatches subsync action locally', async () =
}
});
test('session binding: Ctrl+Shift+G dispatches subtitle generation with the sidebar closed', async () => {
const { handlers, testGlobals } = createKeyboardHandlerHarness();
try {
await handlers.setupMpvInputForwarding();
handlers.updateSessionBindings([
{
sourcePath: 'shortcuts.openSubtitleGeneration',
originalKey: 'Ctrl+Shift+G',
key: { code: 'KeyG', modifiers: ['ctrl', 'shift'] },
actionType: 'session-action',
actionId: 'openSubtitleGeneration',
},
]);
testGlobals.dispatchKeydown({ key: 'G', code: 'KeyG', ctrlKey: true, shiftKey: true });
assert.deepEqual(testGlobals.sessionActions, [
{ actionId: 'openSubtitleGeneration', payload: undefined },
]);
} finally {
testGlobals.restore();
}
});
test('session binding: Ctrl+Shift+J dispatches jimaku action locally', async () => {
const { handlers, testGlobals } = createKeyboardHandlerHarness();