espnet2.sds.tts.chat_tts.ChatTTSModel
Less than 1 minute
espnet2.sds.tts.chat_tts.ChatTTSModel
class espnet2.sds.tts.chat_tts.ChatTTSModel
Bases: AbsTTS
ChaTTS Model
Initializes the ChatTTSModel class.
Ensures that the ChatTTS library is properly installed and initializes the TTS engine.
forward(transcript: str) → Tuple[int, ndarray]
Converts a text transcript into an audio waveform using the ChatTTS system.
- Parameters:transcript (str) – The input text to be converted into speech.
- Returns: A tuple containing:
- The sample rate of the audio (int).
- The generated audio waveform as a NumPy array of type int16.
- Return type: Tuple[int, np.ndarray]
warmup()
Perform a single forward pass with dummy input to pre-load and warm up the model.