How can I host a livekit agent on my own device (M...
# ask-ai
a
How can I host a livekit agent on my own device (MAc Mini) with my own models (open source stt, llm, tts)
t
Thanks for reaching out, Anthony. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks for reaching out! Just to make sure I understand correctly, are you looking to integrate your open-source models (STT, LLM, TTS) with LiveKit's real-time communication platform, or are you interested in hosting a standalone LiveKit server on your Mac Mini? Also, if you have any specific needs or constraints for this setup, please feel free to share them—I’m here to help you every step of the way!
a
I'm interested in a standalone livekit server on my Mac Mini
t
To help you get started with hosting a standalone LiveKit server on your Mac Mini, here’s a simple step-by-step guide: 1. Install LiveKit Server via Homebrew You can easily install LiveKit by running this command:
brew install livekit
2. Start LiveKit in Development Mode Once installed, start the server with default credentials by running:
livekit-server --dev
Just so you know, the default credentials are:
API Key: devkey
API Secret: secret
3. Configure Network Binding (Optional) If you want devices outside your local machine to connect, you can bind the server to all network interfaces like this:
livekit-server --dev --bind 0.0.0.0
4. Generate an Access Token To authenticate clients, you’ll need to create an access token using the LiveKit CLI:
Copy code
lk token create \
    --api-key devkey --api-secret secret \
    --join --room my-first-room --identity user1 \
    --valid-for 24h
5. Connect Using a Client You can now test your setup with a LiveKit client, like the example app. Just use: ◦ Server URL:
ws://[your-mac-mini-ip]:7880
(make sure to replace this with your Mac Mini’s actual network IP if you’re connecting from another device) ◦ The access token you just generated When you’re ready to move to production, I recommend checking out the deployment guides. They’ll walk you through setting up TLS, proper authentication, and other important production configurations to keep everything secure and running smoothly. Sources: README.md | Running LiveKit locally | LiveKit Docs
a
How do I deal with the import of the models
t
I'd love to better understand how you're planning to use your models (STT, LLM, TTS) with the LiveKit server. Are you thinking about processing audio streams in real-time, or perhaps using these models for post-processing or other tasks? Your insights will really help me assist you more effectively!
a
I'm thinking of processing audio streams in real-time, having all the same code as I do with a livekit agent but on my Mac Mini (which will have the models on prem)
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!