Skip to content

Commit

Permalink
Merge pull request #817 from IAHispano/formatter/main
Browse files Browse the repository at this point in the history
chore(format): run black on main
  • Loading branch information
blaisewf authored Oct 14, 2024
2 parents f2ad93d + 6a575de commit 8f9e05d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 3 additions & 2 deletions rvc/lib/tools/tts.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import edge_tts
import os


async def main():
# Parse command line arguments
tts_file = str(sys.argv[1])
Expand All @@ -15,10 +16,10 @@ async def main():
if tts_file and os.path.exists(tts_file):
text = ""
try:
with open(tts_file, 'r', encoding="utf-8") as file:
with open(tts_file, "r", encoding="utf-8") as file:
text = file.read()
except UnicodeDecodeError:
with open(tts_file, 'r') as file:
with open(tts_file, "r") as file:
text = file.read()
await edge_tts.Communicate(text, voice, rate=rates).save(output_file)
print(f"TTS with {voice} completed. Output TTS file: '{output_file}'")
Expand Down
6 changes: 4 additions & 2 deletions tabs/tts/tts.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,9 @@ def tts_tab():
)
input_tts_path = gr.Textbox(
label=i18n("Input path for text file"),
placeholder=i18n("The path to the text file that contains content for text to speech."),
placeholder=i18n(
"The path to the text file that contains content for text to speech."
),
value="",
interactive=True,
)
Expand Down Expand Up @@ -392,7 +394,7 @@ def toggle_visible_embedder_custom(embedder_model):
convert_button.click(
fn=run_tts_script,
inputs=[
input_tts_path,
input_tts_path,
tts_text,
tts_voice,
tts_rate,
Expand Down

0 comments on commit 8f9e05d

Please sign in to comment.