Mehran Toosi · Principal Software Engineer · Copenhagen

blog · · 10 min read

Cue 2: hearing when someone has finished speaking

Cue 2 is a turn-taking model for voice agents in 30 languages. It pairs the Cue-0.4B text model, which decides what an interruption in a live transcript means, with a new audio model of 7.85M parameters that hears when the user has finished speaking. The audio model runs every 100 ms on the iPhone’s Neural Engine in about 1.3 ms and works beside an existing pause timer.

The answer starts a median of 280 ms after the last word where the pause timer alone waits 1,881 ms, and the share of requests in which the answer starts before the request is finished falls from 30.6% to 8.6%. Those numbers come from generated test requests in 30 languages spoken by two voices outside the training data, and the gain is much smaller on recordings of people talking to each other.

  1. 01 / 05

    The pause timer

    Cue-0.4B reads the speech recognizer’s transcript and decides what an interruption means and which new turns can be answered at once, and it never decided when a turn had ended. A pause timer did that, ending the turn 1.5 seconds after the recognizer’s transcript last changed. The timer makes every answer start late, and it cuts off a speaker who stops to think in the middle of a request because it can’t tell a pause from an end. Many voice pipelines that put a speech recognizer in front of a language model end turns with a silence rule like this, so Cue 2 needed to tell a pause from an end and decide sooner than the timer.

    I measured the timer before training anything, on 60 synthetic English requests with real recognizer logs, 30 of them with a pause in the middle. It waited a median of 1,908 ms after the last word and ended the turn inside 8 of the 30 pauses.

    Most of those cut-ins came from the recognizer, because a word reaches the transcript some time after it is spoken and the first word after a pause takes longest, so the timer often ran out while the person was already talking again. The figure shows a request from the test set I used later, where “my” reaches the transcript 665 ms after it is spoken and the timer ends the turn in the middle of “my calendar”. Holding the timer while a voice detector still heard speech removed all 8 cut-ins and kept the wait at 1,913 ms, so that became part of the plan.

    The wait itself needed something that recognises an end before the timer runs out. Smart Turn from Pipecat is an open audio model that does this. It decided quickly on my test set and cut into most of the pauses, because it is built to judge a turn once the speaker has already been silent for a moment.

    My first idea was to keep the audio side simple and teach Cue’s text model whether the words so far form a complete request. I trained a fourth output on Cue’s frozen layers with 92,988 texts in 30 languages, and the existing outputs stayed bit-identical. It reached an AUROC of 0.925. The simulation ended a turn when it and an audio signal agreed, which gave a median wait of 625 ms and cut into 6 of the 30 pauses. All six came after words that are complete by themselves, like “Got it” and “Repeat after me”. The transcript alone can’t tell those from an end, so the voice had to decide.

    released weights run with cue_audio.py on a Mac · recognizer times simulated from measurements of Apple’s recognizer, as in the report
  2. 02 / 05

    A small audio model that listens every 100 ms

    I started from the Smart Turn v3.2 weights, kept its encoder and head design, and changed three things about it. The encoder is the audio encoder of Whisper tiny. Whisper’s front end normalises each window, which hides how loud you are, so my model reads a four-second window at the level it was recorded. Two side channels tell it when the assistant’s own voice was playing and how loud the playback was. The model also gives its outputs on every tick and every 20 ms frame, because an assistant listens all the time and doesn’t wait for silence before it asks.

    The model reads the newest four seconds every 100 ms as 80 log-mel bins by 400 frames. The encoder turns that into 200 positions of 20 ms, a frame head says whether you are speaking in each of them, and a tick head pools all 200 positions into six outputs. The end-of-turn rule uses p(end of turn), the probability that you won’t speak in the next two seconds. The other outputs predict when you will speak again and whether an interruption is over or was only a short “mm-hm”.

    The figure shows two ticks of the same request, recorded from the released weights. The tick head puts most of its weight on the moment the word “on” ended when it scores a tick inside the pause, and it gives end of turn 0.025 and 0.957 for you starting again between one and two seconds later. After the last word it puts its weight near the end of “Tuesday?” and gives 0.9993.

    The training audio is 1,028 hours in 35 languages. About half of it is Smart Turn’s own data of single-speaker clips, and the rest is AMI meeting recordings with word times written by people, read sentences from FLEURS, parliament speech from VoxPopuli, and scenes I assembled from Cue’s phrase banks with Supertonic and Kokoro voices. The scenes join requests and replies with pauses, so every boundary is known to the sample. A tick in the silence after someone speaks is labelled as an end when they don’t speak again within two seconds. I listened to a sample of the labelled clips before training, and the two speakers were swapped in many of them because a rule that assigned them had them the wrong way round.

    released weights · attention-pooling weights read from the tick head
  3. 03 / 05

    Pauses that sound like pauses

    The first full run did well on the assembled scenes and gave no gain on the AMI meetings. I tried a small network that combined it with the text output, and the combination was no better than the audio alone. The combination cut into 6.8% of the pauses in the test scenes at a 450 ms wait, and the audio model on its own cut into 6.4% at 470 ms.

    The problem was in the scenes I had assembled, because Supertonic and Kokoro speak each piece separately and every piece ends with the falling tone of a finished sentence. A pause in the middle of a request therefore sounded like an end. I needed requests spoken with real pauses in 30 languages, and I didn’t have recordings like that.

    I had the live voice model GPT-Live-1.1 speak requests from Cue’s phrase banks with pauses where the instructions asked for them. 30% of the lines are plain, 55% have a silent pause of 0.5 to 2.5 s at a given word and 15% have a hesitation sound. A pilot with ten lines per language put the pause where I asked in 88 of 90 lines. The pitch before a pause stayed at 0.99 of the line’s median and fell to 0.87 at the end of a request, which is what the assembled scenes were missing. The pilot had its instructions in English and I could hear an accent in the Danish, Polish and Russian lines, so every language got instructions written in that language.

    The labels for these lines come from the audio afterwards, from the level and the session’s own transcript, and a pause inside a request is never an end however long it is. Seven voices went into training, one into validation and two into the test set, so the test voices are ones the model never heard. Each doubling of the generated lines shortened the wait at the same cut-in rate, from 866 ms with none to 599, 423 and 334 ms with 17,657 lines, and the gain per line was getting smaller. The released model is the last of those runs, trained for 30,000 steps on one RTX 4090.

    Table 7 of the report · pitch numbers from the 90-line pilot in section 5
  4. 04 / 05

    Two packages on the phone

    I converted the model with coremltools and started with one float16 package, because the Neural Engine computes in float16, and the log-mel front end didn’t survive that. The power of quiet audio is smaller than float16 can hold at full precision, and the figure shows that 96% of the values in one quiet window of the test request are under that limit. One float16 model on the Neural Engine put 462 of 4,104 ticks on the other side of 0.995 compared with PyTorch.

    The release is two packages for that reason. The front end runs in float32 on the CPU and is 0.7 MB, and the encoder with its heads runs in float16 on the Neural Engine and is 15.9 MB. Only 9 of the 4,104 ticks change side that way. A tick takes 1.3 ms on an iPhone 17 Pro Max and 4.3 ms while the GPU is busy generating the main model’s answer, out of the 100 ms between ticks.

    Replaying test requests through the production audio listener showed one more problem, because the default sample-rate converter took 4 to 9 dB off above 6 kHz and the model then ended fewer turns early. The mastering-quality converter keeps the band up to 8 kHz, and with it 45 of 48 replayed requests ended within 150 ms of the offline replay.

    histogram computed from the request above · Tables 18 and 19 of the report
  5. 05 / 05

    My own voice and the three test sets

    I picked the first thresholds on the validation voice. θ was 0.995 for an early end and τ was 0.7 for letting the timer through, which was the fastest setting that cut into at most 4% of the validation requests. I then used it in voice sessions on my phone in English, and no turn ended early. The probability at my ends of speech was between 0.74 and 0.92 by the time a turn was decided, and 0.44, 0.66 and 0.82 at 300, 600 and 1,000 ms after one of them, where the generated test voices have medians of 0.980, 0.994 and 0.996.

    Playing 24 test requests from a laptop speaker into the phone showed part of the reason, because the room and the microphone lowered the median probability 300 ms after an end from 0.983 to 0.894. The probability inside pauses stayed low on both paths, so the released rule moved both thresholds down. θ is 0.6, under the values the model reached at my ends, and τ is 0.3, over its values inside pauses. The runtime reads both from cue-audio.json, so they can change without a new model.

    Cue 2 cuts into 8.6% of the generated test requests and waits a median of 280 ms after the last word, where the timer alone cuts into 30.6% and waits 1,881 ms. It cuts into fewer requests than the timer in each of the 30 languages. The setting chosen on the validation voice cuts into 2.5% and waits 800 ms, so the released setting accepts more cut-ins for a much shorter wait.

    Recordings of people talking to each other give a different result. AMI meetings have four people in a room, and an early end at 0.6 cuts into 21.7% of their pauses where the timer cuts into 5.7%, because a pause in a meeting is often filled by someone else and the probability inside a pause rises to 0.64 within 1.5 s. The Open Yap sample is friends talking on a call on their own phones, and the released rule and the timer are close there, at 5.9% and 5.5% of pauses and waits of 1,800 and 1,836 ms. The model is much less sure at the ends of that speech, with a median probability of 0.22 a second after an end. Neither set is people talking to an assistant, and the request speech in the training data and in the main test set is generated.

    section 8 of the report

The audio model can sit beside any voice pipeline that has a speech recognizer and a silence rule. It takes the newest four seconds of 16 kHz audio with 240 samples before them, a flag for each 10 ms in which the assistant’s own voice was playing and the playback volume, and it returns six tick outputs and a speech probability for each 20 ms. The release has the two Core ML packages for iOS 18 and macOS 15, the PyTorch weights and cue_audio.py, which runs the model on a wav file and replays the rule with your recognizer’s update times. The rule keeps the old timer as the fallback, so a missing or late model gives the old behaviour. The thresholds come from my English voice sessions.

The model also has outputs for interruptions over the assistant’s own voice that the released rule doesn’t use yet. They find the start of an interruption in the assembled scenes 299 ms after it begins, and an estimate from the first transcript update comes 741 ms after it.

Cue 2 is released under Apache-2.0 together with the unchanged Cue-0.4B text model and a technical report. The audio model is derived from Smart Turn v3.2, which is under the BSD 2-Clause license. Thanks to Pipecat and Daily for Smart Turn and its data, and to the makers of AMI, FLEURS, VoxPopuli and the Open Yap sample.