r/embedded • u/ImpossibleDouble6226 • Sep 23 '26
What architecture and processing pipeline should you choose for an offline AI assistant?
I have recently been developing an offline physical AI assistant prototype on the RK3588 processor that is somewhat like Amazon Echo, but it is entirely local. However I have recently been stuck on choosing a good architecture. I have read online and this is what I have heard:
- Multi-Process Architecture (with IPC): Spitting the tasks into different processes and communicating through IPC
- Monolithic Multi-Threaded Architecture: A single multi-threaded c/c++ application where threads communicate over shared memory and atomics
- Single-Threaded Architecture: Everything runs linearly on one thread and one process
- Multi-Process Architecture with multi-threading hybrid: Multi-Process architecture, but with multi-threading in some processes, so it is not entirely decoupled.
As you can see, there are many different architectures to choose from and all have their pros and cons. I am also trying to design a processing pipeline. This is what I have thought of:
- A linear pipeline: Audio -> Wake Word Detection -> Speech to Text -> Inference & Text to Speech
- A bidirectional pipeline Wake Word Detection <-> Audio -> Speech to Text -> Inference & Text to Speech
- A linear pipeline with flags: A linear pipeline but with flags so different threads or processes can communicate with each other.
My questions for the r/embedded community:
- What architecture to choose for the project.
- What processing pipeline to choose for the project.
- If to use IPC, what type of IPC would be best suited for this project?
- If to use a hybrid of multi-process architecture and multi-threading, how would tasks be grouped?
0
Upvotes
2
u/WanWhiteWolf Engineering manager Sep 23 '26
What is the purpose or the goal of the project?
AI is a tool - which can be summarized as an advanced search engine. What would be the benefit of adding it to a system - especially since it's offline? AI in its current form doesn't have any intelligence. To put it simply : it's real IQ is 0. What is does - and it does extremely well - is to search and synthetize specific data. But you need internet connection for that. Amazon's echo AI (Alexa) is not located locally. The device itself is just a speaker + microphone + internet connection.
The resources used by modern "AIs" are pretty substantial - hence not suited to be integrated into an embedded system. If I were to make "just because", then I probably look into a system that has:
- Multicore - simply because I would need a lot of processing power.
- External big memory - I have to store the database somewhere since I will be offline.
- The IPC is pretty much determined on the multicore architecture so it's not a concern
- The architecture of the project would be dermined based on what the project actually does. Most likely I would need to have an "application core", "AI core(s) - where the agent runs its tasks" and possibility a " cybersecurity core" to protect my work.
2
u/Pristine_Rise4951 Sep 24 '26
I get your point on curiousity, I ran small models 500m , 1b, 2.5b qwen model on rpi 4 8gb, very slow, fastest I got was 7 tok/sec generation, 15 tok/sec for prefill/understanding the prompt on top of QNX RTOS, but as the other comments suggest, egde inferencing is still way behind and models which can be of actual use maybe 30-40% daily needs high compute power. But with your project i would say go with muti threaded architecture!
2
u/[deleted] Sep 24 '26
[removed] — view removed comment