diff --git a/chattts/bentofile.yaml b/chattts/bentofile.yaml index dc082756..843e8bca 100644 --- a/chattts/bentofile.yaml +++ b/chattts/bentofile.yaml @@ -8,6 +8,9 @@ include: python: requirements_txt: "./requirements.txt" lock_packages: true +docker: + system_packages: + - libsox-dev envs: - name: CHAT_TTS_REPO value: https://github.com/2noise/ChatTTS.git diff --git a/chattts/service.py b/chattts/service.py index 67e5d279..74d765a6 100644 --- a/chattts/service.py +++ b/chattts/service.py @@ -4,6 +4,7 @@ from typing import Annotated import sys import shutil import io +import pathlib import bentoml from bentoml.validators import ContentType @@ -46,7 +47,7 @@ class Main: self.chat.load_models(compile=False) # Set to True for better performance @bentoml.api - def tts(self, text: str = "PUT YOUR TEXT HERE") -> Annotated[bytes, ContentType("audio/wav")]: + def tts(self, text: str = "PUT YOUR TEXT HERE") -> Annotated[pathlib.Path, ContentType("audio/wav")]: import torch import torchaudio