2.3 KiB
2.3 KiB
Jibo Hub-Shim Server: Deployment & Usage Guide
Quick Start
- Install dependencies (if needed):
- Node.js v16+ (recommended v18+)
npm install(if package.json present)
- Configure:
- Edit
config.json(or useconfig.example.json):listen.port: Port to listen on (default: 9000)listen.path: WebSocket path (default:/v1/listen)asr.baseUrl: Local ASR HTTP endpointlogging.level:info,debug, etc.
- Edit
- Run the server:
node index.js config.json- Or set
JIBO_HUB_SHIM_CONFIGenv var.
- Or set
Integration with Jibo Robot
- The robot's
jibo-jetstream-servicebinary must be configured to connect to the hub-shim:hub_port: 9000 (or your chosen port)hub_hostname: IP of the machine running hub-shimlisten_url:/v1/listen
- Confirm with logs: hub-shim should show
ws connectedandlisten resultfor each turn.
How It Works
- The robot opens a WebSocket to hub-shim for every listen turn.
- hub-shim receives CONTEXT and LISTEN messages, runs ASR/NLU, and sends a TURN_RESULT.
- The TURN_RESULT is always local (
global: false), withstatus: 'SUCCEEDED'and the correct intent/entities. - This resolves the skill's local turn and allows menu/intro flows to advance by voice.
Troubleshooting
- No skill advancement?
- Check that TURN_RESULT is sent with
status: 'SUCCEEDED',global: false, and correctrequestID(should match transID). - Use robot-logger (
/tmp/jibo-skills.logor web panel) to trace intent and state.
- Check that TURN_RESULT is sent with
- ASR timeouts?
- Ensure ASR service is running and reachable from hub-shim.
- NLU not matching?
- Edit
inferNluFromText()inindex.jsto adjust rule patterns.
- Edit
Advanced
- Custom NLU: You can extend
inferNluFromText()for more complex intent/entity extraction. - Client-supplied ASR/NLU: Send CLIENT_ASR or CLIENT_NLU messages before LISTEN to inject results.
- Logging: Adjust
logging.levelin config for more/less verbosity.
File Locations
- Main server:
index.js - Config:
config.jsonorconfig.example.json - Protocol doc:
HUB-SHIM_PROTOCOL.md
Support
- For protocol or integration issues, see HUB-SHIM_PROTOCOL.md and the source code comments.
- For robot-side debugging, use robot-logger and check
/tmp/jibo-skills.log.