From 7fff7c6be7a7c529f7c34de3aaade18f23600f18 Mon Sep 17 00:00:00 2001 From: Josh XT Date: Fri, 24 Jan 2025 18:15:17 -0500 Subject: [PATCH] base64 decode --- agixt/Agent.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/agixt/Agent.py b/agixt/Agent.py index 73fb05ff92b3..fd37c113fa79 100644 --- a/agixt/Agent.py +++ b/agixt/Agent.py @@ -29,6 +29,7 @@ import logging import json import numpy as np +import base64 import jwt import os import re @@ -631,7 +632,7 @@ async def text_to_speech(self, text: str): filename = f"{self.agent_id}_{timestamp}.wav" audio_path = os.path.join(self.working_directory, filename) with open(audio_path, "wb") as f: - f.write(tts_content) + f.write(base64.b64decode(tts_content)) agixt_uri = getenv("AGIXT_URI") output_url = f"{agixt_uri}/outputs/{self.agent_id}/{filename}" return output_url