Commit 9ff3c3b

benny-dou <60535774+benny-dou@users.noreply.github.com>
2026-06-15 14:22:35
chore(asr): disable ASR corrector
1 parent 23c1ccb
Changed files (4)
src
subtitles
summarize
ytdlp
src/subtitles/base.py
@@ -50,7 +50,7 @@ async def match_url(client: Client, message: Message) -> str:
 
 
 @cache.memoize(ttl=120)
-async def fetch_subtitle(url: str, reference: str = "", *, enable_corrector: bool = True) -> dict:
+async def fetch_subtitle(url: str, reference: str = "", *, enable_corrector: bool = False) -> dict:
     """Fetch subtitles from Bilibili or YouTube.
 
     Returns:
src/summarize/main.py
@@ -191,7 +191,7 @@ async def ytdlp_info(info: dict, url: str, platform: str) -> dict:
     if not video.is_file() and info["audio_path"].is_file():
         sources.append({"type": "audio", "path": audio.as_posix()})
 
-    if subtitles := await get_subtitles(asr_path, url, asr_engine=ASR.DEFAULT_ENGINE, vinfo=info, enable_corrector=False):
+    if subtitles := await get_subtitles(asr_path, url, asr_engine=ASR.DEFAULT_ENGINE, vinfo=info):
         sources.append({"type": "transcripts", "text": subtitles})
 
     # date
src/ytdlp/main.py
@@ -48,7 +48,7 @@ async def preview_ytdlp(
     ytdlp_send_subtitle: bool = False,
     summary_ytdlp: bool = False,
     summary_ytdlp_model: str = AI.SUBTITLE_SUMMARY_MODEL_ALIAS,
-    enable_corrector: bool = True,
+    enable_corrector: bool = False,
     show_author: bool = True,
     show_title: bool = True,
     show_pubdate: bool = True,
src/ytdlp/utils.py
@@ -191,7 +191,7 @@ def find_thumbnail(video_path: str | Path, audio_path: str | Path) -> str | None
     return None
 
 
-async def get_subtitles(audio_path: str | Path, url: str, asr_engine: str, vinfo: dict, *, enable_corrector: bool = True) -> str:
+async def get_subtitles(audio_path: str | Path, url: str, asr_engine: str, vinfo: dict, *, enable_corrector: bool = False) -> str:
     # send subtitles
     subtitles = ""
     matched = await match_social_media_link(url)