Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
IT Security NachrichtenIT Security News Hourly Summary 2026-09-22 08h : 8 posts(22.09.2026 um 08:00 Uhr)
IT Security NachrichtenDeutsche Telekom startet internationale Reise-eSIM T-Travel(22.09.2026 um 07:41 Uhr)
IT Security NachrichtenDrei ergänzende Microsoft-365-Apps werden im Dezember eingestellt(22.09.2026 um 07:42 Uhr)
IT Security NachrichtenRechnungshof: EU nicht genug gegen Cyberangriffe gewappnet(22.09.2026 um 07:42 Uhr)
IT NachrichtenThis UCD expert is building advanced quantum sensing tech(22.09.2026 um 08:00 Uhr)
IT NachrichtenHow to watch BJK Cup Finals 2026: Free Streams & Schedule(22.09.2026 um 08:00 Uhr)
IT Security NachrichtenIT Security News Hourly Summary 2026-09-22 08h : 8 posts(22.09.2026 um 08:00 Uhr)
IT Security NachrichtenDeutsche Telekom startet internationale Reise-eSIM T-Travel(22.09.2026 um 07:41 Uhr)
IT Security NachrichtenDrei ergänzende Microsoft-365-Apps werden im Dezember eingestellt(22.09.2026 um 07:42 Uhr)
IT Security NachrichtenRechnungshof: EU nicht genug gegen Cyberangriffe gewappnet(22.09.2026 um 07:42 Uhr)
IT NachrichtenThis UCD expert is building advanced quantum sensing tech(22.09.2026 um 08:00 Uhr)
IT NachrichtenHow to watch BJK Cup Finals 2026: Free Streams & Schedule(22.09.2026 um 08:00 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

Building a Fully Local Voice-Controlled AI Agent on an 8GB M1 Mac (Without Melting It)

Hey everyone! 👋 Recently, I took on a challenging assignment for an AI/ML Developer Internship at Mem0. The goal was to build a local, voice-controlled AI agent that could transcribe audio, understand user intent, and execute local tools (…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!

Hey everyone! 👋



Recently, I took on a challenging assignment for an AI/ML Developer Internship at Mem0. The goal was to build a local, voice-controlled AI agent that could transcribe audio, understand user intent, and execute local tools (like creating files or writing code) based on that intent.



The catch? It had to run locally, and my daily driver is an Apple M1 MacBook Air with only 8GB of RAM.



Running a Speech-to-Text (STT) model and a Large Language Model (LLM) simultaneously on 8GB of unified memory is like trying to pack a suitcase that’s already full. Here is a breakdown of how I built Project Mercury, the architecture I used, and how I bypassed a massive audio processing headache.

🏗️ The Architecture

From the beginning, I knew I had to keep the stack incredibly lightweight. I avoided heavy frontend frameworks and bloated backends.



Here is the stack I landed on:



Frontend: Vanilla HTML, CSS, and JavaScript. (Zero build steps, zero framework overhead).



Backend: FastAPI (Python). It’s asynchronous, blazingly fast, and acts as the perfect REST bridge between the UI and the local ML models.



Tool Execution: A strictly sandboxed Python execution environment that routes all generated code and text files into a safe output/ directory.

🧠 Model Selection: The 8GB Unified Memory Diet

Because M1 Macs share memory between the CPU and GPU, I had to choose my models very carefully.




  1. Speech-to-Text: mlx-whisper

    Standard PyTorch implementations of Whisper would eat up too much RAM. Instead, I used mlx-community/whisper-base.en-mlx.

    Apple’s MLX framework is specifically optimized for Apple Silicon. By using the base.en model through MLX, it taps directly into the Mac's Neural Engine, resulting in near-instant transcriptions with a tiny memory footprint.


  2. Intent & Generation: Ollama + qwen2.5:0.5b

    I needed an LLM smart enough to accurately extract intents into JSON formats (e.g., classifying "Write a Python script" as a WRITE_CODE intent) but small enough to fit alongside Whisper.

    I chose Qwen 2.5 (0.5 Billion parameters) running via Ollama. At under 400MB, it is astoundingly capable for its size. It handles the JSON-based intent classification and the actual text/code generation flawlessly without pushing my Mac into Swap memory.




🚧 The Biggest Challenge: The ffmpeg Nightmare

The hardest part of this project wasn't the AI—it was the audio processing.



The Problem: When you record audio in a web browser using the MediaRecorder API, it defaults to creating a WebM/Opus file. Whisper, however, expects standard formats like WAV or MP3. Normally, backend developers solve this by installing ffmpeg on the server to decode the audio before passing it to Whisper.

But I wanted this project to be truly portable. Forcing users to deal with system-level ffmpeg installations via Homebrew is a horrible developer experience.



The Solution: I shifted the audio encoding entirely to the browser.

Instead of sending a WebM file to my FastAPI backend, I used the browser's native AudioContext API. When the user stops recording, the frontend takes the raw audio buffer, decodes it, and manually encodes it into a clean 16-bit PCM WAV (16 kHz, mono) file.



🛡️ Safety First: Human-in-the-Loop (HITL)

Giving an LLM the ability to write files to your local hard drive is inherently dangerous.



To solve this, I implemented a strict Human-in-the-Loop (HITL) system. Whenever Qwen detects a destructive intent (like CREATE_FILE or WRITE_CODE), the backend halts execution. The frontend pops up a modal showing exactly what the AI wants to do, what file it wants to name, and waits for the user to explicitly click Approve before a single byte is written to the disk.

🚀 Wrapping Up

Building Project Mercury taught me a ton about resource optimization, edge-computing, and the incredible power of Apple's MLX framework. If you want to check out the code or see it in action, check out the links below!



🔗 GitHub Repository: [https://github.com/KN-lang/Project-Mercury]

📺 Video Demo: [https://youtu.be/nee8HdI8ArI



 ]



Have you ever tried running local LLMs on lower-end hardware? Let me know what models you ended up using in the comments!

Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Building a Fully Local Voice-Controlled AI Agent on an 8GB M1 Mac (Without Melting It)

Thematisch verwandte Begriffe: Building, Fully, Local, VoiceControlled · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-61647 | NotebookLM MCP is an MCP server and HTTP service for interacting with Go…
Advisory →
TTS Reader • tsecurity.de Voice
tsecurity.de Icon
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel Rechts: nächster Artikel unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...

Zurück: vorheriger Vor: nächster
↗ Original-Quelle
Social Reaktionen Deine Reaktion zählt
Einstufung & Relevanz-Poll 0 Stimmen
In sozialen Netzwerken teilen 1-Klick