File size: 2,503 Bytes
570b87b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
{
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "spatial_analyze",
        "description": "HOA-7 spatial calculator (not an LLM). Analyze Ambix audio, mono plane-wave audio, synthetic scenes, or vision boxes on the sphere. Returns DOA, energy, bands, frames. Call via HTTP POST http://127.0.0.1:8765/v1/spatial/analyze or bash: spatial-report ...",
        "parameters": {
          "type": "object",
          "properties": {
            "mode": {
              "type": "string",
              "enum": [
                "ambix_file",
                "mono_file",
                "demo_scene",
                "vision",
                "fuse",
                "detect",
                "live",
                "condition"
              ]
            },
            "image": { "type": "string", "description": "Image path for detect mode" },
            "duration": { "type": "number", "description": "Seconds for live mic capture" },
            "prompt": { "type": "string", "description": "Base diffusion prompt for condition mode" },
            "report": { "type": "object", "description": "Spatial report object for condition mode" },
            "path": { "type": "string" },
            "az": { "type": "number" },
            "el": { "type": "number" },
            "order": { "type": "integer", "default": 3 },
            "boxes": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "az": { "type": "number" },
                  "el": { "type": "number" },
                  "w_deg": { "type": "number" },
                  "h_deg": { "type": "number" },
                  "weight": { "type": "number" },
                  "label": { "type": "string" },
                  "kind": { "type": "string", "enum": ["box", "ray", "point"] }
                }
              }
            }
          },
          "required": ["mode"]
        }
      }
    }
  ],
  "http": {
    "base": "http://127.0.0.1:8765",
    "analyze": "POST /v1/spatial/analyze",
    "health": "GET /health",
    "schema": "GET /v1/spatial/schema"
  },
  "bash": {
    "demo": "spatial-report demo-scene -o /tmp/spatial.json",
    "ambix": "spatial-report analyze FILE.wav --ambix -o /tmp/spatial.json",
    "mono": "spatial-report analyze FILE.wav --az 30 --el 0 -o /tmp/spatial.json",
    "vision": "spatial-report vision --boxes '[{\"az\":0,\"el\":0,\"label\":\"obj\"}]' -o /tmp/vision.json"
  }
}