Spaces:
Running
on
Zero
Running
on
Zero
File size: 626 Bytes
1938217 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
from .speech_generator import SpeechGeneratorCTC, SpeechGeneratorCTCQwen, SpeechGeneratorCEQwen, SpeechGeneratorCosyVoice
def build_speech_generator(config):
generator_type = getattr(config, 'speech_generator_type', 'ctc')
if generator_type == 'ctc':
return SpeechGeneratorCTC(config)
elif generator_type == 'ctc_qwen':
return SpeechGeneratorCTCQwen(config)
elif generator_type == 'ce_qwen':
return SpeechGeneratorCEQwen(config)
elif generator_type == 'cosy_qwen':
return SpeechGeneratorCosyVoice(config)
raise ValueError(f'Unknown generator type: {generator_type}')
|