Sherlock Holmes: Serrated Scalpel
Moderator: ScummVM Team
Re: Sherlock Holmes: Serrated Scalpel
@Praetorian: See https://github.com/scummvm/scummvm/comm ... beb11b642f from https://github.com/zafos/scummvm/tree/c ... 1X2d23cDmF ... looks like Claude AI partly
Re: Sherlock Holmes: Serrated Scalpel
Hello.Praetorian wrote: Sat Nov 29, 2025 9:16 amHello! Is this your work? Can you tell us more about the process and any challenges you've encountered?
This started as an experiment using Claude to explain a large codebase I was unfamiliar with that I always had the intention to work on. I guided the prompts, interpreted outputs, and refined them for clarity, but the content was generated with the model’s assistance, so ti would be unfair to call it my work.
My main goal is to spark renewed interest in the project and implement this long forgotten task. There were minor challenges like figuring out the filename format for the videos, but the main challenge so far has been keeping text and speech in sync. I initially used a heuristic of 60 ms per character, which works in most cases but sometimes fails badly. I’ve started experimenting with retrieving the number of frames from each video and dynamically calculating a suitable duration per character, assuming 15 fps. Unfortunately I don’t have the time to fully develop this, as it would require extensive testing to achieve reliable results.
- Praetorian
- ScummVM Developer
- Posts: 1039
- Joined: Tue May 08, 2007 8:54 am
- Location: Greece
- Contact:
Re: Sherlock Holmes: Serrated Scalpel
Interesting! I don't have the full game (in either platform) but it seems like a cool project.
Maybe others will find the work helpful and progress further.
Maybe others will find the work helpful and progress further.
Re: Sherlock Holmes: Serrated Scalpel
Hi all,
I've been working on a personal mod for The Lost Files of Sherlock Holmes: The Case of the Serrated Scalpel that adds AI-generated voice narration to the DOS version, using ScummVM's Scalpel engine. What started as an audio-content project grew into something more interesting because I kept finding engine-side bugs while building it. Sharing in case it's useful — and to get input before considering a public release.
Up front: I'm not a C++ engine developer. The implementation work is done by Anthropic's Claude Code, with me directing architecture, validation, and decisions. The diagnostic-first methodology (instrument, reproduce, log, fix) is central to the workflow. Mentioning this because some findings below contribute to understanding the Scalpel engine.
What the mod does
The 1992 DOS release shipped without voice acting. The 1994 3DO version added voice files for character dialogue but not for narrator text. My mod fills both gaps:
Engine-side findings
Things I found that aren't in any documentation I could locate:
To find missing 3DO .stream files, I built a Python toolchain:
AI voices — posture
For narrator prose: xAI's Leo TTS. For character voices (Watson, Lestrade, Smithson): ElevenLabs IVC, trained on extracted clean speech from each character's existing 3DO dialogue (~60 seconds per character).
I know AI-voice tooling is a sensitive topic. My posture: this is a mod for a 30-year-old game whose original voice acting is preserved as-is. AI voices fill gaps where no audio was ever recorded. I'm not generating new audio in original actors' voices for content they originally voiced — Watson's IVC is used for narrator content (his journal entries), not for re-voicing dialogue he originally spoke.
Acknowledgments
This work builds on zafos's earlier contributions to the community. His initial work was the foundation that made it practical to extend the engine in this direction. Thanks for setting the table.
Thanks also to the ScummVM team — the Scalpel engine source is well-commented and was the entry point for understanding the audio subsystems. The existing checkSongProgress() infrastructure (originally for Tattoo) made the music delay implementation a tiny extension rather than a new system.
What's next
Working through a systematic playthrough QC pass and a few outstanding dialogue UX issues. After that, considering making the repo public — would appreciate input on:
I've been working on a personal mod for The Lost Files of Sherlock Holmes: The Case of the Serrated Scalpel that adds AI-generated voice narration to the DOS version, using ScummVM's Scalpel engine. What started as an audio-content project grew into something more interesting because I kept finding engine-side bugs while building it. Sharing in case it's useful — and to get input before considering a public release.
Up front: I'm not a C++ engine developer. The implementation work is done by Anthropic's Claude Code, with me directing architecture, validation, and decisions. The diagnostic-first methodology (instrument, reproduce, log, fix) is central to the workflow. Mentioning this because some findings below contribute to understanding the Scalpel engine.
What the mod does
The 1992 DOS release shipped without voice acting. The 1994 3DO version added voice files for character dialogue but not for narrator text. My mod fills both gaps:
- Narrator audio for object examines, inventory descriptions, and journal entries — voiced by xAI's Leo TTS for narration prose, ElevenLabs IVC clones for character-specific narration (Watson reads journal entries, Lestrade voices his letter to Holmes, etc.)
- 3DO dialogue audio preserved as-is (the original voice acting is canonical)
- Bridge between the two systems when a TLK script has no corresponding 3DO .stream file
Engine-side findings
Things I found that aren't in any documentation I could locate:
- Pattern D — cross-scene dialogue continuation. Any TLK script with a mid-reply OP_GOTO_SCENE opcode silently broke. The engine synthesizes .stream filenames using scene._currentScene instead of the script's home room (encoded in the script name itself). When a script transitions scenes mid-utterance, the synthesizer looks in the wrong directory. Compounded by _3doSpeechIndex being unconditionally reset on every loadTalkFile — so post-transition talkWait fired sub=0 again, replaying earlier segments. Both bugs hid each other (silence either way) until the home-room fix surfaced the counter-reset. Diagnostic case: Inspector Gregson bringing Holmes from Morgue to Scotland Yard. Likely affects other multi-scene scripted dialogue (Watson during carriage rides, escort sequences) — silently broken in the original 1992 game and through every ScummVM build since.
- _3doSpeechIndex encodes speaker turn. Even sub_idx ≈ Holmes (statement_text); odd sub_idx ≈ NPC reply. But OP_SWITCH_SPEAKER opcodes mid-reply create nested speaker turns that defy parity. Auto-triggered scripts with empty statement_text (Z/W/Y/X suffixes — 156 of 428 scripts) put NPC at sub=0 instead of Holmes.
- r27 bust hotspot. The "examine the bust" interaction in Farthington's library uses a FLAG_SET zone that doesn't reliably trigger on walk-through traversal. Fixed via engine click-resolution hook rather than data patch.
- Music subsystem META 0x80 handling. The MIDI parser handles loops on the audio thread via jumpToTick. Converted to "track ended" so a main-thread polled restart can intervene with a configurable delay (currently 30s between iterations).
To find missing 3DO .stream files, I built a Python toolchain:
- Standalone Python decoder for the 3DO IFF container + ADP4 codec (~150 lines)
- Bytecode walker for talk.lib enumerating (script, selector, sub_idx) tuples
- Per-character speaker mapping via OP_SWITCH_SPEAKER tracking
- Text-similarity ranking for missing-file remediation candidates
AI voices — posture
For narrator prose: xAI's Leo TTS. For character voices (Watson, Lestrade, Smithson): ElevenLabs IVC, trained on extracted clean speech from each character's existing 3DO dialogue (~60 seconds per character).
I know AI-voice tooling is a sensitive topic. My posture: this is a mod for a 30-year-old game whose original voice acting is preserved as-is. AI voices fill gaps where no audio was ever recorded. I'm not generating new audio in original actors' voices for content they originally voiced — Watson's IVC is used for narrator content (his journal entries), not for re-voicing dialogue he originally spoke.
Acknowledgments
This work builds on zafos's earlier contributions to the community. His initial work was the foundation that made it practical to extend the engine in this direction. Thanks for setting the table.
Thanks also to the ScummVM team — the Scalpel engine source is well-commented and was the entry point for understanding the audio subsystems. The existing checkSongProgress() infrastructure (originally for Tattoo) made the music delay implementation a tiny extension rather than a new system.
What's next
Working through a systematic playthrough QC pass and a few outstanding dialogue UX issues. After that, considering making the repo public — would appreciate input on:
- Best practices for distributing AI-generated audio that voices someone else's copyrighted dialogue (fair-use mod context)
- Whether the engine fixes (Pattern D especially) might be of interest for upstream consideration
- License posture — engine fork is GPL by inheritance, audio assets are AI-generated + Pixabay/Freesound community-licensed for SFX
Re: Sherlock Holmes: Serrated Scalpel
@Praetorian It should be noted that this was previously rejected as a PR due to the issues with mixing of datafiles from a much rarer game version i.e. 3DO which is not currently available from any digital storefront. See https://github.com/scummvm/scummvm/pull/7211