diff --git a/recipes/LipsyncTTS.py b/recipes/LipsyncTTS.py index e0024f2d0..d250f746b 100644 --- a/recipes/LipsyncTTS.py +++ b/recipes/LipsyncTTS.py @@ -1,4 +1,3 @@ -import textwrap import typing from pydantic import BaseModel @@ -153,18 +152,19 @@ def render_output(self): def get_raw_price(self, state: dict): # _get_tts_provider comes from TextToSpeechPage if self._get_tts_provider(state) == TextToSpeechProviders.ELEVEN_LABS: - return LipsyncPage.get_raw_price(self, state) + \ - TextToSpeechPage.get_raw_price(self, state) + return LipsyncPage.get_raw_price( + self, state + ) + TextToSpeechPage.get_raw_price(self, state) else: return LipsyncPage.get_raw_price(self, state) def additional_notes(self): lipsync_notes = LipsyncPage.additional_notes(self) if tts_notes := TextToSpeechPage.additional_notes(self): - notes = textwrap.dedent(f"""\ + notes = f""" - *Lipsync* {lipsync_notes.strip()} - *TTS* {tts_notes.strip()} - """) + """ else: notes = lipsync_notes diff --git a/recipes/TextToSpeech.py b/recipes/TextToSpeech.py index 77773ca3f..1e5014986 100644 --- a/recipes/TextToSpeech.py +++ b/recipes/TextToSpeech.py @@ -130,9 +130,7 @@ def _get_eleven_labs_price(self, state: dict): return len(text) * 0.079 def _get_tts_provider(self, state: dict): - tts_provider = state.get( - "tts_provider", TextToSpeechProviders.UBERDUCK.name - ) + tts_provider = state.get("tts_provider", TextToSpeechProviders.UBERDUCK.name) # TODO: validate tts_provider before state lookup return TextToSpeechProviders[tts_provider]