BACKFLIP BACKFLIP BACKFLIP BACKFLIP BACKFLIP BACKFLIP BACKFLIP BACKFLIP BACKFLIP BACKFLIP BACKFLIP BACKFLIP BACKFLIP
jibo-hub-shim
Minimal Jibo Hub-compatible shim for /v1/listen.
What it does
- Hosts a WebSocket server on
/v1/listen. - Waits for
CONTEXT+LISTENmessages. - Triggers offline STT by calling
jibo-asr-serviceusing:- WebSocket
/simple_port(event stream) - HTTP
POST /asr_simple_interface(start/stop) and returns: SOS(start of speech)ASR(text)NLU(minimal intent/entities)LISTEN(final wrapper with{asr,nlu})EOS(end of speech)
- WebSocket
This avoids implementing hub-side audio decoding.
Configure
Copy the example config:
cp config.example.json config.json
Key fields:
asrService.baseUrl- If shim runs on the server: set this to your robot IP, e.g.
http://192.168.1.50:8088 - If shim runs on the robot: keep
http://127.0.0.1:8088
- If shim runs on the server: set this to your robot IP, e.g.
asrService.audioSourceId- Usually
alsa1on-robot. If your robot uses a different input, change it here.
- Usually
listen.port: hub shim port (default9000)
Dependencies
- Server-hosted shim: needs Node.js + the
wsmodule available via normal Node resolution.- If you have npm:
npm i ws
- If you have npm:
- Robot-hosted shim: does not require npm; it will fall back to the already-bundled
wsat/opt/jibo/Jibo/Skills/@be/be/node_modules/ws.
Run
node index.js ./config.json
Server deployment (systemd)
From the hub-shim/ folder on your server:
sudo ./install-server.sh
This installs:
- Code to
/opt/jibo-hub-shim - Config to
/etc/jibo-hub-shim/config.json - Service unit
jibo-hub-shim.service
Useful commands:
sudo systemctl status jibo-hub-shimsudo journalctl -u jibo-hub-shim -f
Notes
- The shim serializes STT requests to the robot ASR service to reduce crosstalk/timeouts when Jetstream opens multiple listens quickly.
- If you regularly speak longer than 15s, increase
asrService.timeoutMs.
Jetstream config
Point Jetstream’s HubClient to this shim by setting HubClient.override in /usr/local/etc/jibo-jetstream-service.json:
- If shim runs on the server: set
hub_hostnameto the server IP. - If shim runs on the robot: set
hub_hostnameto127.0.0.1.