FAKeless Security is a high-fidelity mobile application engineered to combat the rising threat of audio deepfakes and unauthorized voice cloning. The system provides a multi-layered defense mechanism, combining cloud-based forensic analysis with localized, on-device machine learning (TFLite) to protect and verify digital audio assets.
graph TD
User((User)) --> UI[Flutter UI Layer]
subgraph Screens
UI --> Home[Home Dashboard]
UI --> Protect[Protect Screen]
UI --> Detect[Attacker Simulator]
UI --> History[Security History]
end
subgraph ServiceLayer
Protect & Detect --> API[ApiService]
Protect --> TFLite[TFLiteService]
UI --> AI[AiAgentService - Gemini]
History --> Storage[HistoryService]
API --> Crypto[CryptoService]
end
subgraph External
API --> CloudProtect[Protection API]
API --> CloudClone[Cloning API]
AI --> GoogleGemini[Google Gemini API]
end
subgraph LocalAssets
TFLite --> Model[delta_universal.tflite]
Storage --> Prefs[Shared Preferences]
end
- Use Case: Initial brand immersion and system health check.
- Logic: Verifies the presence of the
.envfile and initializes core services (TfliteService,CryptoService) before navigating to the onboarding or home screen.
- Use Case: User education for first-time security analysts.
- Interaction: Progressive disclosure of features (Protection vs. Detection) using high-quality Lottie animations.
- Use Case: The "Master Control" of the application.
- Role: Manages the
IndexedStackfor seamless navigation and hosts the Floating AI Assistant, ensuring security help is always one tap away regardless of the current screen.
- Use Case: Security Status Hub.
- Features:
- Hero Section: Quick-access button to start audio protection.
- Live Stats: Real-time count of protected files from
HistoryService. - Metric Education: Deep dive into PESQ (Quality) and STOI (Intelligibility) scores to help users understand security tradeoffs.
- Use Case: Active Audio Defensive Layer.
- Detailed Workflow:
- Input: User records audio (PCM 16k WAV) or uploads a file.
- Analysis: The
TfliteServiceanalyzes the audio and recommends a "Protection Scale" (1-5). - Defense: User applies a watermark via the
ApiService(Cloud) orTfliteService(Local Fallback). - Verification: Generates a Protection Certificate and displays a side-by-side Waveform Comparison.
- Use Case: Adversarial Attack Simulation (The "Red Team" tool).
- Detailed Workflow:
- Cloning Interface: Allows a user to input "Target Text."
- API Execution: Sends the source audio and text to a remote cloning model.
- Validation: Users listen to the "Cloned" output to verify if the protection applied in the previous step successfully disrupted the cloning process.
| Component | File | Use Case / Logic |
|---|---|---|
| Floating Assistant | floating_ai_assistant.dart |
Persistent Gemini chat UI. Handles voice commands and file uploads conversationally. |
| Wav Visualizer | waveform_visualizer.dart |
Custom-painter based waveform. Used to audit the "Adversarial Noise" applied during protection. |
| A/B Comparison | ab_comparison_player.dart |
Synchronized audio playback for comparing Original vs. Protected/Cloned audio. |
| Level Meter | level_meter.dart |
Real-time decibel tracking to ensure recording quality is sufficient for ML analysis. |
| Protection Cert | protection_certificate.dart |
Visual "Proof of Security" card displaying model version, scale, and time-thwarted stats. |
- Technology: Google Gemini Pro API.
- Use Case: Interprets user intent. If a user says "Protect this audio at maximum level," the service identifies the "intent" and returns a structured action that the UI uses to trigger
_submitProtection(5).
- Model:
delta_universal.tflite(8-bit quantized). - Use Case: Performs local signal processing. If the device is offline, this service applies a "Universal Watermark" layer directly to the WAV bytes without cloud dependency.
- Network: HTTPS Multipart requests.
- Endpoints:
/protect: Applies advanced adversarial perturbation./detect: Forensic analysis of audio segments.
- Persistence:
SharedPreferences+JSONSerialization. - Use Case: Maintains a permanent record of every protection session, allowing users to share or re-verify protected audio from weeks ago.
The app requires an environment file bundled in assets:
GEMINI_API_KEY: Required for the Chat Intelligence.PROTECTION_API_ENDPOINT: URL for the cloud protection model.
The system implements strict permission checks for:
Permission.microphone: For recording audio.Permission.storage: For saving/loading.wavfiles.
- Encryption:
CryptoServiceuses AES-256 to obfuscate local path identifiers in the preference store. - Data Lifecycle: Voice recordings are treated as ephemeral. Any temporary file generated during the "Trim" or "Protect" process is stored in the
TemporaryDirectoryand cleaned up by the OS when space is needed.
- Updating Models: Replace
assets/models/delta_universal.tfliteand update the version string inTfliteService. - UI Refresh: Centralized styles are located in
lib/core/theme.dart. Modernizing the app-wide look only requires updating theAppThemeclass.
FAKeless Security v1.0.0
Documentation updated: April 2026