what is voice command functionality?
# ask-ai
h
what is voice command functionality?
t
Thanks for reaching out, YUNYI. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Voice command functionality in LiveKit makes it super easy for users to chat with AI agents in real-time using just their voice. It processes audio so you can speak commands and get responses right away, making interactions feel natural and smooth. Here’s what it includes: • Speech-to-Text (STT), Large Language Model (LLM) processing, and Text-to-Speech (TTS) synthesis to handle your voice input and output seamlessly. • Voice Activity Detection (VAD) and turn detection to keep conversations flowing without interruptions. • Integration with LiveKit Rooms so voice commands are processed and responded to instantly. • Support for controlling devices like lights and speakers through simple voice-triggered functions. • Preconnect audio buffering to speed up response times and keep things snappy. If you’re thinking about building an interactive voice assistant or just want to explore how this works, I’m here to help! Feel free to ask for more info or guidance anytime. Sources: Agent speech and audio | LiveKit Docs | Voice Assistants | livekit/livekit_composite | DeepWiki | solutions/openai_demo/README.md | TEMPLATE.md | README.md
h
I mean some command like "new paragraph", "new line"
t
LiveKit doesn’t have built-in support for voice commands like “new paragraph” or “new line” to format text just yet. But the great news is, its transcription and voice processing features can be customized to handle those kinds of commands. For instance, you could add a custom handler in the voice pipeline that listens for phrases like “new paragraph” and then adds the right formatting to your text. If you want, I’d be happy to help you set this up—just let me know! Sources: livekit-agents/livekit/agents/voice/chat_cli.py | agents/src/tokenize/tokenizer.test.ts | README.md | macos/Runner/Base.lproj/MainMenu.xib | examples/GumTestApp_macOS/macos/GumTestApp_macOS-macOS/Base.lproj/Main.stor...
h
do you have documents?
t
Hey there! LiveKit offers a few friendly ways to set up custom voice commands like "new paragraph" or "new line" to make your experience smoother: 1. Using LLM Tools: You can create custom tools that understand spoken commands and turn them into actions. For instance, a tool that hears "new paragraph" and adds a paragraph break for you. 2. Keyword Detection: By using hooks like
on_user_turn_completed()
, you can check the transcribed text and trigger actions whenever certain phrases pop up. 3. Client-Side Messaging: Another way is to handle voice commands right on your device and send custom messages to LiveKit to make things happen. If you want to dive deeper, here are some handy resources: • LiveKit Recipes – This has examples on keyword detection and using tools. • Voice AI Quickstart – A step-by-step guide to get your voice AI up and running. Feel free to reach out if you want me to walk you through a specific example or help with anything else! Sources: examples/src/realtime_agent.ts | Docs::Agents | LiveKit Docs | solutions/doorbell_local/main/webrtc_test.html | examples/voice_agents/silent_function_call.py