Spaces:
Runtime error
Runtime error
File size: 606 Bytes
f60a5bb |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
"""Factory for creating TTS system components."""
from typing import Optional, Tuple
from .config import Config
from .audio import NemoAudioPlayer
from .models import KaniModel
class TTSFactory:
"""Factory for creating TTS system components."""
@staticmethod
def create_system(config: Optional[Config] = None) -> Tuple[KaniModel, NemoAudioPlayer]:
"""Create a complete TTS system."""
if config is None:
config = Config.default()
player = NemoAudioPlayer(config)
model = KaniModel(config, player)
return model, player |