remove lambda and just use aicoustics for noise cancellation (#65)
This commit is contained in:
+1
-1
@@ -10,7 +10,7 @@ requires-python = ">=3.10, <3.15"
|
||||
|
||||
dependencies = [
|
||||
"livekit-agents[silero,turn-detector]~=1.5",
|
||||
"livekit-plugins-noise-cancellation~=0.2",
|
||||
"livekit-plugins-ai-coustics~=0.2",
|
||||
"python-dotenv",
|
||||
]
|
||||
|
||||
|
||||
+3
-7
@@ -1,7 +1,6 @@
|
||||
import logging
|
||||
|
||||
from dotenv import load_dotenv
|
||||
from livekit import rtc
|
||||
from livekit.agents import (
|
||||
Agent,
|
||||
AgentServer,
|
||||
@@ -12,7 +11,7 @@ from livekit.agents import (
|
||||
inference,
|
||||
room_io,
|
||||
)
|
||||
from livekit.plugins import noise_cancellation, silero
|
||||
from livekit.plugins import ai_coustics, silero
|
||||
from livekit.plugins.turn_detector.multilingual import MultilingualModel
|
||||
|
||||
logger = logging.getLogger("agent")
|
||||
@@ -111,11 +110,8 @@ async def my_agent(ctx: JobContext):
|
||||
room=ctx.room,
|
||||
room_options=room_io.RoomOptions(
|
||||
audio_input=room_io.AudioInputOptions(
|
||||
noise_cancellation=lambda params: (
|
||||
noise_cancellation.BVCTelephony()
|
||||
if params.participant.kind
|
||||
== rtc.ParticipantKind.PARTICIPANT_KIND_SIP
|
||||
else noise_cancellation.BVC()
|
||||
noise_cancellation=ai_coustics.audio_enhancement(
|
||||
model=ai_coustics.EnhancerModel.QUAIL_VF_L
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user