perf(asr): 8 parallel cloud transcription uploads; benchmark keeps case order

qwen-audio-3.1-asr-flash on a 2 h 52 m Chinese talk: 215 s with 8 uploads
(local Whisper base: 23 min), 191 s with 16, so 8 is the default.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
周小舟
2026-10-01 15:30:21 +08:00
co-authored by Claude Opus 5.5
parent a3066604bb
commit 82f82e035e
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ from backend.services.ai_model_settings import chat_endpoint
from backend.utils.ffmpeg_utils import get_ffmpeg_path
UPLOAD_WORKERS = int(os.getenv('AUTOCLIP_ASR_CONCURRENCY', '4') or 4) # parallel chunk uploads
UPLOAD_WORKERS = int(os.getenv('AUTOCLIP_ASR_CONCURRENCY', '8') or 8) # parallel chunk uploads (16 gained only ~10 %)
class CloudTranscriptionError(RuntimeError):
+2 -2
View File
@@ -130,8 +130,8 @@ def main() -> int:
args = parser.parse_args()
cases = [c for c in json.loads(CASES.read_text(encoding='utf-8'))['cases'] if c.get('url')]
if args.cases:
wanted = args.cases.split(',')
cases = [c for c in cases if c['id'] in wanted]
by_id = {c['id']: c for c in cases}
cases = [by_id[i] for i in args.cases.split(',') if i in by_id] # run in the order given
baseline = json.loads(args.baseline.read_text(encoding='utf-8')) if args.baseline else None
REPORTS.mkdir(parents=True, exist_ok=True)
stamp = datetime.now().strftime('%Y%m%d-%H%M')