> ## Documentation Index
> Fetch the complete documentation index at: https://daily-main.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Recipes

> Pipecat code recipes: focused snippets and techniques for common voice agent tasks and pipeline patterns.

## LLM and tools

<Update label={<><Icon icon="code" size={16} color="currentColor" /><span style={{marginLeft: '8px'}}>Function Calling</span></>} tags={["LLM"]}>
  Add function calling to your Pipecat bot. Examples exist for each LLM provider supported in Pipecat.

  [View Recipe →](https://github.com/pipecat-ai/pipecat/blob/main/examples/getting-started/07-function-calling.py)
</Update>

<Update label={<><Icon icon="bolt" size={16} color="currentColor" /><span style={{marginLeft: '8px'}}>Direct Functions</span></>} tags={["LLM"]}>
  Skip the schema boilerplate: pass Python functions straight into the context and let Pipecat derive the tool schema from the signature and docstring.

  [View Recipe →](https://github.com/pipecat-ai/pipecat/blob/main/examples/function-calling/function-calling-direct.py)
</Update>

<Update label={<><Icon icon="clock" size={16} color="currentColor" /><span style={{marginLeft: '8px'}}>Async Function Calls</span></>} tags={["LLM"]}>
  Run long tool calls in the background so the bot keeps talking while the work finishes. Covers `@tool_options`, `on_function_calls_started`, and cancellation on interruption.

  [View Recipe →](https://github.com/pipecat-ai/pipecat/blob/main/examples/function-calling/function-calling-openai-async.py)
</Update>

<Update label={<><Icon icon="lightbulb" size={16} color="currentColor" /><span style={{marginLeft: '8px'}}>Reasoning Models</span></>} tags={["LLM"]}>
  Use a model's thinking/reasoning mode in a voice pipeline, including reasoning alongside function calls. Examples exist for Anthropic, Google, and OpenAI Responses.

  [View Recipe →](https://github.com/pipecat-ai/pipecat/blob/main/examples/thinking/thinking-anthropic.py)
</Update>

<Update label={<><Icon icon="magnifying-glass" size={16} color="currentColor" /><span style={{marginLeft: '8px'}}>Web Search</span></>} tags={["LLM"]}>
  Give the agent live web search with `KeenableWebSearch`, so it can answer questions about current events beyond the model's training data.

  [View Recipe →](https://github.com/pipecat-ai/pipecat/blob/main/examples/features/features-keenable-web-search.py)
</Update>

<Update label={<><Icon icon="screwdriver-wrench" size={16} color="currentColor" /><span style={{marginLeft: '8px'}}>MCP Tools</span></>} tags={["Integration"]}>
  Use MCP tools to interact with external services.

  [View Recipe →](https://github.com/pipecat-ai/pipecat/blob/main/examples/mcp/mcp-stdio.py)
</Update>

<Update label={<><Icon icon="screwdriver-wrench" size={16} color="currentColor" /><span style={{marginLeft: '8px'}}>MCP Tools (Streamable HTTP)</span></>} tags={["Integration"]}>
  Use MCP tools over Streamable HTTP transport for remote MCP servers.

  [View Recipe →](https://github.com/pipecat-ai/pipecat/blob/main/examples/mcp/mcp-streamable-http.py)
</Update>

<Update label={<><Icon icon="screwdriver-wrench" size={16} color="currentColor" /><span style={{marginLeft: '8px'}}>Multiple MCP Servers</span></>} tags={["Integration"]}>
  Combine tools from multiple MCP servers (stdio and HTTP) in a single bot.

  [View Recipe →](https://github.com/pipecat-ai/pipecat/blob/main/examples/mcp/mcp-multiple-mcp.py)
</Update>

## Context and memory

<Update label={<><Icon icon="compress" size={16} color="currentColor" /><span style={{marginLeft: '8px'}}>Summarize Context</span></>} tags={["Context"]}>
  Automatically compress conversation history as it approaches the token limit, preserving in-flight function calls. See [context summarization](/pipecat/fundamentals/context-summarization) for configuration, including using a cheaper dedicated LLM for the summary.

  [View Recipe →](https://github.com/pipecat-ai/pipecat/blob/main/examples/context-summarization/context-summarization-openai.py)
</Update>

<Update label={<><Icon icon="floppy-disk" size={16} color="currentColor" /><span style={{marginLeft: '8px'}}>Persist Context Across Sessions</span></>} tags={["Context"]}>
  Save and restore conversation context so a returning user picks up where they left off. Examples exist for standard LLMs and speech-to-speech models.

  [View Recipe →](https://github.com/pipecat-ai/pipecat/blob/main/examples/persistent-context/persistent-context-openai.py)
</Update>

<Update label={<><Icon icon="book-open" size={16} color="currentColor" /><span style={{marginLeft: '8px'}}>RAG with Gemini</span></>} tags={["Context"]}>
  Answer questions from a document the model was never trained on, by routing them through a second, cheaper model holding the source in its context window.

  [View Recipe →](https://github.com/pipecat-ai/pipecat/blob/main/examples/rag/rag-gemini.py)
</Update>

<Update label={<><Icon icon="database" size={16} color="currentColor" /><span style={{marginLeft: '8px'}}>Long-Term Memory (Mem0)</span></>} tags={["Context"]}>
  Store and recall memories across conversations with Mem0, so the bot personalizes its greeting and responses based on past interactions.

  [View Recipe →](https://github.com/pipecat-ai/pipecat/blob/main/examples/rag/rag-mem0.py)
</Update>

## Speech and audio

<Update label={<><Icon icon="microphone" size={16} color="currentColor" /><span style={{marginLeft: '8px'}}>Record Audio</span></>} tags={["Recording & Logging"]}>
  Collect audio frames from the user and bot for later processing or storage.

  [View Recipe →](https://github.com/pipecat-ai/pipecat/blob/main/examples/audio/audio-recording.py)
</Update>

<Update label={<><Icon icon="volume-high" size={16} color="currentColor" /><span style={{marginLeft: '8px'}}>Play Background Sound</span></>} tags={["Audio"]}>
  Play a background sound in your Pipecat bot. The audio is mixed with the transport audio to create a single integrated audio stream.

  [View Recipe →](https://github.com/pipecat-ai/pipecat/blob/main/examples/audio/audio-bot-background-sound.py)
</Update>

<Update label={<><Icon icon="music" size={16} color="currentColor" /><span style={{marginLeft: '8px'}}>Play Sound Effects</span></>} tags={["Audio"]}>
  Play sound effects in your Pipecat bot.

  [View Recipe →](https://github.com/pipecat-ai/pipecat/blob/main/examples/audio/audio-sound-effects.py)
</Update>

<Update label={<><Icon icon="spell-check" size={16} color="currentColor" /><span style={{marginLeft: '8px'}}>Speak Text Naturally</span></>} tags={["TTS"]}>
  Use `VoiceFormatter` so currency, phone numbers, dates, and acronyms are spoken the way a person would say them — "\$42.50" becomes "forty-two dollars and fifty cents" rather than "dollar sign four two point five zero".

  [View Recipe →](https://github.com/pipecat-ai/pipecat/blob/main/examples/features/features-voice-formatter.py)
</Update>

<Update label={<><Icon icon="wand-magic-sparkles" size={16} color="currentColor" /><span style={{marginLeft: '8px'}}>Custom Text Transforms</span></>} tags={["TTS"]}>
  Compose individual text transforms instead of the `VoiceFormatter` bundle, for fine-grained control over which run and in what order.

  [View Recipe →](https://github.com/pipecat-ai/pipecat/blob/main/examples/features/features-text-transforms.py)
</Update>

<Update label={<><Icon icon="masks-theater" size={16} color="currentColor" /><span style={{marginLeft: '8px'}}>Switch Voices Mid-Response</span></>} tags={["TTS"]}>
  Use `PatternPairAggregator` to switch TTS voices inside a single streamed response — a narrator and two characters in one story.

  [View Recipe →](https://github.com/pipecat-ai/pipecat/blob/main/examples/features/features-pattern-pair-voice-switching.py)
</Update>

<Update label={<><Icon icon="sliders" size={16} color="currentColor" /><span style={{marginLeft: '8px'}}>Update Settings at Runtime</span></>} tags={["STT/TTS/LLM"]}>
  Change STT, TTS, and LLM settings mid-session — voice, model, language, temperature. See [service settings](/pipecat/fundamentals/service-settings) for the API.

  [View Recipes →](https://github.com/pipecat-ai/pipecat/tree/main/examples/update-settings)
</Update>

## Turn management

<Update label={<><Icon icon="microphone-slash" size={16} color="currentColor" /><span style={{marginLeft: '8px'}}>Mute User Input</span></>} tags={["User Interaction"]}>
  Specify a strategy for mute to mute user input, allowing the bot to continue without interruption.

  [View Recipe →](https://github.com/pipecat-ai/pipecat/blob/main/examples/turn-management/turn-management-user-mute-strategy.py)
</Update>

<Update label={<><Icon icon="bell" size={16} color="currentColor" /><span style={{marginLeft: '8px'}}>Wake Phrase</span></>} tags={["User Interaction"]}>
  Use a wake phrase to wake up your Pipecat bot.

  [View Recipe →](https://github.com/pipecat-ai/pipecat/blob/main/examples/features/features-wake-phrase.py)
</Update>

<Update label={<><Icon icon="hourglass" size={16} color="currentColor" /><span style={{marginLeft: '8px'}}>Detect an Idle User</span></>} tags={["User Interaction"]}>
  Detect when a user is idle and automatically respond.

  [View Recipe →](https://github.com/pipecat-ai/pipecat/blob/main/examples/turn-management/turn-management-detect-user-idle.py)
</Update>

<Update label={<><Icon icon="brain" size={16} color="currentColor" /><span style={{marginLeft: '8px'}}>Smart Turn Detection</span></>} tags={["User Interaction"]}>
  Detect when a user has finished speaking and automatically respond. Learn more about [smart-turn model](https://github.com/pipecat-ai/smart-turn).

  [View Recipe →](https://github.com/pipecat-ai/pipecat/blob/main/examples/turn-management/turn-management-smart-turn-local.py)
</Update>

<Update label={<><Icon icon="hand" size={16} color="currentColor" /><span style={{marginLeft: '8px'}}>Interruption Strategies</span></>} tags={["User Interaction"]}>
  Learn how to configure interruption strategies for your Pipecat bot.

  [View Recipe →](https://github.com/pipecat-ai/pipecat/blob/main/examples/turn-management/turn-management-interruption-config.py)
</Update>

<Update label={<><Icon icon="filter" size={16} color="currentColor" /><span style={{marginLeft: '8px'}}>Filter Incomplete Turns</span></>} tags={["User Interaction"]}>
  Use the LLM to detect when the user was cut off mid-thought, suppress the response, and re-engage after a timeout instead of answering half a sentence.

  [View Recipe →](https://github.com/pipecat-ai/pipecat/blob/main/examples/turn-management/turn-management-filter-incomplete-turns.py)
</Update>

<Update label={<><Icon icon="stopwatch" size={16} color="currentColor" /><span style={{marginLeft: '8px'}}>Custom Turn-Stop Strategy</span></>} tags={["User Interaction"]}>
  Extend a turn-detecting STT's timing with your own stop strategy — hold the turn open for a beat after Deepgram Flux proposes the end, so afterthoughts land in the same user message.

  [View Recipe →](https://github.com/pipecat-ai/pipecat/blob/main/examples/turn-management/turn-management-custom-external-turn-strategy.py)
</Update>

<Update label={<><Icon icon="users" size={16} color="currentColor" /><span style={{marginLeft: '8px'}}>User and Bot Turn Events</span></>} tags={["Events"]}>
  Handle user and bot end of turn events to add custom logic after a turn.

  [View Recipe →](https://github.com/pipecat-ai/pipecat/blob/main/examples/turn-management/turn-management-turn-tracking-observer.py)
</Update>

## Multilingual

<Update label={<><Icon icon="language" size={16} color="currentColor" /><span style={{marginLeft: '8px'}}>Switch Languages</span></>} tags={["Multilingual"]}>
  A ParallelPipeline example showing how to dynamically switch languages.

  [View Recipe →](https://github.com/pipecat-ai/pipecat/blob/main/examples/features/features-switch-languages.py)
</Update>

<Update label={<><Icon icon="earth-americas" size={16} color="currentColor" /><span style={{marginLeft: '8px'}}>Live Translation</span></>} tags={["Multilingual"]}>
  Translate the user's speech into another language and speak it back in real time.

  [View Recipe →](https://github.com/pipecat-ai/pipecat/blob/main/examples/features/features-live-translation.py)
</Update>

## Telephony

<Update label={<><Icon icon="hashtag" size={16} color="currentColor" /><span style={{marginLeft: '8px'}}>DTMF Keypad Menu</span></>} tags={["Telephony"]}>
  Build a keypad-driven phone menu with no STT in the pipeline: `DTMFAggregator` turns each key sequence into a transcription the LLM reacts to. See [IVR navigation](/pipecat/fundamentals/ivr) for the other direction.

  [View Recipe →](https://github.com/pipecat-ai/pipecat/blob/main/examples/features/features-dtmf-menu.py)
</Update>

## Vision and video

<Update label={<><Icon icon="video" size={16} color="currentColor" /><span style={{marginLeft: '8px'}}>Describe Video</span></>} tags={["Vision"]}>
  Pass a video frame from a live video stream to a model and get a description.

  [View Recipe →](https://github.com/pipecat-ai/pipecat/blob/main/examples/vision/vision-openai.py)
</Update>

<Update label={<><Icon icon="film" size={16} color="currentColor" /><span style={{marginLeft: '8px'}}>Custom Video Tracks</span></>} tags={["Video"]}>
  Output more than one video track at once — the default camera track plus a second processed track sent to a custom destination.

  [View Recipe →](https://github.com/pipecat-ai/pipecat/blob/main/examples/video-processing/video-processing-custom-video-track.py)
</Update>

## Pipeline and reliability

<Update label={<><Icon icon="cubes" size={16} color="currentColor" /><span style={{marginLeft: '8px'}}>Custom Frame Processor</span></>} tags={["Pipeline"]}>
  Write your own `FrameProcessor` to inspect or transform frames as they move through the pipeline. See [custom frame processors](/pipecat/fundamentals/custom-frame-processor) for the walkthrough.

  [View Recipe →](https://github.com/pipecat-ai/pipecat/blob/main/examples/features/features-custom-frame-processor.py)
</Update>

<Update label={<><Icon icon="shuffle" size={16} color="currentColor" /><span style={{marginLeft: '8px'}}>Switch Services at Runtime</span></>} tags={["Pipeline"]}>
  Put two providers behind a `ServiceSwitcher` and move work between them mid-session, manually or on failure.

  [View Recipe →](https://github.com/pipecat-ai/pipecat/blob/main/examples/features/features-service-switcher.py)
</Update>

<Update label={<><Icon icon="heart-pulse" size={16} color="currentColor" /><span style={{marginLeft: '8px'}}>Handle Service Failures</span></>} tags={["Pipeline"]}>
  React to processor health with `is_usable` and `on_usable_changed`: fall back to a second TTS provider when the first stops working, and end the bot only when the last one is gone.

  [View Recipe →](https://github.com/pipecat-ai/pipecat/blob/main/examples/features/features-processor-usable.py)
</Update>

<Update label={<><Icon icon="box" size={16} color="currentColor" /><span style={{marginLeft: '8px'}}>Share App Resources</span></>} tags={["Pipeline"]}>
  Pass database handles, HTTP clients, or per-user state through `PipelineWorker(app_resources=...)` and read them from tool handlers and custom processors.

  [View Recipe →](https://github.com/pipecat-ai/pipecat/blob/main/examples/features/features-app-resources.py)
</Update>

## Debugging and observability

<Update label={<><Icon icon="file-lines" size={16} color="currentColor" /><span style={{marginLeft: '8px'}}>Capture Transcripts</span></>} tags={["Recording & Logging"]}>
  Capture user and bot transcripts for later processing or storage.

  [View Recipe →](https://github.com/pipecat-ai/pipecat/blob/main/examples/turn-management/turn-management-user-assistant-turns.py)
</Update>

<Update label={<><Icon icon="envelope" size={16} color="currentColor" /><span style={{marginLeft: '8px'}}>Collect Emails</span></>} tags={["Recording & Logging"]}>
  Parse user email from the LLM response.

  [View Recipe →](https://github.com/pipecat-ai/pipecat/blob/main/examples/features/features-user-email-gathering.py)
</Update>

<Update label={<><Icon icon="bug" size={16} color="currentColor" /><span style={{marginLeft: '8px'}}>Debug with an Observer</span></>} tags={["Debugging"]}>
  Learn how to debug your Pipecat bot with an Observer by observing frames flowing through the pipeline.

  [View Recipe →](https://github.com/pipecat-ai/pipecat/blob/main/examples/observability/observability-observer.py)
</Update>

<Update label={<><Icon icon="wave-square" size={16} color="currentColor" /><span style={{marginLeft: '8px'}}>Pipeline Heartbeats</span></>} tags={["Debugging"]}>
  Enable heartbeat frames to detect a stalled or blocked pipeline in production.

  [View Recipe →](https://github.com/pipecat-ai/pipecat/blob/main/examples/observability/observability-heartbeats.py)
</Update>

<Update label={<><Icon icon="monitor-waveform" size={16} color="currentColor" /><span style={{marginLeft: '8px'}}>Live Debugger (Whisker)</span></>} tags={["Debugging"]}>
  A live graphical debugger for the Pipecat voice and multimodal conversational AI framework. It lets you visualize pipelines and debug frames in real time — so you can see exactly what your bot is thinking and doing.

  [View Recipe →](https://github.com/pipecat-ai/whisker)
</Update>

***

## 💡 Need Help Getting Started?

<CardGroup cols={3}>
  <Card title="More Recipes" icon="github" href="https://github.com/pipecat-ai/pipecat/tree/main/examples">
    Browse all recipes on GitHub
  </Card>

  <Card title="Examples" icon="folder" href="/pipecat/examples/overview">
    Browse complete applications
  </Card>

  <Card title="Discord Community" icon="discord" href="https://discord.gg/pipecat">
    Get help from the community
  </Card>
</CardGroup>
