Implement Call Recording for STT and Replay #3

Merged
logan merged 11 commits from implement-call-recording into main 2026-01-03 19:38:05 -05:00
2 changed files with 6 additions and 3 deletions
Showing only changes of commit a7de6bfb04 - Show all commits

View File

@@ -34,6 +34,9 @@ EXPOSE 8001 8081
# Create and set up the configuration directory
VOLUME ["/configs"]
# Create the calls local cache directory
VOLUME ["/calls"]
# Set the working directory in the container
WORKDIR /app

View File

@@ -247,7 +247,7 @@ async def mqtt_lifecycle_manager():
def upload_audio(call_id):
if not AUDIO_BUCKET: return None
local_path = f"/tmp/{call_id}.mp3"
local_path = f"/calls/{call_id}.mp3"
if not os.path.exists(local_path): return None
try:
@@ -278,7 +278,7 @@ async def mqtt_lifecycle_manager():
if response.status_code == 200:
data = response.json()
LOGGER.debug(f"Response from OP25 API: {data}")
# LOGGER.debug(f"Response from OP25 API: {data}")
current_tgid = 0
current_meta = {}
@@ -344,7 +344,7 @@ async def mqtt_lifecycle_manager():
stream_url = get_current_stream_url()
recorder_proc = await asyncio.create_subprocess_exec(
"ffmpeg", "-i", stream_url, "-y", "-t", "300",
f"/tmp/{current_call_id}.mp3",
f"/calls/{current_call_id}.mp3",
stdout=asyncio.subprocess.DEVNULL,
stderr=asyncio.subprocess.DEVNULL
)