tts Text to Speech with Conversion

import torch
from TTS.api import TTS

# Get device
device = "cuda" if torch.cuda.is_available() else "cpu"

# List available 🐸TTS models
print(TTS().list_models())

# Init TTS
#tts = TTS("tts_models/multilingual/multi-dataset/xtts_v2").to(device)

tts = TTS("tts_models/de/thorsten/tacotron2-DDC")
tts.tts_with_vc_to_file(
    "We are seeing multiple sensors with bad values, please pay attention!",
    speaker_wav="/data/apu_america.wav",
    file_path="/data/myapu3.wav"
)

Leave a Reply

Your email address will not be published. Required fields are marked *


*

This site uses Akismet to reduce spam. Learn how your comment data is processed.