dongyh20
update space
1938217
raw
history blame contribute delete
626 Bytes
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}')