Trelis Voice Loop: Mac voice agent architecture and demo

Learn how Trelis Voice Loop combines Moonshine, Gemma 4 and Kokoro on a Mac, with turn detection, interruptions and optional conversation memory.

Player not loading? Watch on YouTube

Trelis Voice Loop is presented as a local AI voice agent for Mac, built in fewer than 500 lines of Python. The speaker describes it as a modular starting point for developers and demonstrates spoken requests, follow-up questions and interruptions.

The default pipeline uses Moonshine Base to transcribe microphone input, Gemma 4 to generate a text response, and Kokoro to produce speech. Smart Turn v3, described as open source, estimates whether the user has finished speaking. Echo cancellation filters out the agent's playback so speech detection can identify a user interruption and stop the response.

The examples expose limits. Turn detection sometimes responds during a hesitation or waits too long. The speaker says the implementation does not distinguish interruptions from backchannel acknowledgments such as agreement. Longer spoken responses can also add delay.

Options include text responses without speech, a waiting chime, conversation recording and memory stored in a file. The speaker uses the E4B model and reports weaker reasoning with the smaller 2B option.

A separate audio-input demo sends the latest spoken turn directly to Gemma. The speaker reports less reliable results than transcription first, especially with E2B. In the MLX library used here, only the latest turn accepts audio, so Moonshine still supplies text for conversation history. Model-driven turn and interruption detection through audio are discussed as possible future work.