-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Speaker id argument #7
Comments
If you are using the LJS model that might be expected as it is a single speaker model. You could try using the LibrITTS. |
Just a note - when using LibrITTS you will also have to change the n_speakers parameter in config.json to 123:
|
Of course, thanks @karkirowle ! |
DOH! again, I closed to fast, still doesn't with LibrITTS.
|
Yeah - I realized that you will also have to adjust the "data_config" section: And lastly you will have to pick a speaker ID that actually exists. They are not numbered consecutively, but you have to look them up in that filelist (it's the numbers at the end of each line) |
Thanks again @Quasimondo For reference, here are the valid ids for LibriTTS :
|
Thank you for compiling this list! |
I add additional script extract available sid. See below https://github.com/yhgon/flowtron/blob/master/inference_colab.ipynb import os
import sys
import pandas as pd
import numpy as np
import random
from itertools import cycle
from data import load_filepaths_and_text
!cat /content/flowtron/filelists/libritts_speakerinfo.txt | tail -n +12 | head -n 10
filelist_path = "/content/flowtron/filelists/libritts_train_clean_100_audiopath_text_sid_shorterthan10s_atleast5min_train_filelist.txt"
def create_speaker_lookup_table(audiopaths_and_text):
speaker_ids = np.sort(np.unique([x[2] for x in audiopaths_and_text]))
d = {int(speaker_ids[i]): i for i in range(len(speaker_ids))}
print("Number of speakers :", len(d))
return d
audiopaths_and_text = load_filepaths_and_text(filelist_path)
speaker_ids = create_speaker_lookup_table(audiopaths_and_text).keys()
print(speaker_ids)
speakers = pd.read_csv('/content/flowtron/filelists/libritts_speakerinfo.txt', engine='python',header=None, comment=';', sep=' *\| *', names=['ID', 'SEX', 'SUBSET', 'MINUTES', 'NAME'])
speakers['FLOWTRON_ID'] = speakers['ID'].apply(lambda x: x if x in speaker_ids else -1)
female_speakers = speakers.query("SEX == 'F' and MINUTES > 20 and FLOWTRON_ID >= 0")['FLOWTRON_ID'].sample(frac=1).tolist()
male_speakers = speakers.query("SEX == 'M' and MINUTES > 20 and FLOWTRON_ID >= 0")['FLOWTRON_ID'].sample(frac=1).tolist()
print("females speakers : ", len(female_speakers), female_speakers )
print("male speakers : ", len(male_speakers), male_speakers ) |
There is a
Speaker id
argument ininference.py
:parser.add_argument('-i', '--id', help='Speaker id', type=int)
.Whenever I try to change it to something other than
0
, I get the following error :The text was updated successfully, but these errors were encountered: