diff --git a/.env b/.env index 10e5978074..1a588dc7a5 100644 --- a/.env +++ b/.env @@ -41,4 +41,6 @@ W2L_DOWNLOAD_SCRIPT_NAME=vocodes_process_upload.py TTS_CODE_DIRECTORY=/home/bt/dev/storyteller/storyteller-web/models/tacotron2 TTS_INFERENCE_SCRIPT_NAME=vocodes_inference.py -TTS_VOCODER_MODEL_FILENAME=waveglow_256channels_universal_v5.pt \ No newline at end of file +#TTS_VOCODER_MODEL_FILENAME=waveglow_256channels_universal_v5.pt # THIS SOUNDS HORRID +#TTS_VOCODER_MODEL_FILENAME=waveglow_256channels_v4_uberduck.pt # THIS IS TOO SMALL! 300MB vs 1.2 GB! +TTS_VOCODER_MODEL_FILENAME=waveglow_256channels_v4.pt diff --git a/debug/curl/seed.py b/debug/curl/seed.py index 074759f9bf..a04896e040 100755 --- a/debug/curl/seed.py +++ b/debug/curl/seed.py @@ -114,6 +114,8 @@ upload_tts_model('https://drive.google.com/file/d/1atFn4vm7mjkufXNK9TZS6J8WzISrA upload_tts_model('https://drive.google.com/file/d/1-rlJpi2jAsagn-UCStcCc_ITNycXgn2F/view?usp=sharing', 'Jorgen', session_other) upload_tts_model('https://drive.google.com/file/d/1togTNOEKnaarqWWrbZLSwIbZIZ8IT_qw/view?usp=sharing', 'edsheeransinging', session_nanashi) +upload_tts_model('https://drive.google.com/file/d/1OAiu0cZDyUJMemyLc0Btqw7zEQgiN81D/view?usp=sharing', 'Wakko Warner v2 ST21', session_nanashi) + #upload_tts_model('', '', session_other) #upload_tts_model('', '', session_other) #upload_tts_model('', '', session_other) diff --git a/models/tacotron2/vocodes_inference.py b/models/tacotron2/vocodes_inference.py index 3e9e451847..8e4487fd7a 100755 --- a/models/tacotron2/vocodes_inference.py +++ b/models/tacotron2/vocodes_inference.py @@ -20,14 +20,16 @@ args = parser.parse_args() import sys sys.path.append('waveglow/') -import numpy as np -import torch import shutil import json -from model import Tacotron2 +import numpy as np +import torch + from hparams import create_hparams -from train import load_model +from model import Tacotron2 +from layers import TacotronSTFT +from audio_processing import griffin_lim from text import text_to_sequence from denoiser import Denoiser @@ -41,20 +43,18 @@ print('========================================', flush=True) # NB(bt, 2021-05-31): Trying to get everything on the same device #torch.device("cuda" if torch.cuda.is_available() else "cpu") -hparams = create_hparams() -hparams.sampling_rate = 22050 -hparams.sampling_rate = 22050 # Don't change this -hparams.max_decoder_steps = 1000 # How long the audio will be before it cuts off (1000 is about 11 seconds) -hparams.gate_threshold = 0.1 # Model must be 90% sure the clip is over before ending generation (the higher this number is, the more likely that the AI will keep generating until it reaches the Max Decoder Steps) - # Fix bug running on CPU? #torch.set_default_dtype(torch.float16) # NB(bt, 2021-05-31): Perhaps this is blocking waveglow? It complains of the wrong tensor type. #torch.set_default_tensor_type('torch.DoubleTensor') # 2021-05-31 commented out #torch.set_default_tensor_type('torch.HalfTensor') # 2021-05-31 added -# Load synthesizer +hparams = create_hparams() +hparams.sampling_rate = 22050 # Don't change this +hparams.max_decoder_steps = 1000 # How long the audio will be before it cuts off (1000 is about 11 seconds) +hparams.gate_threshold = 0.1 # Model must be 90% sure the clip is over before ending generation (the higher this number is, the more likely that the AI will keep generating until it reaches the Max Decoder Steps) +# Load synthesizer checkpoint_path = args.synthesizer_checkpoint_path #model = load_model(hparams)