Turning a Decade-Old Phone into a Fully Local Audio Memory Hub


Sitting in my drawer was an old Android phone—nearly ten years old, with a worn battery but a still-capable microphone and Wi-Fi chip. Instead of letting it collect dust, I decided to turn it into a dedicated edge audio node backed entirely by my homelab, capable of capturing spoken reminders and generating structured daily summaries without sending any audio to external cloud services.

Architecture Goal: 100% Local, Zero Cloud

From day one, the design goal was straightforward: nothing leaves the home network.

Audio capture, voice activity detection, speech-to-text (ASR), speaker diarization, voiceprint matching, transcript indexing, and daily summarization all run on local hardware. Keeping the entire pipeline self-hosted eliminates third-party cloud exposure—no external vendor ever receives audio clips, voice characteristics, or reconstructed timelines.

How the Pieces Fit Together

The system is built from four lightweight, self-hosted layers:

[Old Android Phone]
  ├─ 16kHz PCM Capture -> On-Device ONNX VAD -> M4A Segmenter (.m4a + .json)
  └─ Wi-Fi Batch Upload ──HTTPS + Bearer Token──▶ [Go Ingest Service]
                                                        │
                                             Local Disk + PostgreSQL
                                                        ▼
                                               [Go Background Worker]
                                                 ├─ Decode to 16kHz PCM
                                                 ├─ Local diarization & embeddings
                                                 ├─ Local vector speaker matching
                                                 ├─ Local ASR (on homelab)
                                                 └─ Save text & delete audio immediately
                                                        │
[Local LLM / Client] ◀── MCP (HTTPS + Token / stdio) ── [Go MCP Server]

1. Edge Capture & VAD Segmentation on the Old Phone

Running a continuous microphone stream on a decade-old phone requires being gentle on CPU and storage. I built a lightweight Android foreground service with a partial wake lock and a periodic watchdog to keep it running reliably.

Rather than recording endless hours of silence, the app feeds 16kHz mono PCM frames (32ms each) into an on-device ONNX Voice Activity Detection (VAD) state machine:

  • Pre-roll buffer: It keeps a rolling 2-second ring buffer in memory so the first word of a sentence is never clipped when someone starts speaking.
  • Predictable splitting: Once speech begins, frames are encoded on the fly into compact .m4a (AAC-LC) files. A segment automatically closes after 60 seconds of continuous silence, or once it hits a hard 10-minute cap.
  • Offline-friendly queue: Each closed clip gets a matching .json metadata file with its timestamps and SHA-256 checksum. A Wi-Fi-only background worker pushes pending clips to the home server over HTTPS and deletes the local copy only after receiving a 200 or 201 acknowledgment.

2. Local Ingestion & Idempotent Storage

On the homelab side, a custom Go service exposes an authenticated upload endpoint. It streams the incoming .m4a, verifies the SHA-256 hash on the fly, saves the file temporarily into a date-organized local directory, and records the job in PostgreSQL with ON CONFLICT (id) DO NOTHING so flaky Wi-Fi retries never create duplicates.

3. Local Diarization, Local ASR & Immediate Audio Deletion

Background workers claim pending recordings using PostgreSQL’s FOR UPDATE SKIP LOCKED and run everything on the homelab:

  1. Decode & Diarize: ffmpeg converts the clip to 16kHz PCM, and local sherpa-onnx diarization and speaker-embedding models split the audio into speaker turns and extract L2-normalized voiceprint vectors.
  2. Short-Speech Gate: If total detected speech is under 15 seconds (for example, a cough or brief background noise), the worker skips transcription altogether—before any speaker embedding is saved to the database—marks the clip done, and deletes the audio file immediately.
  3. Local Voiceprint Matching: Using pgvector, the worker compares extracted embeddings against known speakers in the local database. New voices receive anonymous labels until renamed or merged later.
  4. Local Speech-to-Text (ASR): Surviving speech segments are transcribed locally on the homelab using self-hosted open-source ASR models.
  5. Immediate Audio Deletion: As soon as transcription finishes and the structured text is committed to PostgreSQL, the .m4a audio file is deleted immediately from disk. Only the text transcripts, timestamps, and local speaker profiles remain for search.

4. Querying Memories via MCP

To make the archive useful for daily summaries without building a heavy custom frontend, I wrote a companion Go server implementing the Model Context Protocol (MCP) over authenticated Streamable HTTP and stdio. It exposes tools for pg_trgm fuzzy text search, timeline reconstruction (merging consecutive turns from the same speaker), and speaker management.

At the end of the day, a local LLM queries the timeline via MCP to summarize key topics and highlight any action items.

Hardware & Network Security Boundaries

Repurposing an old, unsupported Android phone comes with real operational risks that need basic guardrails:

  • Battery safety: Running a decade-old battery plugged in continuously with a wake lock can lead to swelling or overheating. I inspected the battery condition beforehand and monitor the device regularly.
  • Network isolation: Because an old Android device no longer receives security patches and holds an upload token, it is isolated on a restricted home LAN/VLAN with no direct internet exposure.
  • Encrypted & authenticated services: Both the ingestion endpoint and the MCP server are restricted to the local network, served over HTTPS (TLS), and protected with Bearer Token authentication.

Note: Recording and privacy laws vary by jurisdiction. This post focuses on the technical architecture of a personal homelab experiment; anyone building a similar audio pipeline should ensure it complies with local laws.

Wrapping Up

Giving a ten-year-old phone a second life as an edge audio node is a fun and practical homelab project. By keeping the entire pipeline—from on-device VAD to local diarization, local ASR, vector storage, and MCP-based summarization—inside the local network, every piece of the system remains transparent, modular, and completely under your own control.

Share this post

Enjoyed reading? Share it with your friends or colleagues!