forked from killua/TakwayPlatform
11 lines
268 B
Python
11 lines
268 B
Python
|
from utils.tts.openvoice_utils import TextToSpeech
|
||
|
from app.dependencies.logger import get_logger
|
||
|
|
||
|
logger = get_logger()
|
||
|
|
||
|
#初始化全局tts对象
|
||
|
tts = TextToSpeech(use_tone_convert=True,device='cuda')
|
||
|
logger.info("TTS初始化成功")
|
||
|
|
||
|
def get_tts():
|
||
|
return tts
|