From 6f43e50f8fc2e26686c26c3ac477e5f3b8837805 Mon Sep 17 00:00:00 2001 From: Jordi Mas Date: Mon, 16 Sep 2024 15:46:39 +0200 Subject: [PATCH] Fix --- open_dubbing/dubbing.py | 1 + open_dubbing/main.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/open_dubbing/dubbing.py b/open_dubbing/dubbing.py index 452f386..ad26190 100644 --- a/open_dubbing/dubbing.py +++ b/open_dubbing/dubbing.py @@ -126,6 +126,7 @@ def __init__( self.utterance_metadata = None self._number_of_steps = number_of_steps self.tts = tts + self.stt = sst self.device = device self.cpu_threads = cpu_threads diff --git a/open_dubbing/main.py b/open_dubbing/main.py index 9ee1776..e784a3c 100644 --- a/open_dubbing/main.py +++ b/open_dubbing/main.py @@ -209,10 +209,10 @@ def main(): stt = SpeechToTextWhisperTransfomers(args.device, args.cpu_threads) else: stt = SpeechToTextFasterWhisper(args.device, args.cpu_threads) - elif args == "faster-whisper": + elif args.stt == "faster-whisper": stt = SpeechToTextFasterWhisper(args.device, args.cpu_threads) else: - stt = SpeechToTextFasterWhisper(args.device, args.cpu_threads) + stt = SpeechToTextWhisperTransfomers(args.device, args.cpu_threads) check_languages(args.source_language, args.target_language, tts, stt)