PlayMini

When should Mini speak?

Reachy Mini is my desktop robot. If a task takes time, I’d like to hear something useful along the way. But if I start speaking again, a half-finished reply shouldn’t suddenly come out of the speaker. That makes conversational timing a problem of both model jobs and audio queues.

In short, without the jargon

Mini is my small robot on the desk. When a task takes time, it can first say a short phrase, then give part of the answer, and finally the whole answer. I build and test the program that controls the order and the sound. If I start talking again, Mini has to give way and stop what it was saying.

Mini with two antennas and round camera eyes, drawn by Anders.

One question, up to three responses.

I built the flow so a quick question can go straight to its answer. On a longer task, two different things can happen while the main job is running.

  1. A phrase from the audio cache

    ACK · PCM

    The code has 34 fixed acknowledgment phrases and can prepare them as PCM audio samples. When an accepted task warrants a brief first reaction, Mini can queue the samples directly. If the phrase is missing from the cache, Mini skips it and avoids synthesizing it in the middle of the turn.

  2. An independent early answer

    response_phase=continuation

    While the main job continues in the background, a separate model job can write a short, useful reply at low reasoning effort. It gets its own request with response_length=short. The code releases the result only if the main job is still running and the user is still on the same turn.

  3. The final answer becomes speech

    TTS · PCM · acknowledgment

    The durable main job returns its final text. Local speech synthesis turns the text into audio for the player’s queue. Delivery is acknowledged once the queue drains. That acknowledgment describes playback. Whether I actually heard the words is a separate observation.

Local audio, persistent conversation.

The last configuration I checked selects codex_local. MLX Whisper large-v3-turbo transcribes audio locally, then a persistent Codex conversation in Mesh receives the text and conversation context. GPT-6 Luna is the default model for that job. The reply goes back to local Supertonic 3, where the M1 voice produces 44.1 kHz PCM audio.

Model-guided response planning is optional. The Danish profile also has a rule-based path that can choose a cached phrase and request an early answer for a background task. An English profile without the model-guided plan follows a simpler path. In “Trace a conversation turn” below, choose a quick reply, a longer task, or an interruption and follow what happens from microphone to speaker.

Inside Mini

Trace a conversation turn.

The difference between a model job and a speaking turn matters most when an answer arrives late. Pick a path and follow it from the microphone to the words the player is allowed to say now.

Explore a conversation

A cached acknowledgment, a separate early answer, and the main result can arrive at three different times. Each delivery must still belong to the current turn.

  1. Accept the task

    The main job can continue in the background.

  2. Optional acknowledgment

    A cached phrase can send a prepared PCM buffer straight to the audio queue.

  3. Request an early answer

    A separate foreground job gets a short response format and low reasoning effort.

  4. Check the turn again

    Drop the early answer if the main job finished, new speech is waiting, or the turn is stale.

  5. Deliver the main result

    Synthesize the final text. Delivery is acknowledged when the audio queue drains.

These code paths show the order of events and the conditions for delivery. The diagram contains no measured response times.

How does Mini choose its next reaction?

With model-guided response planning enabled, the code sends the transcript and conversation context to TypeSafe’s Jev 1.14.0. The planner can request a Noul probability that an acknowledgment would help, a Choice among fixed phrases, and a Score for the reasoning effort the reply warrants. The conversation model in Mesh writes the answer.

Follow a judgment

You ask Mini to look into something. While the assistant works on the answer, a fast decision model can judge whether a brief first reaction would help and choose a suitable phrase from a fixed list.

  1. Your question as text

    Speech recognition and conversation context provide the input.

  2. Judge and choose

    Would a brief first reaction help? Which fixed phrase fits?

  3. Rules in code

    Use the phrase only when the task is accepted and the judgment can be used.

  4. A brief first reaction

    Play the selected phrase, or go straight to the actual answer.

The model supplies a judgment. Code sets the boundaries, and the conversation assistant composes the full reply. The model doesn’t control the motors on its own.
What do Choice, Noul, and Score return?

The planner can put independent questions into one request. The three return types play different roles in the code.

Choice
Selects from fixed options. For example, the first phrase to use, rather than writing the full reply.
Noul
Returns the probability of yes to a precise question. For example, whether something in an image is worth commenting on.
Score
Places the task on a scale. For example, how much reasoning an early or full answer needs.
Choice, Noul and Score in the TypeSafe docs

The Jev voice planner is optional. A separate visual experiment uses OpenAI Decisions with GPT-6 Luna to evaluate context in shadow mode. I’ve also tested Clef Flash locally. These are distinct code paths with different jobs.

Once the head finds the face, where should the body turn?

Mini can turn toward me when I speak. Head tracking creates an interesting control problem. Once the head has centered the face, its x-coordinate in the image can look exactly right while the body is still pointing to the side.

Measure head and body

The SDK supplies a tracked face, the head’s orientation in world coordinates, and the measured body angle.

Is the face sample at most two seconds old, and may the body controller take over now?
YesCalculate the yaw error

Subtract the measured body yaw from the head’s world yaw. The controller limits the correction to 10° per second.

NoHold the body still

An old or replayed sample, a competing movement, or a busy conversation phase can block a new correction.

Starting a turn takes a larger error than continuing one. The 6° start and 3° stop thresholds reduce oscillation near the target.

One control loop owns the motor set_target calls. The body’s direction is calculated from SDK measurements. This controller needs no language model to choose a motor angle.
Glossary
44.1 kHz
44,100 audio samples per second. The number says how often audio is sampled, not how natural the voice sounds.
ACK
Short for «acknowledgment»: a small «I heard you» once Mini has accepted my turn in the conversation. It does not mean the task is done.
acknowledgment phrases
A short, fixed phrase Mini can say once it has accepted my turn. Like a shop assistant saying «just a second»: it does not mean the job is done.
audio cache
A store of sound made in advance. Then Mini does not have to make the sound at the moment it is needed.
audio queues
The queue of sound waiting to be played through the speaker. Whatever is at the front is said first.
background task
A task that can keep running while Mini talks with you. You can get part of the answer along the way.
Choice
A choice between options the program has listed in advance. The model ticks a box on the list and may not make up another answer.
Clef Flash
A small AI model that picks between fixed answers. It also says how sure it is.
codex_local
The name of one of Mini's setups. Here speech becomes text on my own computer, and Codex holds the conversation.
control loop
Code that measures and corrects again and again. Like when you keep your balance on a bike.
conversation context
What the program hands the model for its reply: earlier parts of the conversation and other information. That lets the model keep up, but there may be limits on how much is included.
decision model
A small, fast model that only makes a choice. It does not write the answer itself.
early answer
A short answer along the way, while the real answer is still coming.
GPT-6 Luna
An AI model from OpenAI that I use in some of the experiments. The setup decides which model writes Mini’s replies.
Jev 1.14.0
A service from TypeSafe that judges one narrow thing and answers in a fixed form, such as a choice or a number. It appears in earlier and optional Mini experiments, while the active shared judgments use OpenAI Decisions.
language model
An AI model that works with text. ChatGPT is built on a language model.
Local
On my own computer. A program running locally can still use the network or send data to another service.
M1
The name of the voice Supertonic 3 uses here to read Mini’s replies aloud.
main job
The big task that produces the final answer.
Mesh
The program that passes Mini’s question to Codex. It keeps track of the task and sends the answer back to Mini.
MLX Whisper large-v3-turbo
Whisper is an AI model that turns speech into text. The MLX version is made for Apple computers.
model jobs
A piece of work I send to an AI model. Like an order in a kitchen: it takes time before the dish is ready.
Model-guided response planning
An AI model helps decide whether Mini should say something right away and how much thought to give the answer.
Noul probability
An answer given as the probability that a statement is true, for example «80%». The number only applies to the question and the information the model was given.
PCM
Sound stored as raw measurements, without being packed down. It is almost ready for the speaker, but the format still has to suit the equipment.
persistent conversation
Mini can send your next question to the same conversation in Codex. That lets Codex build on what you’ve already discussed.
profile
A set of settings for Mini. They can control which language Mini speaks and how it responds.
reasoning effort
A setting for how much the model should think before it answers. High effort is often slower and more thorough, but it promises neither a certain response time nor a correct answer.
rule-based path
Mini follows instructions written into the program ahead of time. It can pick a short phrase without asking an AI model which one to use.
Score
A number on a scale, like a grade at school. It only makes sense once you know what is being measured and which scale is used.
SDK
A toolbox for programmers. My code uses it to read the robot's sensors and control its motors.
shadow mode
The model watches and guesses, but nobody uses its guess. That way I can see whether it would have been right.
Speech recognition
The computer listens to speech and writes the words down.
speech synthesis
The computer turns text into a voice.
Supertonic 3
An AI model that reads text aloud with a voice. It runs on my own computer.
transcribes
Writing speech down as text. Here an AI model does it.
TTS
Short for «text-to-speech». Text becomes speech.
turn
One round of the conversation: I say something, and Mini answers.
yaw
Turning to the right or left. Like when you shake your head.