Skip to content

About

Turn a Meta Portal 10" into a Muse gadget and home screen: voice and video calls, "Hey Muse", and a screen your Muse can use. Unofficial, open source.

Topics

Resources

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

Portal Muse

Turn a Meta Portal 10" or Portal Mini into a Muse gadget and a quiet home screen: voice and video calls with your Muse, hands free with "Hey Muse" or a phrase of your own, and a screen your Muse can use.

Unofficial project. Not made, endorsed or supported by Meta. It is a Kotlin port of parts of the muse-gadget-sdk, and it can break whenever the service changes. You need your own Muse account and your own SDK token, and you agree to Meta's Gadget SDK terms. Use it at your own risk.

The interface is in French on a French device and in English everywhere else, including the messages the app sends to your Muse. More languages are a great first contribution.

Screenshots

Taken on a Portal 10" (1280 × 800) with demonstration data. The little robot is a placeholder drawn for these pictures: on your device you see your own Muse. The interface is in French on a French device.

Home screen: clock, weather effects, light buttons, counted days and the call button

In a call, with tiles In a call
A video call with weather tiles and the words written on screen A video call with captions
Tiles of many kinds A schedule as a list
Tiles with colours, a curve and a progress bar A day's appointments as a list
Recipe, step by step Philips Hue lights
A recipe with ingredients, the current step and a timer button Rooms with mood, brightness and on or off buttons
Cards from your Muse Another theme
Cards for an appointment, a parcel and a shopping list The home screen in midnight blue
More Held upright
Menu with feed, messages, photo, radio, lights, routines, recipe and apps The home screen in portrait

What it does

  • Home screen: clock, date, weather (Open-Meteo), your Muse's animated avatar, up to four quick actions, running timers. It can also show a dashboard of your choice (any http or https URL).
  • Calls: one button, with Muse's live video or voice only. "Hey Muse" wakes it, and you can say your question in one breath. What you say is written on screen, in video too. The call ends by itself after a silence, or after a goodbye.
  • Written conversation: replies on screen and read aloud, answers by voice or keyboard, photos you choose to send.
  • A screen your Muse can use: pictures and pages, banners, approve / reject questions, an idle photo frame, night mode, a feed of suggestions, small sandboxed touch apps, timers and volume.
  • Proactive: a few times a day (07:00, 12:00, 17:00, 20:00) the Portal asks your Muse what deserves the screen. Cards appear on the home screen, and between the photos of the idle screen with suggestions from the feed. This can be turned off.
  • One companion with your phone and computer: ask your Muse, from anywhere, to leave a note or open a web page on the Portal; send what is shown back to your phone with one touch.
  • Tiles during calls: after each answer, your Muse is asked to show its facts (a forecast, times, figures) as large tiles beside it. This sends one message per answer, with the question and the answer, in a conversation of its own; it can be turned off under Voice and calls. The tiles leave when the call ends.
  • Routines: "good morning", "good night" and "I'm leaving" set lights, radio and screen at once and ask your Muse for a few tiles. Say "bonjour la maison", "bonne nuit la maison", "je pars" (or "good morning house", "I'm leaving"), or use More > Routines. "Bonne nuit" or "good night" alone also runs the night routine when it is the first thing said in a call.
  • Recipes one step at a time ("étape suivante", "next step"), with a timer button.
  • Counted dates and birthdays on the home page.
  • A home page of your own: choose its widgets, a greeting and weather effects around your Muse, light buttons, a colour theme, the text size; it also works with the Portal held upright.
  • In calls, a small drawing and short sounds tell when it listens, thinks, speaks or did not understand.
  • Wake-up alarms and radio: alarms ring with a station or beeps; a fixed list of public streams.
  • Philips Hue lights (once you pair your bridge): switch and dim rooms on screen, by voice during a call, or by asking your Muse.
  • Bluetooth LE (off by default): your Muse can reach nearby devices, each one approved on screen.

Status

Area State
Pairing from the Muse phone app, Noise session, reconnection Tried on a real device
Written and spoken replies, voice calls, video calls, "Hey Muse", goodbye hang-up Tried on a real device
Message history, photos you send, photo frame Tried on a real device
Home screen, avatar, kiosk, restart after reboot, crash or update Tried on a real device
Banners, questions, small apps, timers by voice, feed update Tried with a real Muse, after teaching it the screen
Volume by voice Tried on a real device
Automatic updates, cards on the home and idle screens, radio Tried on a real device
Avatar read from the Gadget API Tried on a real device
Philips Hue: finding and pairing the bridge, listing rooms Tried on a real device
Philips Hue: switching by voice during a call Tried on a real device
Philips Hue: switching and dimming on screen and by Muse New: unit tests only
A wake phrase of your own, in French Tried on a real device
What is said written on screen during video calls New: unit tests only
Updating from a GitHub release Refused by the Portal 10": its app verifier rejects the signature
New screens: kinds of tiles, recipe, counted dates, theme, upright layout, moods list Shown on a real device with sample data
Spoken timers, alarms, light moods, colours and brightness Tried on a real device
Routines, recipe steps by voice, call sounds New: unit tests only
Tiles during calls Tried on a real device; they follow the answer by about 15 s
A wake phrase in another language Never tried
Web page hand-off, send to phone, alarms, voice requests other than volume and lights New: unit tests only
Bluetooth, side chat Unit tests only
Token rotation Unit tests only
Portal Mini: install, pairing, home screen and cards, wake phrase, video call, tiles Tried on a real device
Two Portals side by side with the same wake phrase Tried once: both woke and the second video call was refused
Other Portal models Unknown

Requirements

  • A Meta Portal 10" or Portal Mini running Android 10, with ADB enabled (Settings > Debug; the Portal's settings may ask for a WhatsApp or Facebook account). ADB turns off at every reboot.
  • A computer with Android Studio (JDK 17 or later), Android SDK 35, NDK 28.2.13676358 and CMake 3.22.1.
  • A Muse account with an SDK token (gadgets.muse.ai > Settings > SDK tokens).

The app never unlocks the bootloader and never removes or disables a system app.

Build and install

Download and verify the wake word dependencies once (about 1.3 MB):

./tools/prepare-wakeword.sh

On macOS, use Android Studio's JDK:

export JAVA_HOME="/Applications/Android Studio.app/Contents/jbr/Contents/Home"

Run the tests and build:

./gradlew :core:test :app:assembleRelease

The release build is signed with your local Android debug key, and is not debuggable:

adb install -r app/build/outputs/apk/release/app-release.apk
adb shell monkey -p com.portalmuse.gadget -c android.intent.category.LAUNCHER 1

Updating without a cable

Not on a Portal 10". Tried there: Meta's app verifier refuses any install asked by an app that is not signed with one of Meta's certificates ("App certificate rejected"). Update with adb install -r instead. The project does not try to get around it.

Update the app in the maintenance menu looks at the latest release of the repository, downloads it and asks the Portal to install it. The first time, you allow Portal Muse to install apps; the Portal asks you to confirm every update. Nothing is checked or installed on its own.

An update is only accepted if it is signed with the same key as the installed app:

  • You installed a published release: its updates work.
  • You built the app yourself: publish your own releases from your fork, and build with -PupdateRepository=you/your-fork.

To publish a release, raise versionCode in app/build.gradle.kts, commit, push, then:

./tools/release.sh

It builds from the last commit only, shows what it made and asks before publishing. The signing key is ~/.android/debug.keystore: back it up and never publish it. Without it you cannot update your install; with it, someone else could sign an update for it.

First run

Open the maintenance menu by holding the bottom left corner for 2 seconds.

  1. Muse connection > Muse SDK token: enter your token. To avoid typing it, touch the field, then run this on the computer; it types the token from your clipboard without showing it:
./tools/enter-token.sh
  1. Muse connection > Open Bluetooth pairing. The Portal advertises as MuseGadgetXXXXXX.
  2. In the Muse phone app: Settings > Devices (developer mode), pair it.
  3. Allow the microphone when asked. Enable "Hey Muse" under Voice and calls if you want it.
  4. Screen > Allow the screen at startup lets the kiosk come back after a reboot or a crash.

Using it

The home screen has your quick actions, a More button (feed, messages, photo, apps) and the call button. The menu has ten entries: voice and calls, what Muse may do, screen, Philips Hue lights, routines, Muse connection, diagnostics, update, information, and quit.

Diagnostics

Hold the bottom left corner for 2 seconds, then choose Diagnostics. The panel lists the last 200 events of the network (connected, validated, the kind of link — not the Wi-Fi name), the Muse session, voice capture and what the server answers: statuses, sizes and durations only. It also opens by itself when a line is an error, for example a failed session, an HTTP error, a recorder failure, or a wake call that ends because Muse dropped the speech and sent nothing audible. Copy puts those lines on the clipboard. The same lines are written to logcat under the tag PortalMuse.

For the lights, choose Philips Hue lights > Pair the Hue bridge, then press the round button on the bridge. A Lights tile then appears under More.

Commands your Muse gets

Commands Effect Allowed by
device.health, device.guide Status and usage guide always
timer.*, audio.volume Kitchen timers and speaker volume always
display.show_images, show_page, close Pictures and static pages screen
display.notify, display.ask Banner; approve / reject buttons screen
home.set_cards, display.open_url Cards (home and idle screen); a public https web page screen
alarm.*, radio.* Wake-up alarms; radio from a fixed list always
display.tiles Large tiles or a list beside Muse: colours, curves, progress, pictures screen
display.recipe A recipe followed step by step screen
countdown.set, list, remove Days left before dates and birthdays screen
routine.run Good morning, good night, leaving always (lights only if allowed)
lights.list, lights.set Hue rooms: on, off, brightness once a bridge is paired; can be refused
display.night_mode, home.set_shortcuts, frame.set_photos Night, quick actions, photo frame screen
feed.set, apps.* Feed page; small touch apps screen
camera.capture One photo, only after two taps on screen off by default
ble.* Bluetooth LE; each new device approved on screen off by default

The guide your Muse reads is app/src/main/assets/guide.md.

Your own wake phrase

If a call opened by the wake phrase hears nothing, or cannot connect, the Portal opens a voice note (the same path as a typed message). Turn that off under Voice and calls.

"Hey Muse" is a model trained for those two words only. To wake the device with other words, add a small speech model before building. Nothing is trained: you type your phrase on the device.

./tools/prepare-wake-phrase.sh

Build and install as above, then choose Voice and calls > Wake words > A phrase of your choice and type two to four words.

Two Portals within earshot of each other do not coordinate: give each one its own wake phrase. With both on the same computer, pick the device with adb -s <serial> or ANDROID_SERIAL.

  • The default is the French Vosk model (Apache 2.0, a 40 MB download; the app grows from about 21 to 63 MB). Pass another model name and its checksum for another language, for example ./tools/prepare-wake-phrase.sh vosk-model-small-en-us-0.15 <sha256>. Only French has been tried.
  • The words must be known to the model, and the app tells you when one is not: write a name with words that sound like it.
  • It recognizes speech on the device, so it uses more power than "Hey Muse" (about a tenth of one processor core on the Portal) and about 70 MB more storage once unpacked.
  • Measured on the Portal with synthetic French voices and the phrase used for the trial: 46 of 51 phrases heard, about half a second after the last word. No false wake in four minutes of ordinary speech, but 11 in three minutes of sentences written to sound like the phrase. Long and unusual phrases do better. Real rooms and televisions have not been measured.

How it works

core/   Pure Kotlin, JVM tested: BLE framing, pairing v5, Noise XX, the Muse session,
        chat, voice calls, video calls (SRTP, RTP, STUN, H.264), device commands.
app/    Android: kiosk activity, screens, microphone, camera, Bluetooth, services.
        app/src/main/cpp holds the SDK's "Hey Muse" detector.
tools/  Dependency download, token entry.
  • Pairing uses the community mode of pairing v5. It protects against passive listening, not against an active man in the middle: pair at home.
  • Session: a foreground service keeps a Noise session open, reconnects on its own and refreshes old tokens before reconnecting. The device registers as linux / gadget, model portalmuse-portal-10.
  • Replies are followed on /chat/subscribe; they are spoken through tts-stream.
  • Video calls are signalled over the session, then Opus audio and H.264 video go to the media endpoint the server gives, over SRTP. No picture from the Portal is ever sent. The light background of the video is blacked out on the device.
  • "Hey Muse" runs on the device. Audio leaves it only after the word is heard. The model is English; the SDK measured about 74 % detections and 0.4 false wakes per hour on synthetic voices.
  • A phrase of your own is spotted by Vosk, also on the device: the recognizer may only answer your phrase, frequent words or "something else", and a first guess is checked half a second later. What follows the phrase goes to the call.
  • Feed: a gadget has no access to the app's feed, so the Muse sends it with feed.set. Opening an empty feed, or one older than 3 hours, asks for it again (a message in your conversation, at most every 30 minutes).
  • Using the screen: calls are announced as a mcu-wearable, the only device type the SDK admits for them, so a Muse may not think of the screen. What Muse may do > Teach Muse to use this screen sends it a message saying what the Portal can show. Your Muse's own permission requests stay on the phone: the gadget protocol has no way to answer them.
  • Night mode only turns the light off; the device stays online and listening.
  • Handled by voice on the device: during a call, a short sentence such as "turn it up", "stop the timer", "play the radio", "turn off the kitchen lights" (in French also "allume le salon"), "night mode" or "stop the alarm" is carried out by the Portal itself, which beeps and hangs up: a Muse does not always call the matching command.

Logs, which never contain message contents or tokens:

adb logcat -s PortalMuse PortalMuseBle

Security and privacy

  • No SDK token, device token or key belongs in the code or the repository. Tokens are entered on the device and encrypted with an Android Keystore key.
  • Connections to Muse are limited to the hosts sent by the Muse app, without redirects. TLS roots the SDK treats as distrusted are removed from the trust anchors.
  • No shell, file or microphone control is exposed to the Muse.
  • The screen is shared: an approve button can be tapped by anyone nearby, and the answer is not authenticated. Keep confirmations for money, messages or deletions on your phone.
  • Cards show personal information on a shared screen; turn the screen permission or the automatic updates off if that matters. A web page opened with display.open_url runs scripts in a WebView with no bridge to the app, no file, camera or microphone access, and only navigates to public https addresses.
  • Pages and apps written by the Muse run in a WebView without network access. Pictures from the web must be https from public addresses; loading one reveals your home IP address to its host.
  • Updates come from the releases of one repository, fixed when the app is built, over https, on request. The file must be this app, newer and signed with the same key, and the person confirms the installation.
  • The Hue bridge is only reached at a home network address, over HTTPS. A bridge signs its own certificate: the one seen while you press its button is remembered and any other is refused. The bridge key is encrypted like the tokens. With the permission on, your Muse sees your room names.
  • Cleartext HTTP is allowed for a local dashboard.
  • Found a security problem? Please do not open a public issue. Report it privately from the repository's Security tab (report a vulnerability). Supported versions, scope and how to report are in SECURITY.md.

Not done

  • Live dictation: the SDK firmware notes that the server's streaming dictation has no speech recognition behind it yet.
  • Streaming a phone's screen or camera to the Portal: it needs the SDK's test app on the phone and an unauthenticated network port.

License

Apache License 2.0. Parts are ported or copied from the muse-gadget-sdk; see NOTICE and third party notices. The wake word model has its own data credits in ATTRIBUTION.md.

"Meta", "Portal" and "Muse" are trademarks of their owner, as are "Philips" and "Hue" of theirs.

About

Turn a Meta Portal 10" into a Muse gadget and home screen: voice and video calls, "Hey Muse", and a screen your Muse can use. Unofficial, open source.

Topics

Resources

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages