modify localpath to docker path :/

main
pluja 2023-04-28 15:55:12 +02:00
rodzic f5947f03d9
commit 399c9e535c
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -88,11 +88,11 @@ def generate_settings_markup(chat_id: str) -> InlineKeyboardMarkup:
return InlineKeyboardMarkup(inline_keyboard=keyboard)
async def text_to_voice(text: str, language: str = None) -> BytesIO:
binary_path = "/home/whoami/PROJECTS/openai-telegram-bot/piper/piper"
binary_path = "/app/piper/piper"
if language is None:
language = detect(text[0:80])
model_path = f"/home/whoami/PROJECTS/openai-telegram-bot/piper/voices/{language}.onnx"
model_path = f"/app/piper/voices/{language}.onnx"
# Generate a unique temporary filename with '.ogg' extension
with tempfile.NamedTemporaryFile(suffix=".ogg", delete=False) as tmp:
tmp_filename = tmp.name