Skip to content
Merged

Dev #139

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
05ea2f4
Added k8s deploy and wip with service instances
thestumonkey Jan 15, 2026
4428863
wip with instances
thestumonkey Jan 16, 2026
f353c68
Pre-rename checkpoint: Port conflict work + architecture docs
thestumonkey Jan 16, 2026
24bde82
refectored instances and k8s deployds
thestumonkey Jan 17, 2026
5c99eb1
Fix IPv6 DNS resolution for uv/Rust applications in Kubernetes
thestumonkey Jan 17, 2026
16a1653
Configuration updates and service refactoring
thestumonkey Jan 17, 2026
0099fbe
daily commit
thestumonkey Jan 18, 2026
4444d3f
default services working
thestumonkey Jan 18, 2026
ea4292b
Fix window selection dialog not working in dual-stream recording (#114)
thestumonkey Jan 20, 2026
43e4a3d
feat(mobile): add voice input for chat with native speech-to-text (#115)
thestumonkey Jan 20, 2026
100ca72
Settings api simplification (#118)
thestumonkey Jan 21, 2026
4847d35
Voice chat enabled
thestumonkey Jan 21, 2026
b39482a
fixed for dual stream
thestumonkey Jan 22, 2026
76332a9
Settings api simplification (#123)
thestumonkey Jan 22, 2026
1dd1000
Settings api simplification (#124)
thestumonkey Jan 22, 2026
7bf4220
Settings api simplification (#125)
thestumonkey Jan 22, 2026
271b8e2
Settings api simplification (#127)
thestumonkey Jan 22, 2026
d454f98
Deploys (#126)
thestumonkey Jan 23, 2026
b46e1c9
Add Timeline feature with Gantt chart and D3 visualizations (#128)
thestumonkey Jan 23, 2026
53b7a18
Service config v2 (#129)
thestumonkey Jan 23, 2026
8ad43ee
Backend excellence (#131)
thestumonkey Jan 23, 2026
55ab47c
Service pipeline remodel
thestumonkey Jan 24, 2026
2770121
fixed circulat imports
thestumonkey Jan 24, 2026
19eefcb
Merge service_tests into dev
thestumonkey Jan 24, 2026
d4c83e2
fix: improve middleware logging readability
thestumonkey Jan 24, 2026
b09a0df
feat: add comprehensive test commands to Makefile
thestumonkey Jan 24, 2026
6c5cf00
gitignore update + chronicle notification + lock update (#96)
skywinder Jan 25, 2026
658ba6b
I've created a comprehensive plan at `docs/FRONTEND-EXCELLENCE-PLAN.m…
thestumonkey Jan 19, 2026
415cdfa
I've created the contract file at `frontend/src/testing/ui-contract.t…
thestumonkey Jan 19, 2026
3a4400e
Done. Here's what we now have:
thestumonkey Jan 19, 2026
8dfc3d8
Here's what we've built to address your original goals:
thestumonkey Jan 19, 2026
d347c44
Done. Updated to 600 lines.
thestumonkey Jan 19, 2026
6b065dc
`★ Insight ─────────────────────────────────────`
thestumonkey Jan 19, 2026
f8712d2
Good. Now let's take stock of what we've built and what's next.
thestumonkey Jan 19, 2026
ebdaef2
recording updates
thestumonkey Jan 26, 2026
9dc857c
reciordibgn update mobile
thestumonkey Jan 26, 2026
f864c45
added make rebuild command
thestumonkey Jan 26, 2026
834dd29
added missing exposes url param
thestumonkey Jan 26, 2026
7871c3e
fix mobile node pane: keep action buttons visible, navigate home afte…
claude Jan 27, 2026
5557623
feat: Improve deployment infrastructure and service discovery
thestumonkey Jan 26, 2026
726e63b
added service url mapping
thestumonkey Jan 27, 2026
8f4bfbd
Mobile audio to mycelia
thestumonkey Jan 27, 2026
7235205
service tweaks
thestumonkey Jan 27, 2026
6b85ebf
removed audio provider and consumer
thestumonkey Jan 27, 2026
8c9ef13
memory test
thestumonkey Jan 28, 2026
465d4a7
Merge branch 'origin/main' into dev
thestumonkey Jan 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# SCM syntax highlighting & preventing 3-way merges
pixi.lock merge=binary linguist-language=YAML linguist-generated=true -diff
12 changes: 11 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -178,4 +178,14 @@ tests/

# Compose overrides
compose/speaker-compose.yaml
robot_results
config/tailscale-serve.json

# pixi environments
.pixi/*
!.pixi/config.toml

# Robot Framework test results (but keep test source files)
robot_results/
output.xml
log.html
report.html
137 changes: 137 additions & 0 deletions AUDIO_PROVIDER_SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
# Audio Provider System - Corrected Architecture

## Summary

Audio is now a proper provider capability system with **two separate capabilities**:

1. **`audio_input`** - Audio SOURCES (mobile, Omi, desktop, file, UNode)
2. **`audio_consumer`** - Audio DESTINATIONS (Chronicle, Mycelia, relay, webhooks)

## Architecture

```
┌─────────────────────┐ ┌──────────────────────┐
│ Audio INPUT │ │ Audio CONSUMER │
│ (Source/Provider) │ ────────> │ (Destination) │
└─────────────────────┘ └──────────────────────┘

• Mobile App Mic • Chronicle
• Omi Device • Mycelia
• Desktop Mic • Multi-Destination
• Audio File Upload • Custom WebSocket
• UNode Device • Webhook
```

## Files Created/Modified

### Configuration Files
- ✅ `config/capabilities.yaml` - Added `audio_input` and `audio_consumer` capabilities
- ✅ `config/providers/audio_input.yaml` - 5 input providers (mobile, omi, desktop, file, unode)
- ✅ `config/providers/audio_consumer.yaml` - 5 consumer providers (chronicle, mycelia, multi-dest, custom, webhook)
- ✅ `config/config.defaults.yaml` - Default selections

### Backend API
- ✅ `ushadow/backend/src/routers/audio_provider.py` - Audio consumer API
- `GET /api/providers/audio_consumer/active` - Get where to send audio
- `GET /api/providers/audio_consumer/available` - List consumers
- `PUT /api/providers/audio_consumer/active` - Switch consumer
- ✅ `ushadow/backend/src/routers/audio_relay.py` - Multi-destination relay
- `WS /ws/audio/relay` - Fanout to multiple consumers
- ✅ `ushadow/backend/main.py` - Registered routers

### Mobile App Integration
- ✅ `ushadow/mobile/app/services/audioProviderApi.ts` - Consumer discovery API
- ✅ `ushadow/mobile/app/hooks/useMultiDestinationStreamer.ts` - Multi-cast support

### Documentation
- ✅ `docs/AUDIO_PROVIDER_ARCHITECTURE.md` - Complete architecture guide
- ✅ `MULTI_DESTINATION_AUDIO_EXAMPLE.md` - Relay examples

## How It Works

### Mobile App (Audio Input Provider)

```typescript
// 1. Mobile app asks: "Where should I send my audio?"
const consumer = await getActiveAudioConsumer(baseUrl, token);
// Returns: { provider_id: "chronicle", websocket_url: "ws://chronicle:5001/...", ...}

// 2. Mobile app connects to that consumer
const wsUrl = buildAudioStreamUrl(consumer, token);
await audioStreamer.startStreaming(wsUrl, 'streaming');

// 3. Mobile app sends audio
recorder.startRecording((audioData) => {
audioStreamer.sendAudio(audioData); // Goes to Chronicle
});
```

### Configuration Examples

**Send to Chronicle** (default):
```yaml
selected_providers:
audio_consumer: chronicle
```

**Send to Mycelia**:
```yaml
selected_providers:
audio_consumer: mycelia
```

**Send to BOTH (multi-destination)**:
```yaml
selected_providers:
audio_consumer: multi-destination

audio_consumer:
multi_dest_destinations: '[
{"name":"chronicle","url":"ws://chronicle:5001/chronicle/ws_pcm"},
{"name":"mycelia","url":"ws://mycelia:5173/ws_pcm"}
]'
```

## Testing

```bash
# Start backend
cd ushadow/backend
uvicorn main:app --reload

# Test API
curl http://localhost:8000/api/providers/audio_consumer/active

# Response:
{
"capability": "audio_consumer",
"selected_provider": "chronicle",
"config": {
"provider_id": "chronicle",
"websocket_url": "ws://chronicle-backend:5001/chronicle/ws_pcm",
"protocol": "wyoming",
"format": "pcm_s16le_16khz_mono"
}
}

# Switch to Mycelia
curl -X PUT http://localhost:8000/api/providers/audio_consumer/active \
-H "Authorization: Bearer TOKEN" \
-d '{"provider_id":"mycelia"}'
```

## Key Benefits

✅ **Correct Semantics**: Audio sources are inputs, processors are consumers
✅ **Flexible Routing**: Any source → any consumer(s)
✅ **No Hardcoding**: Mobile app discovers consumer dynamically
✅ **Multi-Destination**: Built-in fanout support
✅ **Follows Pattern**: Same structure as LLM/transcription providers
✅ **Provider Discovery**: Mobile apps query API instead of hardcoded URLs

## Next Steps

1. **Configure default consumer** in `config/config.defaults.yaml`
2. **Mobile app integration** - Use `getActiveAudioConsumer()` to discover endpoint
3. **Test routing** - Send mobile audio to Chronicle, then switch to Mycelia
4. **Try multi-destination** - Send audio to both simultaneously
Loading
Loading