mirror of
https://github.com/JefferyHcool/BiliNote.git
synced 2026-09-07 00:27:37 +08:00
first commit
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
from app.transcriber.whisper import WhisperTranscriber
|
||||
print('实例化transcriber')
|
||||
# TODO:后面需要加入逻辑选择
|
||||
_transcriber = None
|
||||
|
||||
def get_transcriber(model_size="base", device="cuda"):
|
||||
global _transcriber
|
||||
if _transcriber is None:
|
||||
print('加载_transcriber')
|
||||
_transcriber = WhisperTranscriber(model_size=model_size, device=device)
|
||||
return _transcriber
|
||||
Reference in New Issue
Block a user