gemini changes? idk
This commit is contained in:
@@ -43,10 +43,18 @@ class CallRecorder:
|
||||
try:
|
||||
self._process = await asyncio.create_subprocess_exec(
|
||||
*cmd,
|
||||
stdout=asyncio.subprocess.DEVNULL,
|
||||
stderr=asyncio.subprocess.DEVNULL,
|
||||
stdout=asyncio.subprocess.PIPE,
|
||||
stderr=asyncio.subprocess.PIPE,
|
||||
)
|
||||
logger.info(f"Recording started: {self._current_file.name}")
|
||||
|
||||
# Quick check if it died immediately (e.g. Pulse source not found)
|
||||
await asyncio.sleep(0.5)
|
||||
if self._process.returncode is not None:
|
||||
_, stderr = await self._process.communicate()
|
||||
logger.error(f"FFmpeg exited immediately ({self._process.returncode}): {stderr.decode()}")
|
||||
return False
|
||||
|
||||
logger.info(f"Recording process started: {self._current_file.name}")
|
||||
return True
|
||||
except Exception as e:
|
||||
logger.error(f"FFmpeg start failed: {e}")
|
||||
|
||||
@@ -34,6 +34,10 @@ async def on_call_end(data: dict):
|
||||
audio_url = await call_recorder.upload_recording(file_path, data["call_id"])
|
||||
if audio_url:
|
||||
data["audio_url"] = audio_url
|
||||
else:
|
||||
logger.error(f"Audio upload failed for call {data['call_id']}. Verify C2_URL and Node API Key.")
|
||||
else:
|
||||
logger.warning(f"No recording file generated for call {data['call_id']}. Is PulseAudio working?")
|
||||
await mqtt_manager.publish_metadata("call_end", data)
|
||||
await mqtt_manager.publish_status("online")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user