feat: Upgrade Whisper model to medium and increase beam size
- Change default model from small to medium for better accuracy - Increase beam_size from 5 to 8 for improved transcription quality - Add Whisper environment variables to start.sh for centralized config 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -368,7 +368,7 @@ class Transcriber:
|
|||||||
segments, info = self.model.transcribe(
|
segments, info = self.model.transcribe(
|
||||||
audio_path,
|
audio_path,
|
||||||
language="zh", # Use "nan" for Taiwanese/Hokkien, "zh" for Mandarin
|
language="zh", # Use "nan" for Taiwanese/Hokkien, "zh" for Mandarin
|
||||||
beam_size=5,
|
beam_size=8,
|
||||||
vad_filter=True,
|
vad_filter=True,
|
||||||
word_timestamps=add_punctuation,
|
word_timestamps=add_punctuation,
|
||||||
# Anti-hallucination settings
|
# Anti-hallucination settings
|
||||||
|
|||||||
5
start.sh
5
start.sh
@@ -22,6 +22,11 @@ SIDECAR_DIR="$PROJECT_DIR/sidecar"
|
|||||||
# Port 設定
|
# Port 設定
|
||||||
BACKEND_PORT=8000
|
BACKEND_PORT=8000
|
||||||
|
|
||||||
|
# Whisper 語音轉文字設定
|
||||||
|
export WHISPER_MODEL="medium" # 模型大小: tiny, base, small, medium, large
|
||||||
|
export WHISPER_DEVICE="cpu" # 執行裝置: cpu, cuda
|
||||||
|
export WHISPER_COMPUTE="int8" # 運算精度: int8, float16, float32
|
||||||
|
|
||||||
# PID 檔案
|
# PID 檔案
|
||||||
PID_FILE="$PROJECT_DIR/.running_pids"
|
PID_FILE="$PROJECT_DIR/.running_pids"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user