Add Korean Whisper models with automatic CTranslate2 conversion#7
Open
hoiyada7-maker wants to merge 2 commits into
Open
Add Korean Whisper models with automatic CTranslate2 conversion#7hoiyada7-maker wants to merge 2 commits into
hoiyada7-maker wants to merge 2 commits into
Conversation
- Add HF_CUSTOM_MODELS dict with 2 Korean models: * SungBeom/whisper-small-ko (small-ko) * seastar105/whisper-medium-ko-zeroth (medium-ko-zeroth) - Implement automatic CTranslate2 int8 conversion on first use - Add model_manager functions: is_hf_custom_model, resolve_model_path, download_and_convert - Update engine.load() to use resolve_model_path for local CTranslate2 models - Enhance SettingsWindow with model download progress UI and status hints - Skip re-download if model already converted (caching) - Fix ct2-transformers-converter discovery for pip --user installs - Add transformers>=4.23.0 dependency Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Replace fixed 30s chunks with adaptive silence-based cuts: - Add _ChunkAccumulator: buffers audio, cuts when >=5s buffered and 1s trailing silence detected, or unconditionally at 30s hard cap (Whisper context window) - Each chunk carries absolute start_time so timestamps remain accurate across variable-length chunks — eliminates chunk_index*30 drift from overlap - Both-mode silence detection combined across loopback+mic (cut only when both quiet) - Pipeline and MarkdownWriter updated to consume (chunk_index, start_time, audio) tuples - First transcription text now appears in ~10s vs ~42s with the old fixed 30s chunks Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
small-ko(SungBeom/whisper-small-ko, 244M): 한국어 특화 Whisper 소형 모델medium-ko-zeroth(seastar105/whisper-medium-ko-zeroth, 769M): Zeroth 코퍼스 파인튜닝 중형 모델모델 선택 시 HuggingFace에서 다운로드 후 CTranslate2 int8 형식으로 자동 변환, 이후에는 캐시 재사용.
Changes
constants.py:HF_CUSTOM_MODELS추가 (repo_id, 파라미터 수, VRAM 정보)model_manager.py: HF 모델 다운로드 + CTranslate2 변환 파이프라인 구현is_hf_custom_model(),resolve_model_path(),get_hf_model_local_path()ct2-transformers-converter자동 탐색 (pip --user 경로 포함)engine.py:load()에서resolve_model_path()호출 → 로컬 CTranslate2 경로 지원settings_window.py: 모델 변경 시 다운로드 UI 추가requirements.txt:transformers>=4.23.0추가Test Results
✅ 모델 목록에 small-ko, medium-ko-zeroth 표시
✅ small-ko 다운로드 → CTranslate2 변환 완료 (model.bin 생성)
✅ 이미 변환된 모델은 재다운로드 없이 스킵
✅ engine.load() 로컬 CTranslate2 모델 로드 성공
✅ 추론 정상 동작 확인
🤖 Generated with Claude Code