I want to use livekit inference, where can I learn...
# ask-ai
c
I want to use livekit inference, where can I learn more about the syntax of the string defining the specific options for the stt, llm and tts?
t
Thanks for reaching out, Guillaume. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
I'm glad you're interested in setting up options for STT, LLM, and TTS in LiveKit inference! Let's walk through how you can initialize each service with the right parameters. Here are some helpful examples: 1. Speech-to-Text (STT): • Using Groq STT:
Copy code
from livekit.plugins import groq

stt = groq.STT(
    model="whisper-large-v3-turbo",
    language="en"
)
• Using Google Cloud STT:
Copy code
from livekit.plugins import google

stt = google.STT(
    model="chirp",
    spoken_punctuation=False,
    language="en-US"
)
2. Large Language Model (LLM): • Using Groq LLM:
Copy code
llm = groq.LLM(
    model="llama3-8b-8192"
)
• Using Cerebras via OpenAI plugin:
Copy code
from livekit.plugins import openai

llm = openai.LLM.with_cerebras(
    model="llama3.1-8b",
    temperature=0.8
)
3. Text-to-Speech (TTS): • Using Groq TTS:
Copy code
tts = groq.TTS(
    model="playai-tts",
    voice="Arista-PlayAI"
)
Once you've defined these components, you can easily pass them into an
AgentSession
like this:
Copy code
session = AgentSession(
    stt=stt,
    llm=llm,
    tts=tts
)
If you'd like to dive deeper into the available parameters and supported models, I recommend checking out the plugin documentation for each provider. Feel free to reach out if you have any questions along the way—I'm here to help! Sources: Groq and LiveKit | LiveKit Docs | Docs::Agents | Docs::Agents | livekit-agents/livekit/agents/inference/__init__.py | agents/src/inference/stt.ts
c
in the documentation there is this syntax
Copy code
session = AgentSession(
        stt="assemblyai/universal-streaming:en",
        llm="openai/gpt-4.1-mini",
        tts="cartesia/sonic-2:9626c31c-bec5-4cca-baa8-f8ba9e84c8bc",
how can I learn more about it?
t
I don't have the answer you're looking for. You could also try asking your question: • in one of the other Slack channels or • to https://deepwiki.com/livekit/livekit_composite which is trained on all LiveKit source code If you find the answer, please post it here to help others!