forked from mrq/tortoise-tts
fix paths
This commit is contained in:
parent
e4e8ebfc55
commit
00e84bbd86
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -129,7 +129,6 @@ dmypy.json
|
||||||
.pyre/
|
.pyre/
|
||||||
|
|
||||||
.idea/*
|
.idea/*
|
||||||
tortoise/.models/*
|
.models/*
|
||||||
tortoise/random_voices/*
|
|
||||||
.custom/*
|
.custom/*
|
||||||
results/*
|
results/*
|
|
@ -290,7 +290,7 @@ class AudioMiniEncoder(nn.Module):
|
||||||
|
|
||||||
class TorchMelSpectrogram(nn.Module):
|
class TorchMelSpectrogram(nn.Module):
|
||||||
def __init__(self, filter_length=1024, hop_length=256, win_length=1024, n_mel_channels=80, mel_fmin=0, mel_fmax=8000,
|
def __init__(self, filter_length=1024, hop_length=256, win_length=1024, n_mel_channels=80, mel_fmin=0, mel_fmax=8000,
|
||||||
sampling_rate=22050, normalize=False, mel_norm_file='data/mel_norms.pth'):
|
sampling_rate=22050, normalize=False, mel_norm_file='tortoise/data/mel_norms.pth'):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
# These are the default tacotron values for the MEL spectrogram.
|
# These are the default tacotron values for the MEL spectrogram.
|
||||||
self.filter_length = filter_length
|
self.filter_length = filter_length
|
||||||
|
|
|
@ -28,7 +28,7 @@ def split_and_recombine_text(texts, desired_length=200, max_len=300):
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
parser.add_argument('--textfile', type=str, help='A file containing the text to read.', default="data/riding_hood.txt")
|
parser.add_argument('--textfile', type=str, help='A file containing the text to read.', default="tortoise/data/riding_hood.txt")
|
||||||
parser.add_argument('--voice', type=str, help='Selects the voice to use for generation. See options in voices/ directory (and add your own!) '
|
parser.add_argument('--voice', type=str, help='Selects the voice to use for generation. See options in voices/ directory (and add your own!) '
|
||||||
'Use the & character to join two voices together. Use a comma to perform inference on multiple voices.', default='pat')
|
'Use the & character to join two voices together. Use a comma to perform inference on multiple voices.', default='pat')
|
||||||
parser.add_argument('--output_path', type=str, help='Where to store outputs.', default='../results/longform/')
|
parser.add_argument('--output_path', type=str, help='Where to store outputs.', default='../results/longform/')
|
||||||
|
|
|
@ -82,10 +82,10 @@ def dynamic_range_decompression(x, C=1):
|
||||||
|
|
||||||
|
|
||||||
def get_voices():
|
def get_voices():
|
||||||
subs = os.listdir('voices')
|
subs = os.listdir('tortoise/voices')
|
||||||
voices = {}
|
voices = {}
|
||||||
for sub in subs:
|
for sub in subs:
|
||||||
subj = os.path.join('voices', sub)
|
subj = os.path.join('tortoise/voices', sub)
|
||||||
if os.path.isdir(subj):
|
if os.path.isdir(subj):
|
||||||
voices[sub] = list(glob(f'{subj}/*.wav')) + list(glob(f'{subj}/*.mp3')) + list(glob(f'{subj}/*.pth'))
|
voices[sub] = list(glob(f'{subj}/*.wav')) + list(glob(f'{subj}/*.mp3')) + list(glob(f'{subj}/*.pth'))
|
||||||
return voices
|
return voices
|
||||||
|
|
|
@ -164,7 +164,7 @@ def lev_distance(s1, s2):
|
||||||
return distances[-1]
|
return distances[-1]
|
||||||
|
|
||||||
class VoiceBpeTokenizer:
|
class VoiceBpeTokenizer:
|
||||||
def __init__(self, vocab_file='data/tokenizer.json'):
|
def __init__(self, vocab_file='tortoise/data/tokenizer.json'):
|
||||||
if vocab_file is not None:
|
if vocab_file is not None:
|
||||||
self.tokenizer = Tokenizer.from_file(vocab_file)
|
self.tokenizer = Tokenizer.from_file(vocab_file)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user