mirror of
https://github.com/Paillat-dev/viralfactory.git
synced 2026-01-02 09:16:19 +00:00
Add get_file_path method to GenerationContext class
This commit is contained in:
@@ -26,10 +26,13 @@ class GenerationContext:
|
||||
self.dir = f"output/{time.time()}"
|
||||
os.makedirs(self.dir)
|
||||
|
||||
def get_file_path(self, name: str) -> str:
|
||||
return os.path.join(self.dir, name)
|
||||
|
||||
def process(self):
|
||||
# IMPORTANT NOTE: All methods called here are expected to be defined as abstract methods in the base classes, if not there is an issue with the engine implementation.
|
||||
self.setup_dir()
|
||||
|
||||
script = self.scriptengine.generate()
|
||||
|
||||
timed_script = self.ttsengine.synthesize(script, self.dir)
|
||||
timed_script = self.ttsengine.synthesize(script, self.get_file_path("tts.wav"))
|
||||
|
||||
Reference in New Issue
Block a user