mirror of
https://github.com/harry0703/MoneyPrinterTurbo.git
synced 2026-02-21 16:37:21 +08:00
remove local_files_only=True
This commit is contained in:
parent
b4f6863dc4
commit
fc186b2801
@ -20,8 +20,7 @@ def create(audio_file, subtitle_file: str = ""):
|
||||
logger.info(f"loading model: {model_size}, device: {device}, compute_type: {compute_type}")
|
||||
model = WhisperModel(model_size_or_path=model_size,
|
||||
device=device,
|
||||
compute_type=compute_type,
|
||||
local_files_only=True)
|
||||
compute_type=compute_type)
|
||||
|
||||
logger.info(f"start, output file: {subtitle_file}")
|
||||
if not subtitle_file:
|
||||
@ -160,6 +159,7 @@ if __name__ == "__main__":
|
||||
task_id = "c12fd1e6-4b0a-4d65-a075-c87abe35a072"
|
||||
task_dir = utils.task_dir(task_id)
|
||||
subtitle_file = f"{task_dir}/subtitle.srt"
|
||||
audio_file = f"{task_dir}/audio.mp3"
|
||||
|
||||
subtitles = file_to_subtitles(subtitle_file)
|
||||
print(subtitles)
|
||||
@ -171,3 +171,6 @@ if __name__ == "__main__":
|
||||
script = s.get("script")
|
||||
|
||||
correct(subtitle_file, script)
|
||||
|
||||
subtitle_file = f"{task_dir}/subtitle-test.srt"
|
||||
create(audio_file, subtitle_file)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user