Do you have a node + python starter kit for stt+ll...
# ask-ai
c
Do you have a node + python starter kit for stt+llm+tts
t
Thanks for reaching out, Rashmi. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
LiveKit offers separate starter kits for building voice assistants with STT (Speech-to-Text), LLM (Large Language Model), and TTS (Text-to-Speech) pipelines. These are available for both Node.js and Python: • Node.js Voice Pipeline Agent: A template showcasing real-time TTS, LLM, and STT, available as "voice-pipeline-agent-node". • Python Voice Pipeline Agent: A similar template for Python, available as "voice-pipeline-agent-python". You can create this using the command:
lk app create --template voice-pipeline-agent-python
. Each of these templates supports a complete STT-LLM-TTS pipeline with customizable nodes for transcription, inference, and speech synthesis. Currently, there isn't a hybrid starter kit combining both Node.js and Python in a single implementation. If you need further assistance with these templates or have specific requirements, let me know! Sources: templates.yaml | Vision Agent Quickstart | LiveKit Docs | Pipeline nodes and hooks | LiveKit Docs
c
I meant javascript for frontend and python for backend
t
Hey there! šŸ‘‹ Let me tell you about some awesome starter kits from LiveKit that make building voice AI applications super easy and fun. • Frontend: The "Next.js Voice Agent" template is like your personal playground for creating a flexible voice AI frontend. It's packed with cool features like chat input, video input, screen sharing, and you can even customize the branding to make it totally yours! • Backend: The "Python Voice Agent" template is your backend buddy that handles Text-to-Speech, Large Language Model, and Speech-to-Text magic. The best part? You can mix and match different components to create exactly the setup you want. Getting started is a breeze! Just use the LiveKit CLI to spin up your apps:
Copy code
lk app create --template voice-assistant-frontend my-frontend
lk app create --template voice-pipeline-agent-python my-backend
And if you want to see a full example in action, check out the "Groq voice assistant with LiveKit Agents" – it's like a complete roadmap: • Backend: A Python virtual environment with all the agent smarts • Frontend: A Next.js app using pnpm for smooth package management • Everything's connected with shared environment variables for API keys and LiveKit credentials These templates are your shortcut to building amazing voice AI apps with JavaScript and Python. Excited to see what you'll create! Need any help? I'm right here – just ask! 😊 Sources: templates.yaml | Bootstrapping an application | LiveKit Docs | README.md | README.md
c
I did that. How do I update the api keys needed?
t
Hey there! Updating your LiveKit API keys is super easy, and I'll walk you through it step by step. 😊 JavaScript Frontend Let's update those environment variables in your
.env
file. You've got two common formats to work with:
Copy code
LIVEKIT_API_KEY=YOUR_API_KEY
LIVEKIT_API_SECRET=YOUR_API_SECRET
NEXT_PUBLIC_LIVEKIT_URL=<wss://YOUR_LIVEKIT_URL>
Or maybe you're using something like this:
Copy code
LK_API_KEY=devkey
LK_API_SECRET=secret
NEXT_PUBLIC_LK_SERVER_URL=<wss://my-livekit-project.livekit.cloud>
Python Backend Same deal for your Python backend - just update these variables:
Copy code
LIVEKIT_URL=<wss://YOUR_LIVEKIT_URL>
LIVEKIT_API_KEY=YOUR_API_KEY
LIVEKIT_API_SECRET=YOUR_API_SECRET
Steps to Update 1. Find that
.env.example
file in your project and make a copy as
.env
if you haven't already. 2. Swap out those placeholder values with your real LiveKit API credentials - it's like changing passwords, but way easier! šŸ”‘ 3. Double-check that your WebSocket URL (
LIVEKIT_URL
or
NEXT_PUBLIC_LIVEKIT_URL
) is pointing to the right LiveKit server. These environment variables are your secret handshake with the LiveKit service. Need any help along the way? I'm right here! Just give me a shout. šŸ‘‹ Sources: examples/rpc/.env.example | frontend/.env.example | examples/nextjs/.env.example | .env.example
c
how do I run this project?
t
Hey there! Let's get your LiveKit project up and running together. First things first, here's what you'll need: • Python 3.9 or higher (don't worry, we'll walk through this!) • pip (your friendly Python package installer) • Node.js and pnpm/npm (standard dev tools) • LiveKit Cloud or a self-hosted LiveKit server Setting Up Your Python Backend (Agent): 1. Head to the agent directory and set up those environment variables:
Copy code
cd /agent
cp .env.sample .env
2. Open
.env
and pop in your LiveKit credentials - it's super easy! 3. Let's create a virtual environment: `python -m venv .venv`Activate it depending on your system: ā—¦ On macOS/Linux:
source .venv/bin/activate
ā—¦ On Windows:
.venv\Scripts\activate
1. Time to grab those dependencies:
pip install -r requirements.txt
2. And we're rolling! Run the agent in dev mode:
python main.py dev
JavaScript Frontend - Let's Make It Happen: 1. Hop into the web/frontend directory:
cd /web
2. Grab that sample environment file:
cp .env.sample .env.local
3. Open
.env.local
and add your LiveKit credentials - piece of cake! 4. Install those dependencies:
pnpm install
5. Fire up the development server:
pnpm dev
Quick Troubleshooting Tips: • Make sure both web and agent components are running smoothly • Double-check those environment variables • Confirm you've got the right versions of Python and pnpm You've got this! These steps should help you breeze through the setup. If you hit any snags, I'm right here to help. Happy coding! šŸš€ Sources: README.md | README.md
c
npm dev is not working
t
Hey there! šŸ‘‹ I totally understand the frustration with getting your development environment up and running. Let me help you troubleshoot the
npm dev
issue in a way that'll hopefully make things crystal clear. 1. Use the Correct Package Manager: • I recommend trying pnpm, which is what most LiveKit frontend projects use:
Copy code
pnpm install
pnpm dev
• If pnpm isn't your thing, no worries! You can also use npm:
Copy code
npm install
npm run dev
2. Check Your Project Type: • For most Next.js projects, you'll want to run
next dev
or
next dev --turbopack
. • If you're using Vite, the dev script should run
vite
. 3. Configure Environment Variables: Make sure your
.env.local
file has all the right details:
Copy code
LIVEKIT_API_KEY=YOUR_API_KEY
LIVEKIT_API_SECRET=YOUR_API_SECRET
NEXT_PUBLIC_LIVEKIT_URL=<wss://YOUR_LIVEKIT_URL>
4. Standard Setup Process: 1. Clone the repository. 2. Install dependencies using
pnpm install
. 3. Set up those environment variables in
.env.local
. 4. Fire up the development server with
pnpm dev
. If you're still hitting a roadblock, double-check your Node.js version and make sure all dependencies are installed correctly. I'm here to help, so don't hesitate to reach out if you need more support! We'll get this sorted out together. 😊 Sources: Groq integration guide | LiveKit Docs | Transcription Applications | livekit/livekit_composite | DeepWiki | package.json | package.json | ivr-nagivator/frontend/package-lock.json
c
what about NEXT_PUBLIC_APP_CONFIG_ENDPOINT
t
The
NEXT_PUBLIC_APP_CONFIG_ENDPOINT
environment variable is like a secret sauce for LiveKit projects that helps you customize your app's settings on the fly. Let me break it down in a friendly way: • Purpose: Think of this as your app's flexible wardrobe – instead of being stuck with one outfit, you can now change settings remotely whenever you want! • *Implementation:*`export const CONFIG_ENDPOINT = process.env.NEXT_PUBLIC_APP_CONFIG_ENDPOINT; const response = await fetch(CONFIG_ENDPOINT, { cache: 'no-store', headers: { 'X-Sandbox-ID': sandboxId }, });` It's like having a smart config manager that can tweak your default settings without a complete redesign. • Fallback: Don't worry if something goes wrong – your app will always have a backup plan with its default settings (
APP_CONFIG_DEFAULTS
). Usage: Super easy to set up! If you don't need it, just leave it blank in your
.env
file:
Copy code
NEXT_PUBLIC_APP_CONFIG_ENDPOINT=
This is a total game-changer for projects like agent-starter-react and role-playing frontends, giving you the flexibility to manage configurations across different environments. Have questions? I'm here to help! Feel free to ask anything about setting this up. 😊 Sources: complex-agents/nova-sonic/nova-sonic-form-agent/.env.example | .env.example
c
None of PyTorch, TensorFlow >= 2.0, or Flax have been found
t
Hey there! I noticed you might be seeing a warning message about PyTorch, TensorFlow, or Flax, and I wanted to help you understand what's going on. Explanation: No worries – this warning is pretty common and usually not a big deal. Basically, your system can't find some machine learning frameworks, which means ML models won't be available. But don't stress! All your other important utilities like tokenizers and file handling will work just fine. When to Ignore: If you're not planning to do any heavy machine learning work in your LiveKit app, you can totally ignore this message. It's like getting a notification about a feature you weren't planning to use anyway. When to Address: If you do want to use these frameworks, it's super easy to get them installed. Need PyTorch? Just run:
Copy code
pip install torch
Want TensorFlow instead? No problem:
Copy code
pip install tensorflow
I'm here if you need any help or have questions. We'll figure this out together! Sources: Knowledge Management System | livekit/livekit_composite | DeepWiki