streamware

๐ŸŽค Voice Shell Dashboard v2

Interactive voice-controlled dashboard for video surveillance automation.

Overview

Voice Shell Dashboard is a browser-based interface that combines:

Quick Start

# Start the server
sq voice-shell --port 9000

# Open in browser
http://localhost:9001

Dashboard Layout

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ ๐ŸŽค Streamware Voice Shell          โ— Connected  โ—‹ Ready    [๐Ÿ‡ฌ๐Ÿ‡ง][๐Ÿ‡ต๐Ÿ‡ฑ][๐Ÿ‡ฉ๐Ÿ‡ช] [๐Ÿ”„] โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚         โ”‚                           โ”‚                                       โ”‚
โ”‚ ๐Ÿ’ฌ Conv โ”‚   ๐Ÿ–ฅ๏ธ Shell Output         โ”‚  ๐ŸŽค Audio         [โ‹ฎโ‹ฎ][โ›ถ]             โ”‚
โ”‚ [โ‹ฎโ‹ฎ][โ›ถ] โ”‚   [๐Ÿ“‹][๐Ÿ—‘๏ธ][โ‹ฎโ‹ฎ][โ›ถ]        โ”‚  [๐ŸŽค] Ready                           โ”‚
โ”‚         โ”‚                           โ”‚  [โน][๐Ÿ”„][โšก]                           โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค   > track person          โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚         โ”‚   ๐Ÿ”Š How would you...     โ”‚                                       โ”‚
โ”‚ โš™๏ธ Proc โ”‚   > 1                     โ”‚  ๐Ÿ’ฌ Text Input    [โ‹ฎโ‹ฎ][โ›ถ]             โ”‚
โ”‚ [โ‹ฎโ‹ฎ][โ›ถ] โ”‚   ๐Ÿ”Š Executing...         โ”‚  [๐Ÿ‘ค][๐Ÿ“ง][โน][๐Ÿ“Š]                       โ”‚
โ”‚         โ”‚   ๐Ÿš€ EXECUTING COMMAND    โ”‚  [______________][Send]               โ”‚
โ”‚         โ”‚   $ sq live narrator...   โ”‚  [Yes][No][New]                       โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค   Frame #1...             โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚         โ”‚   Frame #2...             โ”‚                                       โ”‚
โ”‚ [โŒŸ]     โ”‚                     [โŒŸ]   โ”‚  ๐Ÿ“Š Variables     [โž•][โ‹ฎโ‹ฎ][โ›ถ]         โ”‚
โ”‚         โ”‚                           โ”‚  url: rtsp://192.168.1.100            โ”‚
โ”‚         โ”‚                           โ”‚  email: tom@sapletta.com              โ”‚
โ”‚         โ”‚                           โ”‚  language: [PL โ–ผ]                     โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Features

๐ŸŽค Voice Control

Action Voice Command
Track person โ€œtrack personโ€
Track with email โ€œtrack person and emailโ€
Stop process โ€œstopโ€
Check status โ€œstatusโ€
Confirm โ€œyesโ€, โ€œokayโ€, โ€œtakโ€
Cancel โ€œnoโ€, โ€œcancelโ€, โ€œnieโ€

๐ŸŒ Multi-language Support

// URL parameter
http://localhost:9001/#lang=pl

// Supported languages
EN - English (default)
PL - Polski
DE - Deutsch

All UI elements are translated:

๐ŸŽ›๏ธ Customizable Grid

Drag panels:

  1. Click โ‹ฎโ‹ฎ button in panel header
  2. Drag to new position on 10x7 grid
  3. Release to place

Resize panels:

  1. Click โŒŸ in bottom-right corner
  2. Drag to resize
  3. Release when done

Reset layout:

Grid saved in URL:

http://localhost:9001/#grid=%7B%22output-panel%22%3A%7B%22col%22%3A3...%7D%7D

๐Ÿ’ฌ Multi-session Support

Conversations (idle sessions):

Processes (running commands):

๐Ÿ“Š Variables Panel

Editable variables used in commands:

Variables auto-sync with server via WebSocket.

URL State Management

Track user activity via URL hash:

http://localhost:9001/#lang=pl&panel=output-panel&action=typing&session=s1
Parameter Description
lang Current language
panel Active panel
action Current action (typing, speaking, etc.)
session Current session ID
grid Panel positions (JSON)

API Events

WebSocket Messages (Client โ†’ Server)

// Voice input
{type: 'voice_input', content: 'track person'}

// Text input
{type: 'text_input', content: 'status'}

// Session management
{type: 'new_session'}
{type: 'switch_session', content: 'session_id'}

// Language change
{type: 'set_language', content: 'pl'}

// Variable change
{type: 'set_variable', content: {key: 'url', value: 'rtsp://...'}}

WebSocket Events (Server โ†’ Client)

// TTS speak
{type: 'tts_speak', data: {text: 'How would you like...'}}

// Command executed
{type: 'command_executed', data: {command: 'sq live narrator...'}}

// Session events
{type: 'session_created', data: {session: {...}, sessions: [...]}}
{type: 'session_switched', data: {session: {...}, output: [...]}}

// Config loaded
{type: 'config_loaded', data: {language: 'pl', email: '...', url: '...'}}

Integration Examples

With Home Assistant

# configuration.yaml
rest_command:
  start_surveillance:
    url: "http://localhost:9001/api/command"
    method: POST
    payload: '{"command": "track person and email"}'

automation:
  - alias: "Start surveillance on motion"
    trigger:
      platform: state
      entity_id: binary_sensor.motion
      to: 'on'
    action:
      - service: rest_command.start_surveillance

With Node-RED

[
    {
        "id": "websocket-voice-shell",
        "type": "websocket out",
        "url": "ws://localhost:9001/ws",
        "msg": {"type": "text_input", "content": "track person"}
    }
]

With Python Scripts

import asyncio
import websockets
import json

async def send_command(command):
    async with websockets.connect('ws://localhost:9001/ws') as ws:
        await ws.send(json.dumps({
            'type': 'text_input',
            'content': command
        }))
        
        # Listen for response
        while True:
            msg = await ws.recv()
            data = json.loads(msg)
            print(f"Event: {data['type']}")
            
            if data['type'] == 'command_completed':
                break

asyncio.run(send_command('track person'))

With cURL

# Send command via HTTP (if API endpoint enabled)
curl -X POST http://localhost:9001/api/command \
  -H "Content-Type: application/json" \
  -d '{"command": "track person", "language": "pl"}'

Keyboard Shortcuts

Key Action
Space Toggle voice recording
Escape Close expanded panel
Enter Send text input

Testing

# Run all GUI tests
pytest tests/test_voice_shell_gui.py -v
pytest tests/test_voice_shell_gui_e2e.py -v

# Run specific test
pytest tests/test_voice_shell_gui_e2e.py::TestTranslator -v

Troubleshooting

Microphone not working

No voice output

Grid not saving

License

MIT License - see LICENSE