streamware

Natural Language Configuration

Configure Streamware using natural language (Polish or English).

# Start interactive shell with LLM
sq shell

# Example session:
sq> detect person and email tom@company.com immediately
βœ… Start person detection, send email to tom@company.com immediately
   Command: sq watch --detect person --email tom@company.com --notify-mode instant --duration 60
   Execute? [Y/n]: y

sq> track cars for 10 minutes
βœ… Track car objects for 600 seconds
   Command: sq watch --track car --fps 2 --duration 600
   Execute? [Y/n]: y

sq> stop
sq> exit

Quick Start (Direct Commands)

# English
sq watch "track person"
sq watch "count cars"
sq watch "describe scene"
sq watch "alert when someone enters"
sq watch "detect person and email admin@x.com immediately"

# Polish
sq watch "Ε›ledΕΊ osoby"
sq watch "ile samochodΓ³w"
sq watch "opisz co siΔ™ dzieje"
sq watch "powiadom gdy ktoΕ› wchodzi"

Supported Commands

Actions

Action English Polish
Track track, watch, follow Ε›ledΕΊ, obserwuj
Count count, how many ile, policz
Describe describe, what is opisz, co siΔ™ dzieje
Alert alert, notify powiadom, alarm
Detect detect, find wykryj, znajdΕΊ

Targets

Target English Polish
Person person, people osoba, ludzie
Car car, vehicle samochΓ³d, auto
Cat cat kot
Dog dog pies
Bird bird ptak
Animal animal, pet zwierzΔ™

Events

Event English Polish
Enter enters, entering wchodzi
Leave leaves, exits wychodzi
Move moves, moving porusza
Approach approaches zbliΕΌa

Speed

Speed English Polish FPS
Realtime realtime, instant natychmiast 5.0
Fast fast, quick szybko 2.0
Normal (default) (default) 1.0
Slow slow, detailed wolno, szczegΓ³Ε‚owo 0.5

Examples

Basic Tracking

sq watch "track person"              # Track any person
sq watch "Ε›ledΕΊ koty"                # Track cats
sq watch "follow cars"               # Follow vehicles

Alerts

sq watch "alert when someone enters"
sq watch "powiadom gdy ktoΕ› wchodzi"
sq watch "notify when car approaches"

Counting

sq watch "count people"
sq watch "ile osΓ³b w pokoju"
sq watch "how many cars"

Speed Control

sq watch "fast track person"         # 2 FPS
sq watch "realtime detection"        # 5 FPS
sq watch "slow detailed analysis"    # 0.5 FPS + LLM

How It Works

"powiadom gdy ktoΕ› wchodzi"
         ↓
    parse_intent()
         ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Intent:             β”‚
β”‚   action: alert     β”‚
β”‚   target: person    β”‚
β”‚   trigger: enter    β”‚
β”‚   fps: 1.0          β”‚
β”‚   llm: false        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         ↓
    to_env()
         ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ SQ_STREAM_FPS=1.0   β”‚
β”‚ SQ_STREAM_MODE=trackβ”‚
β”‚ SQ_STREAM_FOCUS=... β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Python API

from streamware.intent import parse_intent, apply_intent

# Parse any natural language
intent = parse_intent("Ε›ledΕΊ osoby wchodzΔ…ce")

print(intent.action)    # "track"
print(intent.target)    # "person"
print(intent.trigger)   # "enter"
print(intent.fps)       # 1.0
print(intent.llm)       # False
print(intent.describe()) # "ŚledzΔ™ person przy wejΕ›ciu (1.0 FPS) tylko YOLO"

# Apply to config
apply_intent(intent)

# Get CLI args
args = intent.to_cli_args()
# ['--mode', 'track', '--focus', 'person', '--tts', '--tts-diff']

# Get env vars
env = intent.to_env()
# {'SQ_STREAM_FPS': '1.0', 'SQ_STREAM_MODE': 'track', ...}

Adding Custom Keywords

Edit streamware/intent.py:

INTENT_KEYWORDS = {
    "track": ["track", "follow", "Ε›ledΕΊ", "obserwuj", 
              "my_custom_word"],  # Add here
    ...
}