Hello All,
I am new to livekit .I am trying to develop the Multilingual User Voice Agent. Whenever I speak in Tamil, It detects as English junk words. Below is the code. Any github reference to develop the Multilingual voice Agent using livekit? Below is my current code. How can we achieve when user speak in Tamil, it should be detected by STT as Tamil words. When User speak English, it should be detected by STT as English. Also, it always speak in Male voice eventhough I gave female in the configuration. COuld you please someone Guide on this? Really appreciate.
My code:
import logging
from dotenv import load_dotenv
from livekit import agents
from livekit.agents import AgentSession, Agent, RoomInputOptions
from livekit.plugins import silero, google, openai
from livekit.agents.llm import ChatContext
from livekit.plugins.turn_detector.multilingual import MultilingualModel
from prompt import PROMPT
#Working. ONly Tamil STT is not working
load_dotenv(".env")
class Assistant(Agent):
def __init__(self) -> None:
super().__init__(
instructions=PROMPT,
)
async def entrypoint(ctx: agents.JobContext):
session = AgentSession(
stt=google.STT(model="latest_long",spoken_punctuation=False,languages=["en-US","ta-IN"],punctuate=False),
llm=openai.LLM.with_together(model='meta-llama/Llama-3.3-70B-Instruct-Turbo-Free'),
tts=google.TTS(gender="female", language="en-US", enable_ssml=False),
vad=silero.VAD.load(),
turn_detection=MultilingualModel(),
)
await session.start(
room=ctx.room,
agent=Assistant(),
room_input_options=RoomInputOptions(
# For telephony applications, use
BVCTelephony
instead for best results
noise_cancellation=None #noise_cancellation.BVC(),
),
)
await session.generate_reply(
instructions="Greet the user and offer your assistance."
)
if
name == "__main__":
agents.cli.run_app(agents.WorkerOptions(entrypoint_fnc=entrypoint))