mirror of https://github.com/coqui-ai/TTS.git
fix linter issues
This commit is contained in:
parent
a1839d3245
commit
16ce4e4805
|
@ -7,9 +7,9 @@ from argparse import RawTextHelpFormatter
|
||||||
from multiprocessing import Pool
|
from multiprocessing import Pool
|
||||||
from tqdm import tqdm
|
from tqdm import tqdm
|
||||||
|
|
||||||
def resample_file(filename):
|
def resample_file(func_args):
|
||||||
global args
|
filename, output_sr = func_args
|
||||||
y, sr = librosa.load(filename, sr=args.output_sr)
|
y, sr = librosa.load(filename, sr=output_sr)
|
||||||
librosa.output.write_wav(filename, y, sr)
|
librosa.output.write_wav(filename, y, sr)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
@ -59,6 +59,7 @@ if __name__ == '__main__':
|
||||||
print('Resampling the audio files...')
|
print('Resampling the audio files...')
|
||||||
audio_files = glob.glob(os.path.join(args.input_dir, '**/*.wav'), recursive=True)
|
audio_files = glob.glob(os.path.join(args.input_dir, '**/*.wav'), recursive=True)
|
||||||
print(f'Found {len(audio_files)} files...')
|
print(f'Found {len(audio_files)} files...')
|
||||||
|
audio_files = list(zip(audio_files, len(audio_files)*[args.output_sr]))
|
||||||
with Pool(processes=args.n_jobs) as p:
|
with Pool(processes=args.n_jobs) as p:
|
||||||
with tqdm(total=len(audio_files)) as pbar:
|
with tqdm(total=len(audio_files)) as pbar:
|
||||||
for i, _ in enumerate(p.imap_unordered(resample_file, audio_files)):
|
for i, _ in enumerate(p.imap_unordered(resample_file, audio_files)):
|
||||||
|
|
|
@ -59,9 +59,9 @@ abbreviations_fr = [(re.compile('\\b%s\\.' % x[0], re.IGNORECASE), x[1])
|
||||||
('excl', 'exclusivement'),
|
('excl', 'exclusivement'),
|
||||||
('boul', 'boulevard'),
|
('boul', 'boulevard'),
|
||||||
]] + [(re.compile('\\b%s' % x[0]), x[1])
|
]] + [(re.compile('\\b%s' % x[0]), x[1])
|
||||||
for x in [
|
for x in [
|
||||||
('Mlle', 'mademoiselle'),
|
('Mlle', 'mademoiselle'),
|
||||||
('Mlles', 'mesdemoiselles'),
|
('Mlles', 'mesdemoiselles'),
|
||||||
('Mme', 'Madame'),
|
('Mme', 'Madame'),
|
||||||
('Mmes', 'Mesdames'),
|
('Mmes', 'Mesdames'),
|
||||||
]]
|
]]
|
||||||
|
|
Loading…
Reference in New Issue