Skip to content

YouTube transcripts are always saved in English when the video has an auto-dubbed English caption track #957

Description

@ksuzukigh

Summary

When clipping a Japanese-language YouTube video, the saved transcript is often the English auto-translated one instead of the Japanese original — even though the video's transcript panel only ever shows Japanese.

The cause is that language is never passed to Defuddle, and Defuddle's default caption picker explicitly prefers en.

Steps to reproduce

  1. Open a Japanese-language YouTube video that has an auto-dubbed English audio track (isAutoDubbed: true). Example: https://www.youtube.com/watch?v=ADYYGLTV6oI
  2. In the browser, open the transcript panel — it shows Japanese only, with no language switcher.
  3. Clip the page with Web Clipper.
  4. The saved note's transcript is in English.

Cause

defuddle/src/extractors/youtube.tspickCaptionTrack():

const nonAsr = captionTracks.filter((track) => track.kind !== 'asr');
const pool = nonAsr.length > 0 ? nonAsr : captionTracks;
return pool.find((track) => track.languageCode === 'en') || pool[0];

When options.language is set, findPreferredCaptionTrack() honours it. But obsidian-clipper never sets it — every construction site passes only { url }:

  • src/content.ts:216new Defuddle(document, { url: document.URL })
  • src/utils/clip-utils.ts:18,20
  • src/utils/reader.ts:874
  • src/core/highlights.ts:1137

So for any video that exposes an English caption track, English wins regardless of the page language or the user's locale.

Selecting Japanese in YouTube's transcript panel does not help either, because the API result is preferred over the inline DOM result ("Prefer API result, fall back to inline" in extractTranscript).

Impact

Measured across one user's vault (224 clipped YouTube videos with transcripts, Japanese-language channels only):

Clipped Japanese transcript English transcript
before 2026-09-04 120 3 (2%)
2026-09-04 onward 11 13 (54%)

The share rose sharply as YouTube's auto-dubbing rolled out to more videos. The English text is a machine translation of Japanese speech and contains product-name errors (e.g. "ChatGPT Images 2.5" transcribed as "DALL-E 3", "Sunburst" as "Suburst", "Codex" as "CEX"), so the saved note can be actively misleading.

The same failure mode should affect any non-English content once an English dub track exists.

Suggested fix

Pass a language to Defuddle, e.g. the page's document.documentElement.lang, the browser UI language, or a new user setting:

new Defuddle(document, { url: document.URL, language: navigator.language })

A per-user "preferred transcript language" setting would be ideal, since some users may deliberately want the English track.

Happy to test a fix against a set of affected videos if that helps.

Environment

  • obsidian-clipper a9d33ce
  • defuddle ^0.19.2 (70b4b92)
  • Chrome, macOS

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions