Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion xinference/core/media_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import io
import logging
import os
import tempfile
import threading
import time
import uuid
Expand Down Expand Up @@ -784,7 +785,8 @@ def tts_generate(
)

# Write to a temp .mp3 file and return its path
audio_path = f"/tmp/{uuid.uuid4()}.mp3"
temp_dir = tempfile.gettempdir()
audio_path = os.path.join(temp_dir, f"{uuid.uuid4()}.mp3")
with open(audio_path, "wb") as f:
f.write(response)

Expand Down
Loading