快速接入总览
OtterVoice 是会话编排 SDK,不是模型网关。你要做的是:选一个 Runtime、注入 Providers、监听 Session 事件。
场景 → 示例
Section titled “场景 → 示例”| 场景 | 示例 | 命令 |
|---|---|---|
| 最小闭环(无麦克风 / 无 Key) | examples/node-cli |
bun run demo |
| Node + 真实 LLM | examples/node-openrouter |
bun run examples/node-openrouter/index.ts |
| 浏览器全双工(原生 Audio LLM / 服务端级联可切换) | examples/web |
cd examples/web && bun run start |
| 浏览器 Audio LLM + 策略网关 | examples/web-audio-llm-only |
bun run examples/web-audio-llm-only/server.ts |
| Expo App | examples/react-native-expo |
cd examples/react-native-expo && bun run start |
| 限权短期令牌(仅适用 Provider) | examples/token-broker |
bun run examples/token-broker/server.ts |
仓库入口:github.com/bugkiwi/OtterVoice
- 用 Mock 把 UI / 字幕 / 状态机跑通。
- 换成目标平台 Runtime(Web / Expo / Node)。
- 请求/响应模型默认走服务端策略网关;只有 Provider 能签发真正限权凭证时,才使用 Token Broker。长期 Key、prompt、model 和成本控制都不能打进客户端包。
bun add @ottervoice/core# Web: bun add @ottervoice/runtime-web# Expo: bun add @ottervoice/runtime-react-native# Node: bun add @ottervoice/runtime-node# Providers: @ottervoice/provider-deepgram | elevenlabs | openrouter | azure-speech