Transcribe the audio right after a chapter boundary
audiobook_transcribe_chapter_boundaryTranscribe audio at a chapter boundary to verify the cut is clean: compare the transcript against the chapter's expected opening text and detect whether the boundary landed too early or too late.
Instructions
Transcribe a few seconds of audio starting at a chapter's current recorded boundary (or center_override_seconds, e.g. a candidate gap surfaced by audiobook_inspect_chapter_boundary) via a local whisper.cpp install -- a text-based alternative/complement to audiobook_render_boundary_waveform for judging a low_confidence or fallback boundary. Compare the transcript against expected_opening_text (pulled straight from the EPUB's own chapter text): a rough match means the cut is clean; a transcript that trails off from the PREVIOUS chapter's content means the boundary landed too late; one missing this chapter's first words means it landed too early.
Requires whisper.cpp (https://github.com/ggerganov/whisper.cpp) on
PATH as whisper-cli or whisper-cpp (or AUDIOBOOK_MCP_WHISPER_BIN
pointing at its CLI binary directly), plus a downloaded GGML model
file referenced by AUDIOBOOK_MCP_WHISPER_MODEL -- no Python
speech-recognition dependency. Missing either is reported clearly,
not silently skipped.
Args: params (TranscribeBoundaryInput): - job_id (str), chapter_index (int, 1-based). - duration_seconds (float): how much audio to transcribe, starting at the boundary (default 12). - language (str): whisper.cpp language code (default "en") -- set to the book's actual spoken language. - center_override_seconds (Optional[float]): transcribe starting here instead of the recorded boundary.
Returns: str: JSON with schema: { "chapter_index": int, "start_seconds": float, "duration_seconds": float, "transcript": str, # "" if the clip is silent/inaudible "expected_opening_text": str | absent # first ~40 words of this chapter's # own EPUB text, if available } or {"error": str, "error_type": str} on failure.
Error Handling: - "dependency_missing" if ffmpeg or whisper.cpp (binary or model) aren't available -- see the tool description for setup. - Raises a clear error if chapter_index hasn't been aligned yet and no center_override_seconds was given.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |