Commit 9ff3c3b
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)