Final cleanup of lint output

This commit is contained in:
Heiko J Schick
2022-09-07 16:02:20 +02:00
parent 473f9c1499
commit 1185257000
+12 -6
View File
@@ -11,10 +11,21 @@ from fairseq.models.text_to_speech.hub_interface import TTSHubInterface
import scipy
import numpy as np
def read_input_file(name: str):
"""
Read lines from input file
"""
with open(name, "r", encoding="utf-8") as file:
lines = file.readlines()
return lines
def main():
"""
Defined starting point of source code.
"""
rate = 44100
full_wave_file = []
sentences = []
# Parsing command line arguments
parser = argparse.ArgumentParser(description='Convert teext to speech.')
@@ -30,13 +41,8 @@ def main():
TTSHubInterface.update_cfg_with_data_cfg(cfg, task.data_cfg)
generator = task.build_generator(models, cfg)
full_wave_file = []
rate = 44100
sentences = []
# Read input file
with open(args['input'], "r", encoding="utf-8") as file:
lines = file.readlines()
lines = read_input_file(args['input'])
# Convert to sentences
for line in lines: