Skip to content

Commit

Permalink
Re-format with black
Browse files Browse the repository at this point in the history
  • Loading branch information
nikochiko committed Oct 4, 2023
1 parent c0a239d commit 983c263
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
10 changes: 5 additions & 5 deletions recipes/LipsyncTTS.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import textwrap
import typing

from pydantic import BaseModel
Expand Down Expand Up @@ -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

Expand Down
4 changes: 1 addition & 3 deletions recipes/TextToSpeech.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down

0 comments on commit 983c263

Please sign in to comment.