Skip to content

Commit eef9f33

Browse files
Merge pull request #39 from livekit-examples/add-aicoustics-default
Add aicoustics for noise cancellation to starter project
2 parents 47d06ec + 419193f commit eef9f33

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"@livekit/agents": "^1.2.4",
3838
"@livekit/agents-plugin-livekit": "^1.2.4",
3939
"@livekit/agents-plugin-silero": "^1.2.4",
40-
"@livekit/noise-cancellation-node": "^0.1.9",
40+
"@livekit/plugins-ai-coustics": "^0.2.10",
4141
"dotenv": "^17.4.1",
4242
"zod": "^3.25.76"
4343
}

src/main.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
} from '@livekit/agents';
1010
import * as livekit from '@livekit/agents-plugin-livekit';
1111
import * as silero from '@livekit/agents-plugin-silero';
12-
import { BackgroundVoiceCancellation } from '@livekit/noise-cancellation-node';
12+
import { audioEnhancement } from '@livekit/plugins-ai-coustics';
1313
import dotenv from 'dotenv';
1414
import { fileURLToPath } from 'node:url';
1515
import { AGENT_MODEL, Agent } from './agent';
@@ -71,10 +71,9 @@ export default defineAgent({
7171
agent: new Agent(),
7272
room: ctx.room,
7373
inputOptions: {
74-
// LiveKit Cloud enhanced noise cancellation
75-
// - If self-hosting, omit this parameter
76-
// - For telephony applications, use `BackgroundVoiceCancellationTelephony` for best results
77-
noiseCancellation: BackgroundVoiceCancellation(),
74+
// ai-coustics QUAIL audio enhancement for noise cancellation
75+
// Works for both WebRTC and telephony (SIP) participants
76+
noiseCancellation: audioEnhancement({ model: 'quailVfL' }),
7877
},
7978
});
8079

0 commit comments

Comments
 (0)