chore: backup before migration to new repo

This commit is contained in:
Warren
2026-04-23 16:46:02 +08:00
parent 13dd3b30f3
commit 59809dae1f
40 changed files with 5566 additions and 1783 deletions

View File

@@ -65,12 +65,20 @@ def run_asr(video_path, output_path, uuid: str = ""):
if publisher:
publisher.info("asr", "Loading Whisper model...")
model = WhisperModel("tiny", device="cpu", compute_type="int8")
# Use small model with CPU (MPS not supported by faster_whisper)
# small 模型在準確率和速度間取得最佳平衡
model = WhisperModel("small", device="cpu", compute_type="int8")
if publisher:
publisher.info("asr", f"Transcribing: {video_path}")
segments, info = model.transcribe(video_path, beam_size=5)
# Transcribe with VAD filter for better accuracy
segments, info = model.transcribe(
video_path,
beam_size=5,
vad_filter=True,
vad_parameters=dict(min_silence_duration_ms=500, speech_pad_ms=200),
)
if publisher:
publisher.info("asr", f"ASR_LANGUAGE:{info.language}")