🩺 AI Sound Analyst & Health Manager for Industrial Assets


Team

Table of Contents

  1. Introduction
  2. Solution Architecture
  3. Software Designs
  4. Testing
  5. Conclusion
  6. Links

📖 Introduction

PERA-SAM (Predictive Equipment Reliability & Acoustics - Sound Analysis Manager) is a centralized acoustic management system designed to listen to the “heartbeat” of machines.

Traditional maintenance is reactive—fixing things only after they break. PERA-SAM shifts this to a predictive model. By processing acoustic signatures using FFT (Fast Fourier Transform) and MFCC, the system detects subtle frequency shifts caused by friction, imbalances, or wear before catastrophic failure occurs.

Currently prototyped for laptop cooling fans, server fans, engine fans, this system is designed to scale up to heavy industrial machinery and vehicle engines.

Solution Architecture

image

Folder Role Tech Stack
mimii_baseline/ Original Hitachi research code + raw dataset storage Python, Keras, librosa
model/server/ Production ML API — trains models, serves predictions Python, FastAPI, TensorFlow, uvicorn
pera-sam/ Web dashboard — user login, upload audio, view results React, Vite, TypeScript, TailwindCSS, Supabase

Step-by-Step: What happens when run the system

image

🎨 Software Design

1. Frontend Design Patterns (React & TypeScript)

The client application follows a strict Component-Based Architecture and utilizes several React-specific design patterns to ensure the UI is maintainable and scalable.

2. Backend Design Patterns (Python & FastAPI)

The backend ML API is highly modularized, strictly separating the heavy Machine Learning logic from the HTTP routing layer.

3. API & Machine Learning Design Strategy

Testing

The PERA-SAM application employs a comprehensive, multi-layered testing architecture to ensure reliability across the frontend, backend, and API integrations. Our approach separates testing into distinct areas to maintain code quality without disrupting the production structure.

Testing Overview

| Testing Phase | Framework/Tool | Target Scope | Execution / Location | Primary Focus | | :— | :— | :— | :— | :— | | Backend Testing | Pytest + httpx | FastAPI Backend | python -m pytest tests/ -v (in model/) | API logic, validation errors, and Python integration via TestClient. | | Frontend Unit | Vitest | React Utilities | npm run test (in root) | Isolated testing of pure utility functions, hooks, and uncoupled logic. | | Frontend Integration| React Testing Library | UI Components | npm run test (in root) | DOM rendering, component interactions, and simulated user workflows. | | API Endpoints | Postman | Live Server | Postman Runner | Automated post-request assertions (status codes, timings, payloads). |

Backend Testing (Pytest + FastAPI)

The standard and most robust way to test the FastAPI backend is using pytest combined with httpx (using FastAPI’s TestClient). This tests the API logic without needing a running server.

Frontend Unit Testing (Vitest)

Vitest is configured for the frontend to handle pure utility functions, hooks, and logic uncoupled from the React UI.

Frontend Integration Testing (React Testing Library)

Integration tests ensure that React components render correctly, interact with each other properly, and handle user events as expected.

API Endpoints Unit Testing (Postman)

Postman allows writing JavaScript assertions that run after an API request completes, making it ideal for automating API endpoint testing.

Conclusion

PERA-SAM represents a significant shift in industrial maintenance—moving away from reactive repairs to intelligent, proactive monitoring. By successfully leveraging acoustic signatures and machine learning (Autoencoders, FFT, and MFCC), this system proves that we can accurately detect the subtle early warning signs of equipment degradation before a catastrophic failure occurs. While currently prototyped and validated on cooling fans and small-scale motors, the architecture is inherently scalable. The ultimate vision for PERA-SAM is to be deployed across heavy manufacturing facilities, automotive fleets, and large-scale industrial plants—serving as the continuous, automated “ears” for mission-critical infrastructure, reducing unexpected downtime, and saving significant maintenance costs.