diff --git a/backend/api/assets_serving.py b/backend/api/assets_serving.py index b9ad6037..527b16e3 100644 --- a/backend/api/assets_serving.py +++ b/backend/api/assets_serving.py @@ -99,5 +99,10 @@ async def serve_voice_sample( raise HTTPException(status_code=404, detail="Asset not found") media_type = _get_media_type(safe_filename) - logger.info(f"[Assets] Serving voice sample: {safe_filename} ({media_type}, {file_path.stat().st_size} bytes)") + file_size = file_path.stat().st_size + first_bytes_hex = "N/A" + if file_size > 0: + with open(file_path, 'rb') as f: + first_bytes_hex = f.read(16).hex() + logger.warning(f"[Assets] Serving voice sample: {safe_filename} ({media_type}, {file_size} bytes, first_16hex: {first_bytes_hex})") return FileResponse(file_path, media_type=media_type) \ No newline at end of file