diff --git a/package.json b/package.json index 5ee3f8d..1f3f37e 100644 --- a/package.json +++ b/package.json @@ -19,21 +19,21 @@ "pnpm": ">=10.0.0" }, "devDependencies": { - "@eslint/js": "^9.39.4", + "@eslint/js": "^9.39.5", "@trivago/prettier-plugin-sort-imports": "^5.2.2", - "@types/node": "^24.10.1", - "eslint": "^9.39.4", + "@types/node": "^24.13.5", + "eslint": "^9.39.5", "globals": "^16.5.0", - "jiti": "^2.6.1", + "jiti": "^2.7.0", "typescript": "^5.9.3", - "typescript-eslint": "^8.58.1", - "vitest": "^4.1.4" + "typescript-eslint": "^8.70.0", + "vitest": "^4.1.11" }, "dependencies": { - "@livekit/agents": "^1.6.3", - "@livekit/plugins-ai-coustics": "^0.2.14", - "@livekit/rtc-node": "^0.13.31", - "dotenv": "^17.4.1", - "zod": "^4.4.3" + "@livekit/agents": "^1.9.0", + "@livekit/plugins-ai-coustics": "^0.3.2", + "@livekit/rtc-node": "^0.13.35", + "dotenv": "^17.4.2", + "zod": "^4.6.5" } } diff --git a/src/agent.ts b/src/agent.ts index 1118c4b..34f88ad 100644 --- a/src/agent.ts +++ b/src/agent.ts @@ -42,13 +42,14 @@ export function createAgent() { llm: new inference.LLM({ model: 'google/gemma-4-31b-it' }), // To use a realtime model instead of a voice pipeline, replace the LLM - // with a RealtimeModel and remove the STT/TTS from the AgentSession - // (Note: This is for the OpenAI Realtime API. For other providers, see https://docs.livekit.io/agents/models/realtime/) + // with a realtime model and remove the STT/TTS from the AgentSession + // (Note: This is for OpenAI GPT-Live, the recommended speech-to-speech model. + // For other providers, see https://docs.livekit.io/agents/models/realtime/) // 1. Install '@livekit/agents-plugin-openai' // 2. Set OPENAI_API_KEY in .env.local // 3. Add `import * as openai from '@livekit/agents-plugin-openai'` to the top of this file // 4. Replace the llm option with: - // llm: new openai.realtime.RealtimeModel({ voice: 'marin' }), + // llm: new openai.realtime.GPTLiveModel({ voice: 'marin' }), // To add tools, specify `tools` in the constructor. // Here's an example that adds a simple weather tool. diff --git a/src/main.ts b/src/main.ts index 81e6d4c..56e25fb 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,5 +1,5 @@ import { ServerOptions, cli, defineAgent, inference, voice } from '@livekit/agents'; -import { audioEnhancement } from '@livekit/plugins-ai-coustics'; +import { EnhancerModel, audioEnhancement } from '@livekit/plugins-ai-coustics'; import dotenv from 'dotenv'; import { fileURLToPath } from 'node:url'; import { createAgent } from './agent.ts'; @@ -55,7 +55,7 @@ export default defineAgent({ inputOptions: { // ai-coustics QUAIL audio enhancement for noise cancellation // Works for both WebRTC and telephony (SIP) participants - noiseCancellation: audioEnhancement({ model: 'quailVfS' }), + noiseCancellation: audioEnhancement({ model: EnhancerModel.QuailVfS }), }, });