seren-soma
The nervous system of a SerenSoma body: a Stack-chan robot's voice, ears and touch.
pip install seren-soma
seren-soma # http://<this box>:7480/viewer
seren-soma --describe # one line of JSON, for installers
- The robot checks in at
/ota/and talks over a websocket. What it hears goes to Lodestar to be transcribed and lands inheard.jsonl; what the mind says comes back through Lodestar, in its voice. - It reads the head sensor into strokes, pokes, scritches and resting hands, and shows the face the robot's face file names for each.
- It owns night mode (caps on the robot's lights, speaker and screen) and work hours, so the body behaves with nothing else running.
Talking back and forth. Whoever answers (a mind, a game, a script) does two things:
GET /heard?after=<t>&wait=25returns what was heard after timet, and withwaitholds an empty answer open until something is heard. So the words arrive the moment they are transcribed, with no file to keep reading. Start withafter=0to get the last entry'st.POST /say {"text": "...", "emotion": "happy", "wake": true}says a line. It goes out a sentence at a time: the first sentence is rendered and starts playing while the rest render behind it, so the wait is for one sentence."whole": truerenders the line in one piece instead.
GET /api/voice-timing (and the page's Voice tab) times every leg of each turn: waiting for quiet,
transcribing, the answer being thought of, rendering the first sentence, opening the channel. It keeps
how many words, never which. The quiet that ends a turn is a live setting there
(channel.end_silence_ms, 900 by default). When the robot opens its channel after the speech service
has sat idle, a throwaway line is rendered so the voice is loaded before anyone needs it.
Who keeps the conversation (a prototype). By default this server does. With conversation: lodestar
in the config, Lodestar keeps it, once, for every place a conversation happens, and this server is only
the robot's ears and mouth: it hands finished clips to Lodestar, pulls the sound to play from it, and
keeps the microphone (who may open it, the tap, Stop). Lodestar's clock is then the only one: when
Lodestar says back and forth is over, or forgets it in a restart, the microphone closes. The routes
above pass through to Lodestar, so nothing that talks to this server changes. See seren_soma/relay.py.
Copy seren-soma.yaml.sample to ~/seren-soma/seren-soma.yaml.
Everything it keeps is in the state folder, ~/seren-soma/state/ by default: its two tokens, the
robot's control token, what was heard, the touch log, the settings and its own log.
Its page (/viewer) shows whether it's alive and its log. "Copy for help" replaces everything
that was heard with a word count, so the log can go to someone helping without what was said.
Its Touch and Servos tabs are the bench: every channel of the touch chip live, a chart of
which pad answers where (kept as touch_map.json in the state folder), and the neck servos' own
readings with a sweep test. They need firmware with the bench routes; see
firmware/docs/bench.md.
It binds the LAN, because the robot dials in, so it won't start without its API token; with none configured it makes one in the state folder. The robot gets a separate token for its voice connection, and the check-in answers only the robot's own address.
AGPL-3.0-or-later.
Metadata
Release files for seren-soma 1.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| seren_soma-1.4.0.tar.gz | 112.2 kB | With provenance | Details for seren_soma-1.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| seren_soma-1.4.0-py3-none-any.whl | Python 3 | none | any | Details for seren_soma-1.4.0-py3-none-any.whl |
Total release size: 206.3 kB
Release files / seren_soma-1.4.0.tar.gz
| Download URL | seren_soma-1.4.0.tar.gz |
|---|---|
| Size | 112.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1cf09132a2c051d0bacafe05a1250ba049575b5d1a845b95d30318cdc1eca1ab
|
|
BLAKE2b-256 checksum How to use checksums |
4aa28da57b8490c8fe2d915fa959c4a44e987f1cb5fd4e1ecfe875a6a6c31200
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.
Transparency logRelease files / seren_soma-1.4.0-py3-none-any.whl
| Download URL | seren_soma-1.4.0-py3-none-any.whl |
|---|---|
| Size | 94.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3e5b6b33a14df5cfb02064bd111903496dc560ced12af45411264c727ef53ed8
|
|
BLAKE2b-256 checksum How to use checksums |
f086d5c8da0907afefc996ebb3b7a1b2943054203869de42aa4b47547e7da006
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.
Transparency logSecurity for seren-soma 1.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for seren_soma-1.4.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.