First of all, many thanks to the author: @CjangCjengh for the code and reference implementation! This repository is some corrections to the source project, to correct some errors, and will be improved and optimized from time to time.
- Reference: CjangCjengh/tacotron2-japanese
- Put raw Japanese texts in ./filelists
- Put WAV files in ./wav
- (Optional) Download NVIDIA's pretrained model
- Open ./train.ipynb to install requirements and start training
- Download NVIDIA's WaveGlow model or WaveGlow model based on Ayachi Nene
- The pre-trained tacotron2 model is shown in this.
- Open ./inference.ipynb to generate voice(Please remember to modify the corresponding path where the model is stored!!)
Inference.ipynb
checkpoint_path = 'tacotron2_Model\\ayachi_nene_1'#"ayachi_nene_1"
model = load_model(hparams)
if torch.cuda.is_available() :
model.load_state_dict(torch.load(checkpoint_path)['state_dict'])
model.to(device).eval()
else :
model.load_state_dict(torch.load(checkpoint_path, map_location='cpu')['state_dict'])
model.to(device).eval()
Inference.ipynb
waveglow_path = 'W_Model\\model' #waveglow model
if hparams.cuda_enabled :
waveglow = torch.load(waveglow_path)['model']
waveglow.cuda().eval()#.half()
else :
waveglow = torch.load(waveglow_path, map_location='cpu')['model']
waveglow.to(device).eval()#.half()
for k in waveglow.convinv:
k.float()
denoiser = Denoiser(waveglow)
File ./hparams.py line 30
何かあったらいつでも話して下さい。学院のことじゃなく、私事に関することでも何でも
nanikaacltaraitsudemohanashItekudasai.gakuiNnokotojanaku,shijinikaNsurukotodemonanidemo.
何かあったらいつでも話して下さい。学院のことじゃなく、私事に関することでも何でも
nani ka acl tara itsu demo hanashi te kudasai. gakuiN no koto ja naku, shiji nikaNsuru koto de mo naNdemo.
何かあったらいつでも話して下さい。学院のことじゃなく、私事に関することでも何でも
:na)nika a)cltara i)tsudemo ha(na)shIte ku(dasa)i.:ga(kuiNno ko(to)janaku,:shi)jini ka(Nsu)ru ko(to)demo na)nidemo.
何かあったらいつでも話して下さい。学院のことじゃなく、私事に関することでも何でも
nanika acltara itsudemo hanashIte kudasai. gakuiNno kotojanaku, shijini kaNsuru kotodemo nanidemo.
Remember to change this line in ./inference.ipynb
sequence = np.array(text_to_sequence(text, ['japanese_cleaners']))[None, :]
Cleaners Classes | Model |
---|---|
japanese_cleaners | Model 1 |
japanese_tokenization_cleaners | Model 2 |
japanese_accent_cleaners | Model 3 |
Cleaners Classes | Model |
---|---|
japanese_tokenization_cleaners | Model 1 |
japanese_tokenization_cleaners | Model 2 |
Cleaners Classes | Model |
---|---|
japanese_tokenization_cleaners | Model 1 |
japanese_phrase_cleaners | Model 2 |
Cleaners Classes | Model |
---|---|
japanese_accent_cleaners | Model 1 |
Cleaners Classes | Model |
---|---|
japanese_accent_cleaners | Model 1 |