# LiveKit Voice AI Agent - 部署状态

## ✅ 所有组件就绪

| 组件 | 状态 | 配置 |
|------|------|------|
| TEN VAD | ✅ | 本地, 0.234ms/帧 |
| FunASR STT | ✅ | localhost:8080 |
| Agnes AI LLM | ✅ | api.agnes-ai.cn/v1 |
| Edge TTS | ✅ | zh-CN-XiaoxiaoNeural |
| LiveKit Server | ✅ | localhost:7880 (Docker) |

## 🚀 启动命令

```bash
source ~/s2s-env/bin/activate
cd /Users/leo/.hermes/workspace/livekit-agents
python3 agent_server.py
```

## 📱 React Native 测试

### 1. 生成 Token
```bash
source ~/s2s-env/bin/activate
python3 -c "
from livekit.agents import generate_token
token = generate_token(room='voice-ai-test', identity='user1')
print(token)
"
```

### 2. React Native 代码
```javascript
import { LiveKitRoom, RoomEvent } from 'livekit-client';

function VoiceChat() {
  return (
    <LiveKitRoom
      serverUrl="ws://YOUR_MAC_IP:7880"
      token="YOUR_TOKEN"
      connectOptions={{ autoSubscribe: true }}
    >
      {/* VoiceAssistant component will auto-connect */}
    </LiveKitRoom>
  );
}
```

### 3. 测试步骤
1. 启动 Agent: `python3 agent_server.py`
2. 获取 Room Token
3. React Native 连接并测试语音对话

## 📊 测试结果

```
✅ STT: {'text': '그', 'status': 'success'}
✅ LLM: 你好！我是 Agnes，由 Sapiens
✅ TTS: 15984 bytes (1.0秒音频)
```
