Skip to content

Commit

Permalink
base64 decode
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-XT committed Jan 24, 2025
1 parent a47f2e0 commit 7fff7c6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion agixt/Agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import logging
import json
import numpy as np
import base64
import jwt
import os
import re
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 7fff7c6

Please sign in to comment.