mirror of
https://github.com/rakuri255/UltraSinger.git
synced 2026-11-30 09:13:57 +09:00
"/" in whisper align model string get interpreted as path
This commit is contained in:
1 parent
2aa12d7954
commit
c75fd1b7e8
1 file changed
+3
-1
+3
-1
@@ -466,8 +466,10 @@ def CreateProcessAudio(process_data) -> str:
|
||||
def transcribe_audio(cache_folder_path: str, processing_audio_path: str) -> TranscriptionResult:
|
||||
"""Transcribe audio with AI"""
|
||||
transcription_result = None
|
||||
whisper_align_model_string = None
|
||||
if settings.transcriber == "whisper":
|
||||
transcription_config = f"{settings.transcriber}_{settings.whisper_model.value}_{settings.pytorch_device}_{settings.whisper_align_model}_{settings.whisper_align_model}_{settings.whisper_batch_size}_{settings.whisper_compute_type}_{settings.language}"
|
||||
if not settings.whisper_align_model is None: whisper_align_model_string = settings.whisper_align_model.replace("/", "_")
|
||||
transcription_config = f"{settings.transcriber}_{settings.whisper_model.value}_{settings.pytorch_device}_{whisper_align_model_string}_{settings.whisper_batch_size}_{settings.whisper_compute_type}_{settings.language}"
|
||||
transcription_path = os.path.join(cache_folder_path, f"{transcription_config}.json")
|
||||
cached_transcription_available = check_file_exists(transcription_path)
|
||||
if settings.skip_cache_transcription or not cached_transcription_available:
|
||||
|
||||
Reference in new issue
Block a user