这是indexloc提供的服务,不要输入任何密码
Skip to content

Multilingual Agent (STT and TTS); is that possible with LiveKit? #1335

@vvv-001

Description

@vvv-001

Hi,

I recently started using LiveKit for building an Agent, so far I have been able to make it work with a simple RAG Example.

    stt_google = google.STT(
        languages=["nl-NL", "en-US"],
        detect_language=True, interim_results=True)

    stt_openai = openai.STT(detect_language=True)
    language = stt_openai.

    tts = google.TTS(language="nl-NL", voice_name="nl-NL-Standard-C")

    agent = VoicePipelineAgent(
        vad=ctx.proc.userdata["vad"],
        stt=stt_openai,
        llm=openai.LLM(model="gpt-4o-mini"),
        tts=tts,
        chat_ctx=initial_ctx,
        turn_detector=turn_detector.EOUModel(),
        will_synthesize_assistant_reply=will_synthesize_assistant_reply_rag,
    )

The scenario I am looking to implement is as follows (either using Google Speech or OpenAI Whisper): the user talks in a number of languages, English, Dutch, French, Spanish etc. Based on this I want to be able to get (detect) the spoken language by the user and set the language spoken by the Agent. Have been going through Slack and documentation, but am unable to find out how to best do this.

Any pointers or tips and experiences are welcome. Thanks in adance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions