Spaces:
Running
on
A10G
Running
on
A10G
File size: 1,322 Bytes
96ea36d 88c0b9b 96ea36d 88c0b9b 96ea36d 88c0b9b 96ea36d 88c0b9b 96ea36d 88c0b9b 96ea36d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
import yaml
import os
# Read the YAML file
with open('config.yaml', 'r') as file:
config = yaml.safe_load(file)
# Extract values for each application
ttm_model_size = config['AudioCraft']['ttm_model_size']
tta_model_size = config['AudioCraft']['tta_model_size']
# Downloading the TTS models
print('Step 1: Downloading TTS model ...')
os.system(f'conda run --live-stream -n WavJourney python -c \'from transformers import BarkModel; BarkModel.from_pretrained("suno/bark")\'')
print('Step 2: Downloading TTA model ...')
os.system(f'conda run --live-stream -n WavJourney python -c \'from audiocraft.models import AudioGen; tta_model = AudioGen.get_pretrained("facebook/audiogen-{tta_model_size}")\'')
print('Step 3: Downloading TTM model ...')
os.system(f'conda run --live-stream -n WavJourney python -c \'from audiocraft.models import MusicGen; tta_model = MusicGen.get_pretrained("facebook/musicgen-{ttm_model_size}")\'')
print('Step 4: Downloading SR model ...')
os.system(f'conda run --live-stream -n WavJourney python -c \'from voicefixer import VoiceFixer; vf = VoiceFixer()\'')
print('Step 5: Downloading VP model ...')
os.system(f'conda run --live-stream -n WavJourney python -c \'from VoiceParser.model import VoiceParser; vp = VoiceParser(device="cpu")\'')
print('All models successfully downloaded!')
|