Skip to content

Pinna 0.6.0

Latest

Choose a tag to compare

@github-actions github-actions released this 26 Nov 22:06
· 223 commits to main since this release

The satellite hears you through one stream from all seven microphones, and you can say the wake word over a reply or music. It no longer runs out of memory after hours. MCP servers with many tools, or with a sign-in, now work.

Before you update

  • The new microphone stream hasn't run on a satellite yet. It was
    measured on recordings from an Echo Dot (2nd gen) and an Echo (2nd gen),
    played through the same code on a computer. If the wake word or your
    requests work worse after the update, switch back to 0.5.0 under
    System › Updates: see
    Switch to the other version.
  • Home Assistant hears a different stream. Its requests used WebRTC's echo
    canceller, which also muted you while the satellite played. They now use the
    same stream as the wake word.
  • An MCP server you added earlier keeps its tools on. Only a server you
    add, or whose address or sign-in you change, after the update starts with
    its tools off. A server that failed before with "response is too large",
    such as ha-mcp, now lists all of its tools, all of them on. If
    Assistant › Tools says that tools are left out, select All off
    under the server's Its tools and turn on the few a voice request needs.

Highlights

One microphone stream, from all seven microphones

In 0.5.0 the echo cancellation that requests heard also muted a person who
talked while the satellite played, and its reference, the copy of what the
satellite plays, arrived about 2 seconds after its echo. Now one stream
averages all seven microphones and removes the satellite's own sound with a
linear echo canceller that doesn't mute you, so you can say the wake word over
a reply or music. Its reference is the speaker's channel, which the microphone
interface delivers alongside the microphones, so the two can't drift apart.
The wake word, Home Assistant and your speech-to-text service all hear this
stream. The ring still points at the person speaking.

On recordings, the echo cancellation removed about 22 dB of the satellite's
own music and speech in a typical second on an Echo Dot (2nd gen), and about
20 dB on an Echo (2nd gen). A person talking over music no longer throws it
off. In the first seconds of new audio more echo remains, while the canceller
adapts to the room.

If the stream delivers nothing for a second, the satellite averages the raw
microphones itself, without echo cancellation, and tries the stream again
every minute. System › Logs then shows
microphone: the processed stream delivers nothing. See
Microphones.

The satellite no longer runs out of memory

With the microphones on, Pinna's main service, pinnad, grew by about 1.7 MB a
minute on the Echo (2nd gen), and more slowly on the Echo Dot (2nd gen), until
the memory was gone. The satellite then stopped answering the dashboard and
SSH for hours. The memory was freed, but never given back. pinnad now uses a
different memory allocator: over an hour with the microphones on, on an Echo
(2nd gen), it stayed between 46 and 58 MB and used a little less CPU.

If pinnad still grows past 200 MB, the satellite stops it and starts it again
two seconds later, instead of hanging.

MCP servers with many tools

ha-mcp lists 77 tools in a reply of almost 300 KB. The satellite read at most
256 KiB and kept 32 tools of a server, so such a server failed with "response
is too large". It now reads tool lists up to 1 MiB and keeps up to 128 tools
of a server. An expired tool list no longer holds up a voice request.

When you add a server that lists more than 32 tools, or change its address or
sign-in, all of its tools start off. Most of ha-mcp's tools manage Home
Assistant itself, such as removing automations, so turn on only the few a
voice request needs. Under Assistant › Tools, Its tools starts
with All on and All off, and the server's row says how many tools are
on, such as 0 of 77 tools on.

The brain takes at most 64 tools in a request: Pinna's first, then each
server's in the order the page lists them. While more than 64 are on, the
Tools page says how many are left out, and System › Logs names the
first one for each request. See
Add an MCP server.

MCP servers that need a sign-in

When you add or change an MCP server under Assistant › Tools, choose
its Sign-in: Token, sent as Authorization: Bearer, User name and
password
, sent as HTTP Basic authentication, or Header, for a key in a
header of the server's own, such as X-API-Key. The satellite never shows a
stored sign-in again: it shows the user name or the header's name, and the
last four characters of a long token or value, so you can tell which one is
stored.

When a server refuses the sign-in, such as after you rotate its token, its row
says so and the brain gets none of its tools until you select Change and
Replace. Servers that sign in through a browser (OAuth) can't be used yet;
their row says so.

Other changes

  • The microphones are routed at 0 dB instead of -6 dB. On an Echo Dot (2nd
    gen), every microphone got 5.5 to 6.2 dB louder.
  • System › Record audio records 11 channels: the seven microphones,
    the left and right playback channels, the stream before its automatic gain,
    and the echo reference.
  • The MCP server form warns that a sign-in crosses your network unencrypted
    over an http:// address, also for a server saved before.
  • A new address drops a server's stored sign-in. The form says so, and Save
    waits until you enter the sign-in again or choose None.
  • A tool's row shows its own name, and its description is cut at three lines,
    so a long list can be scanned on a phone.
  • All on, All off and Its tools name their server to a screen
    reader, and keep the focus while a save runs.
  • The root image carries the Wi-Fi firmware of the Echo Dot (3rd gen). Pinna
    doesn't run on that device yet.

Fixed

  • The speakers of both Echos play only the right channel, so whatever a track
    panned left never sounded. The satellite now mixes stereo audio to mono
    before it plays it.
  • One of the seven microphones could be switched off after a start. The
    satellite now checks the microphone settings once it records, and sets
    again any that don't hold.
  • Renaming an MCP server left its tool switches under the old name, so all of
    its tools were on again. The switches now follow the rename. Deleting a
    server deletes its switches, so adding it again starts afresh.
  • On a phone, the dashboard's top bar shows the mark without the live ring
    beside it.

All changes

Changes since 0.5.0.

New

  • An arm64 kernel runs the armhf image as 32-bit programs, checked under QEMU (kernel)
  • The MT8516 kernel, with the Echo Dot (3rd gen) board (kernel)
  • MT7668 Wi-Fi for the MT8516 Echos (kernel)
  • LK's 64-bit layout for the MT8516 Echos (pinna-bootimg)
  • Firmware comes from a folder per board and Fire OS release, the Echo Dot (3rd gen)'s too (scripts)
  • The root carries the Echo Dot (3rd gen)'s Wi-Fi firmware (image)
  • A linear echo canceller for the wake word (pinna-audio)
  • The pinna_wake plugin, the wake word's own stream (pinna-ladspa)
  • The wake word detector hears its own stream on the Echo Dot (pinnad)
  • The Echo Dot graph gets the wake word's stream, dot_wake (image)
  • Read tool lists up to 1 MiB and refresh them in the background (pinna-mcp)
  • An MCP server with more than 32 tools is added with them off (pinnad)
  • The brain logs the tools its 64-tool limit leaves out (pinna-assist)
  • An MCP server's tools turn all on or off, with the brain's limit in view (dashboard)
  • An MCP server can sign in with a token, a password or a header (pinnad)
  • The MCP server form takes a sign-in (dashboard)
  • An MCP server says when its address is plain http (pinnad)
  • The linear echo canceller takes a step size (pinna-audio)
  • micbench compares microphone front ends and echo cancellers offline (pinna-wakeword)
  • A board says which channel its speaker plays and what its loopback lanes carry (pinna-board)
  • pinna_wake averages all the board's microphones and cancels from the speaker's lane (pinna-ladspa)
  • The Echos' microphone graph is one stream, dot_wake (image)
  • One microphone stream for the wake word and requests, with the raw lanes as fallback (pinnad)
  • The bench tools follow pinna_wake's microphones and reference lane (pinna-wakeword)

Fixed

  • The MT7668 Wi-Fi driver reads its configuration as wifi_mt7668.cfg (kernel)
  • The phone's top bar shows the mark without the live ring beside it (dashboard)
  • The echo reference reaches the canceller before its echo (pinna-audio)
  • Route the Echo microphones at 0 dB instead of -6 dB (pinna-audio)
  • The echo reference starts pw-play again when it exits (pinna-audio)
  • pinnad checks the microphone settings once capture runs (pinna-audio)
  • The end of speech keeps its noise seed from dot_mic_aec (pinnad)
  • An MCP server's tool list reads as part of its server (dashboard)
  • An MCP server's tool switches follow its rename and go with it (pinnad)
  • A big MCP server says why its tools are off, and All on asks first (dashboard)
  • pinnad no longer grows until the satellite runs out of memory (pinnad)
  • A runaway pinnad is restarted instead of hanging the satellite (image)
  • The MCP sign-in can't be lost to a new address unnoticed (dashboard)
  • The MCP sign-in says only what applies and focuses the secret (dashboard)
  • The speaker no longer sends its own echo reference (pinna-audio)
  • The Echos play a mono mix, so stereo music keeps its left channel (pinna-audio)
  • Talking over music no longer derails the wake word's echo canceller (pinna-audio)

Files

Install: https://getpinna.dev/docs/flash/
Signed with keys/release.pub: 1170dfc308acae842fd81cbff011ecf33f2c0feb056fa2ec9998bc012fc9f706

d92f9f12997d9abed33aa7b9bcdeca986f6f003448ae74a8a1bb744c1faf9110  pinna-0.6.0.root.img
2b2bddd1b4864fb1ba2a5edb97640f41ab339a5a2b6d21c25cec5e63ba96436b  pinna-boot.img
01a674c59d4f636dc96825ebb7a62bb2f411dcddd2a9aa28033534bfab9ab653  manifest.json
ae99728baf56366fc24cb07abe666feace6d191c33dd691e4c0364a13a733c6b  manifest.json.sig
754bf31599889b139a23e2bd49872c1c9d14b4f4bde401be533d17fab652d4c3  flash-gen2.sh