From e719cbbe6d3a6ceb759078d3f9c1600b5210b2de Mon Sep 17 00:00:00 2001 From: Mark Backman Date: Tue, 31 Mar 2026 09:58:05 -0400 Subject: [PATCH] Reorganize examples into topic-based subfolders Move 304 examples from a flat numbered directory into 14 descriptive subfolders: getting-started, services (speech + function-calling), transcription, vision, realtime, persistent-context, context-summarization, update-settings (stt/tts/llm), turn-management, thinking-and-mcp, transports, video-avatar, video-processing, and features. Strip numbered prefixes from filenames (e.g. 07c-interruptible-deepgram.py becomes services/speech/deepgram.py) since the folder context makes them redundant. Keep numbered prefixes only in getting-started/ where ordering matters. Update eval script paths and README to match the new structure. --- README.md | 2 +- examples/01-say-one-thing-piper.py | 71 ---- examples/01-say-one-thing-rime.py | 72 ---- examples/01b-livekit-audio.py | 64 ---- examples/01c-nvidia-riva-tts.py | 64 ---- examples/03-still-frame.py | 84 ----- examples/README.md | 113 +++--- .../dedicated-llm.py} | 0 .../google.py} | 0 .../manual-openai.py} | 0 .../openai.py} | 0 .../audio-recording.py} | 0 .../before-and-after-events.py} | 0 .../bot-background-sound.py} | 0 .../concurrent-llm-evaluation.py} | 0 .../concurrent-llm-rtvi-ignored-sources.py} | 0 .../custom-frame-processor.py} | 0 .../gemini-grounding-metadata.py} | 0 .../gemini-rag.py} | 0 .../gpu-container-local-bot.py} | 0 .../heartbeats.py} | 0 .../live-translation.py} | 0 examples/{37-mem0.py => features/mem0.py} | 0 .../{30-observer.py => features/observer.py} | 0 .../pattern-pair-voice-switching.py} | 0 .../sentry-metrics.py} | 0 .../service-switcher.py} | 0 .../sound-effects.py} | 0 .../switch-languages.py} | 0 .../switch-voices.py} | 0 .../user-email-gathering.py} | 0 .../voicemail-detection.py} | 0 .../wake-phrase.py} | 0 .../{ => getting-started}/01-say-one-thing.py | 0 .../{ => getting-started}/01a-local-audio.py | 0 .../02-llm-say-one-thing.py | 0 .../03-still-frame.py} | 0 .../03a-local-still-frame.py | 0 .../04-sync-speech-and-image.py} | 0 .../05-speaking-state.py} | 4 +- .../06-voice-agent.py} | 0 .../06a-voice-agent-local.py} | 0 .../07-function-calling.py} | 0 .../anthropic.py} | 0 .../aws-nova-sonic.py} | 0 .../gemini.py} | 0 .../grok-realtime.py} | 0 .../openai-realtime-beta.py} | 0 .../openai-realtime.py} | 0 .../openai-responses-http.py} | 0 .../openai-responses.py} | 0 .../openai.py} | 0 .../aws-nova-sonic.py} | 0 .../azure-beta.py} | 0 .../azure.py} | 0 .../gemini-live-files-api.py} | 0 .../gemini-live-function-calling.py} | 0 .../gemini-live-google-search.py} | 0 .../gemini-live-graceful-end.py} | 0 .../gemini-live-grounding-metadata.py} | 0 .../gemini-live-local-vad.py} | 0 .../gemini-live-vertex-function-calling.py} | 0 .../gemini-live-video.py} | 0 .../gemini-live.py} | 0 .../{51-grok-realtime.py => realtime/grok.py} | 0 .../openai-beta-text.py} | 0 .../openai-beta.py} | 0 .../openai-live-video.py} | 0 .../openai-text.py} | 0 .../openai.py} | 0 .../ultravox-text.py} | 0 .../ultravox.py} | 0 .../function-calling/anthropic-video.py} | 0 .../function-calling/anthropic.py} | 0 .../function-calling/aws-video.py} | 0 .../function-calling/aws.py} | 0 .../function-calling/azure.py} | 0 .../function-calling/cerebras.py} | 0 .../function-calling/deepseek.py} | 0 .../function-calling/direct.py} | 0 .../function-calling/fireworks.py} | 0 .../function-calling/gemini-openai-format.py} | 0 .../function-calling/google-vertex-ai.py} | 0 .../function-calling/google-video.py} | 0 .../function-calling/google.py} | 0 .../function-calling/grok.py} | 0 .../function-calling/groq.py} | 0 .../function-calling/mistral.py} | 0 .../function-calling/moondream-video.py} | 0 .../function-calling/nebius.py} | 0 .../function-calling/novita.py} | 0 .../function-calling/nvidia.py} | 0 .../function-calling/ollama.py} | 0 .../openai-responses-http.py} | 0 .../openai-responses-video-http.py} | 0 .../openai-responses-video.py} | 0 .../function-calling/openai-responses.py} | 0 .../function-calling/openai-video.py} | 0 .../function-calling/openai.py} | 0 .../function-calling/openrouter.py} | 0 .../function-calling/perplexity.py} | 0 .../function-calling/qwen.py} | 0 .../function-calling/sambanova.py} | 0 .../function-calling/sarvam.py} | 0 .../function-calling/together.py} | 0 .../speech/aicoustics.py} | 0 .../speech/assemblyai-turn-detection.py} | 0 .../speech/assemblyai.py} | 0 .../speech/asyncai-http.py} | 0 .../speech/asyncai.py} | 0 .../speech/aws-strands.py} | 0 .../speech/aws.py} | 0 .../speech/azure-http.py} | 0 .../speech/azure.py} | 0 .../speech/camb.py} | 0 .../speech/cartesia-http.py} | 0 .../speech/cartesia.py} | 50 +-- .../speech/deepgram-flux-sagemaker.py} | 0 .../speech/deepgram-flux.py} | 0 .../speech/deepgram-http.py} | 0 .../speech/deepgram-sagemaker.py} | 0 .../speech/deepgram-vad.py} | 0 .../speech/deepgram.py} | 0 .../speech/elevenlabs-http.py} | 0 .../speech/elevenlabs.py} | 0 .../speech/fal.py} | 0 .../speech/fish.py} | 0 .../speech/gladia-vad.py} | 0 .../speech/gladia.py} | 0 .../speech/google-audio-in.py} | 0 .../speech/google-gemini-tts.py} | 0 .../speech/google-http.py} | 0 .../speech/google-image.py} | 0 .../speech/google.py} | 0 .../speech/gradium.py} | 0 .../speech/groq.py} | 0 .../speech/hume.py} | 0 .../speech/inworld-http.py} | 0 .../speech/inworld.py} | 0 .../speech/kokoro.py} | 0 .../speech/krisp-viva.py} | 0 .../speech/langchain.py} | 0 .../speech/lmnt.py} | 0 .../speech/minimax.py} | 0 .../speech/neuphonic-http.py} | 0 .../speech/neuphonic.py} | 0 .../speech/nvidia.py} | 0 .../speech/openai-http.py} | 0 .../speech/openai-responses-http.py} | 0 .../speech/openai-responses.py} | 0 .../speech/openai.py} | 0 .../speech/piper.py} | 0 .../speech/resemble.py} | 0 .../speech/rime-http.py} | 0 .../speech/rime.py} | 0 .../speech/sarvam-http.py} | 0 .../speech/sarvam.py} | 0 .../speech/smallest.py} | 0 .../speech/soniox.py} | 0 .../speech/speechmatics-vad.py} | 0 .../speech/speechmatics.py} | 0 .../speech/xai.py} | 0 .../speech/xtts.py} | 0 .../mcp-stdio.py} | 0 .../mcp-streamable-http-gemini-live.py} | 0 .../mcp-streamable-http.py} | 0 .../multiple-mcp.py} | 0 .../thinking-anthropic.py} | 0 .../thinking-functions-anthropic.py} | 0 .../thinking-functions-google.py} | 0 .../thinking-google.py} | 0 .../assemblyai.py} | 0 .../azure.py} | 0 .../cartesia.py} | 0 .../deepgram.py} | 0 .../elevenlabs.py} | 0 .../gladia-transcription.py} | 0 .../gladia-translation.py} | 0 .../google-llm.py} | 0 .../gradium.py} | 0 .../openai.py} | 0 .../soniox.py} | 0 .../speechmatics.py} | 0 .../whisper-local.py} | 0 .../whisper-mlx.py} | 0 .../whisper.py} | 0 .../daily.py} | 0 .../livekit.py} | 0 .../small-webrtc.py} | 0 .../detect-user-idle.py} | 0 .../filter-incomplete-turns.py} | 0 .../interruption-config.py} | 0 .../smart-turn-local-coreml.py} | 0 .../smart-turn-local.py} | 0 .../turn-tracking-observer.py} | 0 .../user-assistant-turns.py} | 0 .../user-mute-strategy.py} | 0 .../llm/anthropic.py} | 0 .../llm/aws-bedrock.py} | 0 .../llm/aws-nova-sonic.py} | 0 .../llm/azure-realtime.py} | 0 .../llm/azure.py} | 0 .../llm/cerebras.py} | 0 .../llm/deepseek.py} | 0 .../llm/fireworks.py} | 0 .../llm/gemini-live-vertex.py} | 0 .../llm/gemini-live.py} | 0 .../llm/google-vertex.py} | 0 .../llm/google.py} | 0 .../llm/grok-realtime.py} | 0 .../llm/grok.py} | 0 .../llm/groq.py} | 0 .../llm/mistral.py} | 0 .../llm/nvidia.py} | 0 .../llm/ollama.py} | 0 .../llm/openai-realtime.py} | 0 .../llm/openai-responses-http.py} | 0 .../llm/openai-responses.py} | 0 .../llm/openai.py} | 0 .../llm/openrouter.py} | 0 .../llm/perplexity.py} | 0 .../llm/qwen.py} | 0 .../llm/sambanova.py} | 0 .../llm/sarvam.py} | 0 .../llm/together.py} | 0 .../llm/ultravox-realtime.py} | 0 .../stt/assemblyai.py} | 0 .../stt/aws-transcribe.py} | 0 .../stt/azure.py} | 0 .../stt/cartesia.py} | 0 .../stt/deepgram-flux.py} | 0 .../stt/deepgram-sagemaker.py} | 0 .../stt/deepgram.py} | 0 .../stt/elevenlabs-realtime.py} | 0 .../stt/elevenlabs.py} | 0 .../stt/fal.py} | 0 .../stt/gladia.py} | 0 .../stt/google.py} | 0 .../stt/gradium.py} | 0 .../stt/groq.py} | 0 .../stt/nvidia-segmented.py} | 0 .../stt/nvidia.py} | 0 .../stt/openai-realtime.py} | 0 .../stt/sarvam.py} | 0 .../stt/soniox.py} | 0 .../stt/speechmatics.py} | 0 .../stt/whisper-api.py} | 0 .../stt/whisper-mlx.py} | 0 .../stt/whisper.py} | 0 .../tts/asyncai-http.py} | 0 .../tts/asyncai.py} | 0 .../tts/aws-polly.py} | 0 .../tts/azure-http.py} | 0 .../tts/azure.py} | 0 .../tts/camb.py} | 0 .../tts/cartesia-http.py} | 0 .../tts/cartesia.py} | 0 .../tts/deepgram-http.py} | 0 .../tts/deepgram-sagemaker.py} | 0 .../tts/deepgram.py} | 0 .../tts/elevenlabs-http.py} | 0 .../tts/elevenlabs.py} | 0 .../tts/fish.py} | 0 .../tts/gemini.py} | 0 .../tts/google-http.py} | 0 .../tts/google-stream.py} | 0 .../tts/gradium.py} | 0 .../tts/groq.py} | 0 .../tts/hume.py} | 0 .../tts/inworld-http.py} | 0 .../tts/inworld.py} | 0 .../tts/kokoro.py} | 0 .../tts/lmnt.py} | 0 .../tts/minimax.py} | 0 .../tts/neuphonic-http.py} | 0 .../tts/neuphonic.py} | 0 .../tts/nvidia.py} | 0 .../tts/openai.py} | 0 .../tts/piper-http.py} | 0 .../tts/piper.py} | 0 .../tts/resembleai.py} | 0 .../tts/rime-http.py} | 0 .../tts/rime.py} | 0 .../tts/sarvam-http.py} | 0 .../tts/sarvam.py} | 0 .../tts/speechmatics.py} | 0 .../tts/xtts.py} | 0 .../heygen-transport.py} | 0 .../heygen-video-service.py} | 0 .../lemonslice-transport.py} | 0 .../simli-layer.py} | 0 .../tavus-transport.py} | 0 .../tavus-video-service.py} | 0 .../custom-video-track.py} | 0 .../gstreamer-filesrc.py} | 0 .../gstreamer-videotestsrc.py} | 0 .../local-mirror.py} | 0 .../mirror.py} | 0 .../video-processing.py} | 0 .../anthropic.py} | 0 .../aws.py} | 0 .../gemini-flash.py} | 0 .../moondream.py} | 0 .../openai-responses-http.py} | 0 .../openai-responses.py} | 0 .../openai.py} | 0 scripts/evals/run-release-evals.py | 327 ++++++++---------- 307 files changed, 210 insertions(+), 641 deletions(-) delete mode 100644 examples/01-say-one-thing-piper.py delete mode 100644 examples/01-say-one-thing-rime.py delete mode 100644 examples/01b-livekit-audio.py delete mode 100644 examples/01c-nvidia-riva-tts.py delete mode 100644 examples/03-still-frame.py rename examples/{54c-context-summarization-dedicated-llm.py => context-summarization/dedicated-llm.py} (100%) rename examples/{54a-context-summarization-google.py => context-summarization/google.py} (100%) rename examples/{54b-context-summarization-manual-openai.py => context-summarization/manual-openai.py} (100%) rename examples/{54-context-summarization-openai.py => context-summarization/openai.py} (100%) rename examples/{34-audio-recording.py => features/audio-recording.py} (100%) rename examples/{45-before-and-after-events.py => features/before-and-after-events.py} (100%) rename examples/{23-bot-background-sound.py => features/bot-background-sound.py} (100%) rename examples/{53-concurrent-llm-evaluation.py => features/concurrent-llm-evaluation.py} (100%) rename examples/{53-concurrent-llm-rtvi-ignored-sources.py => features/concurrent-llm-rtvi-ignored-sources.py} (100%) rename examples/{08-custom-frame-processor.py => features/custom-frame-processor.py} (100%) rename examples/{32-gemini-grounding-metadata.py => features/gemini-grounding-metadata.py} (100%) rename examples/{33-gemini-rag.py => features/gemini-rag.py} (100%) rename examples/{16-gpu-container-local-bot.py => features/gpu-container-local-bot.py} (100%) rename examples/{31-heartbeats.py => features/heartbeats.py} (100%) rename examples/{52-live-translation.py => features/live-translation.py} (100%) rename examples/{37-mem0.py => features/mem0.py} (100%) rename examples/{30-observer.py => features/observer.py} (100%) rename examples/{35-pattern-pair-voice-switching.py => features/pattern-pair-voice-switching.py} (100%) rename examples/{47-sentry-metrics.py => features/sentry-metrics.py} (100%) rename examples/{48-service-switcher.py => features/service-switcher.py} (100%) rename examples/{11-sound-effects.py => features/sound-effects.py} (100%) rename examples/{15a-switch-languages.py => features/switch-languages.py} (100%) rename examples/{15-switch-voices.py => features/switch-voices.py} (100%) rename examples/{36-user-email-gathering.py => features/user-email-gathering.py} (100%) rename examples/{44-voicemail-detection.py => features/voicemail-detection.py} (100%) rename examples/{10-wake-phrase.py => features/wake-phrase.py} (100%) rename examples/{ => getting-started}/01-say-one-thing.py (100%) rename examples/{ => getting-started}/01a-local-audio.py (100%) rename examples/{ => getting-started}/02-llm-say-one-thing.py (100%) rename examples/{03b-still-frame-imagen.py => getting-started/03-still-frame.py} (100%) rename examples/{ => getting-started}/03a-local-still-frame.py (100%) rename examples/{05-sync-speech-and-image.py => getting-started/04-sync-speech-and-image.py} (100%) rename examples/{06a-image-sync.py => getting-started/05-speaking-state.py} (97%) rename examples/{07-interruptible.py => getting-started/06-voice-agent.py} (100%) rename examples/{07x-interruptible-local.py => getting-started/06a-voice-agent-local.py} (100%) rename examples/{14-function-calling.py => getting-started/07-function-calling.py} (100%) rename examples/{20c-persistent-context-anthropic.py => persistent-context/anthropic.py} (100%) rename examples/{20e-persistent-context-aws-nova-sonic.py => persistent-context/aws-nova-sonic.py} (100%) rename examples/{20d-persistent-context-gemini.py => persistent-context/gemini.py} (100%) rename examples/{20f-persistent-context-grok-realtime.py => persistent-context/grok-realtime.py} (100%) rename examples/{20b-persistent-context-openai-realtime-beta.py => persistent-context/openai-realtime-beta.py} (100%) rename examples/{20b-persistent-context-openai-realtime.py => persistent-context/openai-realtime.py} (100%) rename examples/{20a-persistent-context-openai-responses-http.py => persistent-context/openai-responses-http.py} (100%) rename examples/{20a-persistent-context-openai-responses.py => persistent-context/openai-responses.py} (100%) rename examples/{20a-persistent-context-openai.py => persistent-context/openai.py} (100%) rename examples/{40-aws-nova-sonic.py => realtime/aws-nova-sonic.py} (100%) rename examples/{19a-azure-realtime-beta.py => realtime/azure-beta.py} (100%) rename examples/{19a-azure-realtime.py => realtime/azure.py} (100%) rename examples/{26f-gemini-live-files-api.py => realtime/gemini-live-files-api.py} (100%) rename examples/{26b-gemini-live-function-calling.py => realtime/gemini-live-function-calling.py} (100%) rename examples/{26e-gemini-live-google-search.py => realtime/gemini-live-google-search.py} (100%) rename examples/{26i-gemini-live-graceful-end.py => realtime/gemini-live-graceful-end.py} (100%) rename examples/{26g-gemini-live-groundingMetadata.py => realtime/gemini-live-grounding-metadata.py} (100%) rename examples/{26a-gemini-live-local-vad.py => realtime/gemini-live-local-vad.py} (100%) rename examples/{26h-gemini-live-vertex-function-calling.py => realtime/gemini-live-vertex-function-calling.py} (100%) rename examples/{26c-gemini-live-video.py => realtime/gemini-live-video.py} (100%) rename examples/{26-gemini-live.py => realtime/gemini-live.py} (100%) rename examples/{51-grok-realtime.py => realtime/grok.py} (100%) rename examples/{19b-openai-realtime-beta-text.py => realtime/openai-beta-text.py} (100%) rename examples/{19-openai-realtime-beta.py => realtime/openai-beta.py} (100%) rename examples/{19c-openai-realtime-live-video.py => realtime/openai-live-video.py} (100%) rename examples/{19b-openai-realtime-text.py => realtime/openai-text.py} (100%) rename examples/{19-openai-realtime.py => realtime/openai.py} (100%) rename examples/{50a-ultravox-realtime-text.py => realtime/ultravox-text.py} (100%) rename examples/{50-ultravox-realtime.py => realtime/ultravox.py} (100%) rename examples/{14d-function-calling-anthropic-video.py => services/function-calling/anthropic-video.py} (100%) rename examples/{14a-function-calling-anthropic.py => services/function-calling/anthropic.py} (100%) rename examples/{14d-function-calling-aws-video.py => services/function-calling/aws-video.py} (100%) rename examples/{14r-function-calling-aws.py => services/function-calling/aws.py} (100%) rename examples/{14h-function-calling-azure.py => services/function-calling/azure.py} (100%) rename examples/{14k-function-calling-cerebras.py => services/function-calling/cerebras.py} (100%) rename examples/{14l-function-calling-deepseek.py => services/function-calling/deepseek.py} (100%) rename examples/{14t-function-calling-direct.py => services/function-calling/direct.py} (100%) rename examples/{14i-function-calling-fireworks.py => services/function-calling/fireworks.py} (100%) rename examples/{14o-function-calling-gemini-openai-format.py => services/function-calling/gemini-openai-format.py} (100%) rename examples/{14p-function-calling-gemini-vertex-ai.py => services/function-calling/google-vertex-ai.py} (100%) rename examples/{14d-function-calling-gemini-flash-video.py => services/function-calling/google-video.py} (100%) rename examples/{14e-function-calling-google.py => services/function-calling/google.py} (100%) rename examples/{14g-function-calling-grok.py => services/function-calling/grok.py} (100%) rename examples/{14f-function-calling-groq.py => services/function-calling/groq.py} (100%) rename examples/{14w-function-calling-mistral.py => services/function-calling/mistral.py} (100%) rename examples/{14d-function-calling-moondream-video.py => services/function-calling/moondream-video.py} (100%) rename examples/{14v-function-calling-nebius.py => services/function-calling/nebius.py} (100%) rename examples/{14z-function-calling-novita.py => services/function-calling/novita.py} (100%) rename examples/{14j-function-calling-nvidia.py => services/function-calling/nvidia.py} (100%) rename examples/{14u-function-calling-ollama.py => services/function-calling/ollama.py} (100%) rename examples/{14-function-calling-openai-responses-http.py => services/function-calling/openai-responses-http.py} (100%) rename examples/{14d-function-calling-openai-responses-video-http.py => services/function-calling/openai-responses-video-http.py} (100%) rename examples/{14d-function-calling-openai-responses-video.py => services/function-calling/openai-responses-video.py} (100%) rename examples/{14-function-calling-openai-responses.py => services/function-calling/openai-responses.py} (100%) rename examples/{14d-function-calling-openai-video.py => services/function-calling/openai-video.py} (100%) rename examples/{14b-function-calling-openai.py => services/function-calling/openai.py} (100%) rename examples/{14m-function-calling-openrouter.py => services/function-calling/openrouter.py} (100%) rename examples/{14n-function-calling-perplexity.py => services/function-calling/perplexity.py} (100%) rename examples/{14q-function-calling-qwen.py => services/function-calling/qwen.py} (100%) rename examples/{14s-function-calling-sambanova.py => services/function-calling/sambanova.py} (100%) rename examples/{14y-function-calling-sarvam.py => services/function-calling/sarvam.py} (100%) rename examples/{14c-function-calling-together.py => services/function-calling/together.py} (100%) rename examples/{07zd-interruptible-aicoustics.py => services/speech/aicoustics.py} (100%) rename examples/{07o-interruptible-assemblyai-turn-detection.py => services/speech/assemblyai-turn-detection.py} (100%) rename examples/{07o-interruptible-assemblyai.py => services/speech/assemblyai.py} (100%) rename examples/{07zc-interruptible-asyncai-http.py => services/speech/asyncai-http.py} (100%) rename examples/{07zc-interruptible-asyncai.py => services/speech/asyncai.py} (100%) rename examples/{07m-interruptible-aws-strands.py => services/speech/aws-strands.py} (100%) rename examples/{07m-interruptible-aws.py => services/speech/aws.py} (100%) rename examples/{07f-interruptible-azure-http.py => services/speech/azure-http.py} (100%) rename examples/{07f-interruptible-azure.py => services/speech/azure.py} (100%) rename examples/{07zg-interruptible-camb.py => services/speech/camb.py} (100%) rename examples/{07-interruptible-cartesia-http.py => services/speech/cartesia-http.py} (100%) rename examples/{06-listen-and-respond.py => services/speech/cartesia.py} (69%) rename examples/{07c-interruptible-deepgram-flux-sagemaker.py => services/speech/deepgram-flux-sagemaker.py} (100%) rename examples/{07c-interruptible-deepgram-flux.py => services/speech/deepgram-flux.py} (100%) rename examples/{07c-interruptible-deepgram-http.py => services/speech/deepgram-http.py} (100%) rename examples/{07c-interruptible-deepgram-sagemaker.py => services/speech/deepgram-sagemaker.py} (100%) rename examples/{07c-interruptible-deepgram-vad.py => services/speech/deepgram-vad.py} (100%) rename examples/{07c-interruptible-deepgram.py => services/speech/deepgram.py} (100%) rename examples/{07d-interruptible-elevenlabs-http.py => services/speech/elevenlabs-http.py} (100%) rename examples/{07d-interruptible-elevenlabs.py => services/speech/elevenlabs.py} (100%) rename examples/{07w-interruptible-fal.py => services/speech/fal.py} (100%) rename examples/{07t-interruptible-fish.py => services/speech/fish.py} (100%) rename examples/{07j-interruptible-gladia-vad.py => services/speech/gladia-vad.py} (100%) rename examples/{07j-interruptible-gladia.py => services/speech/gladia.py} (100%) rename examples/{07s-interruptible-google-audio-in.py => services/speech/google-audio-in.py} (100%) rename examples/{07n-interruptible-gemini.py => services/speech/google-gemini-tts.py} (100%) rename examples/{07n-interruptible-google-http.py => services/speech/google-http.py} (100%) rename examples/{07n-interruptible-gemini-image.py => services/speech/google-image.py} (100%) rename examples/{07n-interruptible-google.py => services/speech/google.py} (100%) rename examples/{07zf-interruptible-gradium.py => services/speech/gradium.py} (100%) rename examples/{07l-interruptible-groq.py => services/speech/groq.py} (100%) rename examples/{07ze-interruptible-hume.py => services/speech/hume.py} (100%) rename examples/{07zb-interruptible-inworld-http.py => services/speech/inworld-http.py} (100%) rename examples/{07zb-interruptible-inworld.py => services/speech/inworld.py} (100%) rename examples/{07zj-interruptible-kokoro.py => services/speech/kokoro.py} (100%) rename examples/{07p-interruptible-krisp-viva.py => services/speech/krisp-viva.py} (100%) rename examples/{07b-interruptible-langchain.py => services/speech/langchain.py} (100%) rename examples/{07k-interruptible-lmnt.py => services/speech/lmnt.py} (100%) rename examples/{07y-interruptible-minimax.py => services/speech/minimax.py} (100%) rename examples/{07v-interruptible-neuphonic-http.py => services/speech/neuphonic-http.py} (100%) rename examples/{07v-interruptible-neuphonic.py => services/speech/neuphonic.py} (100%) rename examples/{07r-interruptible-nvidia.py => services/speech/nvidia.py} (100%) rename examples/{07g-interruptible-openai-http.py => services/speech/openai-http.py} (100%) rename examples/{07-interruptible-openai-responses-http.py => services/speech/openai-responses-http.py} (100%) rename examples/{07-interruptible-openai-responses.py => services/speech/openai-responses.py} (100%) rename examples/{07g-interruptible-openai.py => services/speech/openai.py} (100%) rename examples/{07zi-interruptible-piper.py => services/speech/piper.py} (100%) rename examples/{07zk-interruptible-resemble.py => services/speech/resemble.py} (100%) rename examples/{07q-interruptible-rime-http.py => services/speech/rime-http.py} (100%) rename examples/{07q-interruptible-rime.py => services/speech/rime.py} (100%) rename examples/{07z-interruptible-sarvam-http.py => services/speech/sarvam-http.py} (100%) rename examples/{07z-interruptible-sarvam.py => services/speech/sarvam.py} (100%) rename examples/{07zl-interruptible-smallest.py => services/speech/smallest.py} (100%) rename examples/{07za-interruptible-soniox.py => services/speech/soniox.py} (100%) rename examples/{07a-interruptible-speechmatics-vad.py => services/speech/speechmatics-vad.py} (100%) rename examples/{07a-interruptible-speechmatics.py => services/speech/speechmatics.py} (100%) rename examples/{07e-interruptible-xai.py => services/speech/xai.py} (100%) rename examples/{07i-interruptible-xtts.py => services/speech/xtts.py} (100%) rename examples/{39-mcp-stdio.py => thinking-and-mcp/mcp-stdio.py} (100%) rename examples/{39b-mcp-streamable-http-gemini-live.py => thinking-and-mcp/mcp-streamable-http-gemini-live.py} (100%) rename examples/{39a-mcp-streamable-http.py => thinking-and-mcp/mcp-streamable-http.py} (100%) rename examples/{39c-multiple-mcp.py => thinking-and-mcp/multiple-mcp.py} (100%) rename examples/{49a-thinking-anthropic.py => thinking-and-mcp/thinking-anthropic.py} (100%) rename examples/{49c-thinking-functions-anthropic.py => thinking-and-mcp/thinking-functions-anthropic.py} (100%) rename examples/{49d-thinking-functions-google.py => thinking-and-mcp/thinking-functions-google.py} (100%) rename examples/{49b-thinking-google.py => thinking-and-mcp/thinking-google.py} (100%) rename examples/{13d-assemblyai-transcription.py => transcription/assemblyai.py} (100%) rename examples/{13j-azure-transcription.py => transcription/azure.py} (100%) rename examples/{13f-cartesia-transcription.py => transcription/cartesia.py} (100%) rename examples/{13b-deepgram-transcription.py => transcription/deepgram.py} (100%) rename examples/{13k-elevenlabs-transcription.py => transcription/elevenlabs.py} (100%) rename examples/{13c-gladia-transcription.py => transcription/gladia-transcription.py} (100%) rename examples/{13c-gladia-translation.py => transcription/gladia-translation.py} (100%) rename examples/{25-google-audio-in.py => transcription/google-llm.py} (100%) rename examples/{13l-gradium-transcription.py => transcription/gradium.py} (100%) rename examples/{13m-openai-transcription.py => transcription/openai.py} (100%) rename examples/{13i-soniox-transcription.py => transcription/soniox.py} (100%) rename examples/{13h-speechmatics-transcription.py => transcription/speechmatics.py} (100%) rename examples/{13a-whisper-local.py => transcription/whisper-local.py} (100%) rename examples/{13e-whisper-mlx.py => transcription/whisper-mlx.py} (100%) rename examples/{13-whisper-transcription.py => transcription/whisper.py} (100%) rename examples/{04a-transports-daily.py => transports/daily.py} (100%) rename examples/{04b-transports-livekit.py => transports/livekit.py} (100%) rename examples/{04-transports-small-webrtc.py => transports/small-webrtc.py} (100%) rename examples/{17-detect-user-idle.py => turn-management/detect-user-idle.py} (100%) rename examples/{22-filter-incomplete-turns.py => turn-management/filter-incomplete-turns.py} (100%) rename examples/{42-interruption-config.py => turn-management/interruption-config.py} (100%) rename examples/{38a-smart-turn-local-coreml.py => turn-management/smart-turn-local-coreml.py} (100%) rename examples/{38b-smart-turn-local.py => turn-management/smart-turn-local.py} (100%) rename examples/{29-turn-tracking-observer.py => turn-management/turn-tracking-observer.py} (100%) rename examples/{28-user-assistant-turns.py => turn-management/user-assistant-turns.py} (100%) rename examples/{24-user-mute-strategy.py => turn-management/user-mute-strategy.py} (100%) rename examples/{55zj-update-settings-anthropic-llm.py => update-settings/llm/anthropic.py} (100%) rename examples/{55zp-update-settings-aws-bedrock-llm.py => update-settings/llm/aws-bedrock.py} (100%) rename examples/{55zzk-update-settings-aws-nova-sonic-llm.py => update-settings/llm/aws-nova-sonic.py} (100%) rename examples/{55zl-update-settings-azure-realtime.py => update-settings/llm/azure-realtime.py} (100%) rename examples/{55zi-update-settings-azure-llm.py => update-settings/llm/azure.py} (100%) rename examples/{55zx-update-settings-cerebras-llm.py => update-settings/llm/cerebras.py} (100%) rename examples/{55zy-update-settings-deepseek-llm.py => update-settings/llm/deepseek.py} (100%) rename examples/{55zz-update-settings-fireworks-llm.py => update-settings/llm/fireworks.py} (100%) rename examples/{55zm-update-settings-gemini-live-vertex.py => update-settings/llm/gemini-live-vertex.py} (100%) rename examples/{55zm-update-settings-gemini-live.py => update-settings/llm/gemini-live.py} (100%) rename examples/{55zk-update-settings-google-vertex-llm.py => update-settings/llm/google-vertex.py} (100%) rename examples/{55zk-update-settings-google-llm.py => update-settings/llm/google.py} (100%) rename examples/{55zo-update-settings-grok-realtime.py => update-settings/llm/grok-realtime.py} (100%) rename examples/{55zza-update-settings-grok-llm.py => update-settings/llm/grok.py} (100%) rename examples/{55zzb-update-settings-groq-llm.py => update-settings/llm/groq.py} (100%) rename examples/{55zzc-update-settings-mistral-llm.py => update-settings/llm/mistral.py} (100%) rename examples/{55zzd-update-settings-nvidia-llm.py => update-settings/llm/nvidia.py} (100%) rename examples/{55zze-update-settings-ollama-llm.py => update-settings/llm/ollama.py} (100%) rename examples/{55zl-update-settings-openai-realtime.py => update-settings/llm/openai-realtime.py} (100%) rename examples/{55zi-update-settings-openai-responses-http-llm.py => update-settings/llm/openai-responses-http.py} (100%) rename examples/{55zi-update-settings-openai-responses-llm.py => update-settings/llm/openai-responses.py} (100%) rename examples/{55zi-update-settings-openai-llm.py => update-settings/llm/openai.py} (100%) rename examples/{55zzf-update-settings-openrouter-llm.py => update-settings/llm/openrouter.py} (100%) rename examples/{55zzg-update-settings-perplexity-llm.py => update-settings/llm/perplexity.py} (100%) rename examples/{55zzh-update-settings-qwen-llm.py => update-settings/llm/qwen.py} (100%) rename examples/{55zzi-update-settings-sambanova-llm.py => update-settings/llm/sambanova.py} (100%) rename examples/{55zzq-update-settings-sarvam-llm.py => update-settings/llm/sarvam.py} (100%) rename examples/{55zzj-update-settings-together-llm.py => update-settings/llm/together.py} (100%) rename examples/{55zn-update-settings-ultravox-realtime.py => update-settings/llm/ultravox-realtime.py} (100%) rename examples/{55d-update-settings-assemblyai-stt.py => update-settings/stt/assemblyai.py} (100%) rename examples/{55l-update-settings-aws-transcribe-stt.py => update-settings/stt/aws-transcribe.py} (100%) rename examples/{55b-update-settings-azure-stt.py => update-settings/stt/azure.py} (100%) rename examples/{55m-update-settings-cartesia-stt.py => update-settings/stt/cartesia.py} (100%) rename examples/{55a-update-settings-deepgram-flux-stt.py => update-settings/stt/deepgram-flux.py} (100%) rename examples/{55a-update-settings-deepgram-sagemaker-stt.py => update-settings/stt/deepgram-sagemaker.py} (100%) rename examples/{55a-update-settings-deepgram-stt.py => update-settings/stt/deepgram.py} (100%) rename examples/{55f-update-settings-elevenlabs-realtime-stt.py => update-settings/stt/elevenlabs-realtime.py} (100%) rename examples/{55g-update-settings-elevenlabs-stt.py => update-settings/stt/elevenlabs.py} (100%) rename examples/{55zq-update-settings-fal-stt.py => update-settings/stt/fal.py} (100%) rename examples/{55e-update-settings-gladia-stt.py => update-settings/stt/gladia.py} (100%) rename examples/{55c-update-settings-google-stt.py => update-settings/stt/google.py} (100%) rename examples/{55zr-update-settings-gradium-stt.py => update-settings/stt/gradium.py} (100%) rename examples/{55zzn-update-settings-groq-stt.py => update-settings/stt/groq.py} (100%) rename examples/{55zt-update-settings-nvidia-segmented-stt.py => update-settings/stt/nvidia-segmented.py} (100%) rename examples/{55zt-update-settings-nvidia-stt.py => update-settings/stt/nvidia.py} (100%) rename examples/{55zu-update-settings-openai-realtime-stt.py => update-settings/stt/openai-realtime.py} (100%) rename examples/{55j-update-settings-sarvam-stt.py => update-settings/stt/sarvam.py} (100%) rename examples/{55k-update-settings-soniox-stt.py => update-settings/stt/soniox.py} (100%) rename examples/{55h-update-settings-speechmatics-stt.py => update-settings/stt/speechmatics.py} (100%) rename examples/{55i-update-settings-whisper-api-stt.py => update-settings/stt/whisper-api.py} (100%) rename examples/{55zs-update-settings-whisper-mlx-stt.py => update-settings/stt/whisper-mlx.py} (100%) rename examples/{55zs-update-settings-whisper-stt.py => update-settings/stt/whisper.py} (100%) rename examples/{55zv-update-settings-asyncai-http-tts.py => update-settings/tts/asyncai-http.py} (100%) rename examples/{55zv-update-settings-asyncai-tts.py => update-settings/tts/asyncai.py} (100%) rename examples/{55zd-update-settings-aws-polly-tts.py => update-settings/tts/aws-polly.py} (100%) rename examples/{55r-update-settings-azure-http-tts.py => update-settings/tts/azure-http.py} (100%) rename examples/{55r-update-settings-azure-tts.py => update-settings/tts/azure.py} (100%) rename examples/{55zf-update-settings-camb-tts.py => update-settings/tts/camb.py} (100%) rename examples/{55n-update-settings-cartesia-http-tts.py => update-settings/tts/cartesia-http.py} (100%) rename examples/{55n-update-settings-cartesia-tts.py => update-settings/tts/cartesia.py} (100%) rename examples/{55q-update-settings-deepgram-http-tts.py => update-settings/tts/deepgram-http.py} (100%) rename examples/{55q-update-settings-deepgram-sagemaker-tts.py => update-settings/tts/deepgram-sagemaker.py} (100%) rename examples/{55q-update-settings-deepgram-tts.py => update-settings/tts/deepgram.py} (100%) rename examples/{55o-update-settings-elevenlabs-http-tts.py => update-settings/tts/elevenlabs-http.py} (100%) rename examples/{55o-update-settings-elevenlabs-tts.py => update-settings/tts/elevenlabs.py} (100%) rename examples/{55w-update-settings-fish-tts.py => update-settings/tts/fish.py} (100%) rename examples/{55zc-update-settings-gemini-tts.py => update-settings/tts/gemini.py} (100%) rename examples/{55s-update-settings-google-http-tts.py => update-settings/tts/google-http.py} (100%) rename examples/{55s-update-settings-google-stream-tts.py => update-settings/tts/google-stream.py} (100%) rename examples/{55zw-update-settings-gradium-tts.py => update-settings/tts/gradium.py} (100%) rename examples/{55y-update-settings-groq-tts.py => update-settings/tts/groq.py} (100%) rename examples/{55z-update-settings-hume-tts.py => update-settings/tts/hume.py} (100%) rename examples/{55zb-update-settings-inworld-http-tts.py => update-settings/tts/inworld-http.py} (100%) rename examples/{55zb-update-settings-inworld-tts.py => update-settings/tts/inworld.py} (100%) rename examples/{55zg-update-settings-kokoro-tts.py => update-settings/tts/kokoro.py} (100%) rename examples/{55v-update-settings-lmnt-tts.py => update-settings/tts/lmnt.py} (100%) rename examples/{55x-update-settings-minimax-tts.py => update-settings/tts/minimax.py} (100%) rename examples/{55za-update-settings-neuphonic-http-tts.py => update-settings/tts/neuphonic-http.py} (100%) rename examples/{55za-update-settings-neuphonic-tts.py => update-settings/tts/neuphonic.py} (100%) rename examples/{55zzl-update-settings-nvidia-tts.py => update-settings/tts/nvidia.py} (100%) rename examples/{55p-update-settings-openai-tts.py => update-settings/tts/openai.py} (100%) rename examples/{55t-update-settings-piper-http-tts.py => update-settings/tts/piper-http.py} (100%) rename examples/{55t-update-settings-piper-tts.py => update-settings/tts/piper.py} (100%) rename examples/{55zh-update-settings-resembleai-tts.py => update-settings/tts/resembleai.py} (100%) rename examples/{55u-update-settings-rime-http-tts.py => update-settings/tts/rime-http.py} (100%) rename examples/{55u-update-settings-rime-tts.py => update-settings/tts/rime.py} (100%) rename examples/{55ze-update-settings-sarvam-http-tts.py => update-settings/tts/sarvam-http.py} (100%) rename examples/{55ze-update-settings-sarvam-tts.py => update-settings/tts/sarvam.py} (100%) rename examples/{55zzm-update-settings-speechmatics-tts.py => update-settings/tts/speechmatics.py} (100%) rename examples/{55zzp-update-settings-xtts-tts.py => update-settings/tts/xtts.py} (100%) rename examples/{43-heygen-transport.py => video-avatar/heygen-transport.py} (100%) rename examples/{43a-heygen-video-service.py => video-avatar/heygen-video-service.py} (100%) rename examples/{56-lemonslice-transport.py => video-avatar/lemonslice-transport.py} (100%) rename examples/{27-simli-layer.py => video-avatar/simli-layer.py} (100%) rename examples/{21-tavus-transport.py => video-avatar/tavus-transport.py} (100%) rename examples/{21a-tavus-video-service.py => video-avatar/tavus-video-service.py} (100%) rename examples/{57-custom-video-track.py => video-processing/custom-video-track.py} (100%) rename examples/{18-gstreamer-filesrc.py => video-processing/gstreamer-filesrc.py} (100%) rename examples/{18a-gstreamer-videotestsrc.py => video-processing/gstreamer-videotestsrc.py} (100%) rename examples/{09a-local-mirror.py => video-processing/local-mirror.py} (100%) rename examples/{09-mirror.py => video-processing/mirror.py} (100%) rename examples/{46-video-processing.py => video-processing/video-processing.py} (100%) rename examples/{12a-describe-image-anthropic.py => vision/anthropic.py} (100%) rename examples/{12b-describe-image-aws.py => vision/aws.py} (100%) rename examples/{12c-describe-image-gemini-flash.py => vision/gemini-flash.py} (100%) rename examples/{12d-describe-image-moondream.py => vision/moondream.py} (100%) rename examples/{12-describe-image-openai-responses-http.py => vision/openai-responses-http.py} (100%) rename examples/{12-describe-image-openai-responses.py => vision/openai-responses.py} (100%) rename examples/{12-describe-image-openai.py => vision/openai.py} (100%) diff --git a/README.md b/README.md index 78b359d07..af165a94f 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ Catch new features, interviews, and how-tos on our [Pipecat TV](https://www.yout
  - +

## 🧩 Available services diff --git a/examples/01-say-one-thing-piper.py b/examples/01-say-one-thing-piper.py deleted file mode 100644 index 6c4e1836e..000000000 --- a/examples/01-say-one-thing-piper.py +++ /dev/null @@ -1,71 +0,0 @@ -# -# Copyright (c) 2024-2026, Daily -# -# SPDX-License-Identifier: BSD 2-Clause License -# - -import os - -import aiohttp -from dotenv import load_dotenv -from loguru import logger - -from pipecat.frames.frames import EndFrame, TTSSpeakFrame -from pipecat.pipeline.pipeline import Pipeline -from pipecat.pipeline.runner import PipelineRunner -from pipecat.pipeline.task import PipelineTask -from pipecat.runner.types import RunnerArguments -from pipecat.runner.utils import create_transport -from pipecat.services.piper.tts import PiperHttpTTSService -from pipecat.transports.base_transport import BaseTransport, TransportParams -from pipecat.transports.daily.transport import DailyParams -from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams - -load_dotenv(override=True) - - -# We use lambdas to defer transport parameter creation until the transport -# type is selected at runtime. -transport_params = { - "daily": lambda: DailyParams(audio_out_enabled=True), - "twilio": lambda: FastAPIWebsocketParams(audio_out_enabled=True), - "webrtc": lambda: TransportParams(audio_out_enabled=True), -} - - -async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): - logger.info(f"Starting bot") - - # Create an HTTP session - async with aiohttp.ClientSession() as session: - tts = PiperHttpTTSService( - base_url=os.getenv("PIPER_BASE_URL"), - aiohttp_session=session, - sample_rate=24000, - ) - - task = PipelineTask( - Pipeline([tts, transport.output()]), - idle_timeout_secs=runner_args.pipeline_idle_timeout_secs, - ) - - # Register an event handler so we can play the audio when the client joins - @transport.event_handler("on_client_connected") - async def on_client_connected(transport, client): - await task.queue_frames([TTSSpeakFrame(f"Hello there!"), EndFrame()]) - - runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - - await runner.run(task) - - -async def bot(runner_args: RunnerArguments): - """Main bot entry point compatible with Pipecat Cloud.""" - transport = await create_transport(runner_args, transport_params) - await run_bot(transport, runner_args) - - -if __name__ == "__main__": - from pipecat.runner.run import main - - main() diff --git a/examples/01-say-one-thing-rime.py b/examples/01-say-one-thing-rime.py deleted file mode 100644 index a9df51f7f..000000000 --- a/examples/01-say-one-thing-rime.py +++ /dev/null @@ -1,72 +0,0 @@ -# -# Copyright (c) 2024-2026, Daily -# -# SPDX-License-Identifier: BSD 2-Clause License -# - -import os - -import aiohttp -from dotenv import load_dotenv -from loguru import logger - -from pipecat.frames.frames import EndFrame, TTSSpeakFrame -from pipecat.pipeline.pipeline import Pipeline -from pipecat.pipeline.runner import PipelineRunner -from pipecat.pipeline.task import PipelineTask -from pipecat.runner.types import RunnerArguments -from pipecat.runner.utils import create_transport -from pipecat.services.rime.tts import RimeHttpTTSService -from pipecat.transports.base_transport import BaseTransport, TransportParams -from pipecat.transports.daily.transport import DailyParams -from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams - -load_dotenv(override=True) - -# We use lambdas to defer transport parameter creation until the transport -# type is selected at runtime. -transport_params = { - "daily": lambda: DailyParams(audio_out_enabled=True), - "twilio": lambda: FastAPIWebsocketParams(audio_out_enabled=True), - "webrtc": lambda: TransportParams(audio_out_enabled=True), -} - - -async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): - logger.info(f"Starting bot") - - # Create an HTTP session - async with aiohttp.ClientSession() as session: - tts = RimeHttpTTSService( - api_key=os.getenv("RIME_API_KEY", ""), - aiohttp_session=session, - settings=RimeHttpTTSService.Settings( - voice="rex", - ), - ) - - task = PipelineTask( - Pipeline([tts, transport.output()]), - idle_timeout_secs=runner_args.pipeline_idle_timeout_secs, - ) - - # Register an event handler so we can play the audio when the client joins - @transport.event_handler("on_client_connected") - async def on_client_connected(transport, client): - await task.queue_frames([TTSSpeakFrame(f"Hello there!"), EndFrame()]) - - runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - - await runner.run(task) - - -async def bot(runner_args: RunnerArguments): - """Main bot entry point compatible with Pipecat Cloud.""" - transport = await create_transport(runner_args, transport_params) - await run_bot(transport, runner_args) - - -if __name__ == "__main__": - from pipecat.runner.run import main - - main() diff --git a/examples/01b-livekit-audio.py b/examples/01b-livekit-audio.py deleted file mode 100644 index 5f64a29ed..000000000 --- a/examples/01b-livekit-audio.py +++ /dev/null @@ -1,64 +0,0 @@ -# -# Copyright (c) 2024-2026, Daily -# -# SPDX-License-Identifier: BSD 2-Clause License -# - -import asyncio -import os -import sys - -from dotenv import load_dotenv -from loguru import logger - -from pipecat.frames.frames import TTSSpeakFrame -from pipecat.pipeline.pipeline import Pipeline -from pipecat.pipeline.runner import PipelineRunner -from pipecat.pipeline.task import PipelineTask -from pipecat.runner.livekit import configure -from pipecat.services.cartesia.tts import CartesiaTTSService -from pipecat.transports.livekit.transport import LiveKitParams, LiveKitTransport - -load_dotenv(override=True) - -logger.remove(0) -logger.add(sys.stderr, level="DEBUG") - - -async def main(): - (url, token, room_name) = await configure() - - transport = LiveKitTransport( - url=url, - token=token, - room_name=room_name, - params=LiveKitParams(audio_out_enabled=True), - ) - - tts = CartesiaTTSService( - api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSService.Settings( - voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady - ), - ) - - runner = PipelineRunner() - - task = PipelineTask(Pipeline([tts, transport.output()])) - - # Register an event handler so we can play the audio when the - # participant joins. - @transport.event_handler("on_first_participant_joined") - async def on_first_participant_joined(transport, participant_id): - await asyncio.sleep(1) - await task.queue_frame( - TTSSpeakFrame( - "Hello there! How are you doing today? Would you like to talk about the weather?" - ) - ) - - await runner.run(task) - - -if __name__ == "__main__": - asyncio.run(main()) diff --git a/examples/01c-nvidia-riva-tts.py b/examples/01c-nvidia-riva-tts.py deleted file mode 100644 index 2be99c5b4..000000000 --- a/examples/01c-nvidia-riva-tts.py +++ /dev/null @@ -1,64 +0,0 @@ -# -# Copyright (c) 2024-2026, Daily -# -# SPDX-License-Identifier: BSD 2-Clause License -# - -import os - -from dotenv import load_dotenv -from loguru import logger - -from pipecat.frames.frames import EndFrame, TTSSpeakFrame -from pipecat.pipeline.pipeline import Pipeline -from pipecat.pipeline.runner import PipelineRunner -from pipecat.pipeline.task import PipelineTask -from pipecat.runner.types import RunnerArguments -from pipecat.runner.utils import create_transport -from pipecat.services.nvidia.tts import NvidiaTTSService -from pipecat.transports.base_transport import BaseTransport, TransportParams -from pipecat.transports.daily.transport import DailyParams -from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams - -load_dotenv(override=True) - - -# We use lambdas to defer transport parameter creation until the transport -# type is selected at runtime. -transport_params = { - "daily": lambda: DailyParams(audio_out_enabled=True), - "twilio": lambda: FastAPIWebsocketParams(audio_out_enabled=True), - "webrtc": lambda: TransportParams(audio_out_enabled=True), -} - - -async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): - logger.info(f"Starting bot") - - tts = NvidiaTTSService(api_key=os.getenv("NVIDIA_API_KEY")) - - task = PipelineTask( - Pipeline([tts, transport.output()]), - idle_timeout_secs=runner_args.pipeline_idle_timeout_secs, - ) - - # Register an event handler so we can play the audio when the client joins - @transport.event_handler("on_client_connected") - async def on_client_connected(transport, client): - await task.queue_frames([TTSSpeakFrame(f"Hello there!"), EndFrame()]) - - runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - - await runner.run(task) - - -async def bot(runner_args: RunnerArguments): - """Main bot entry point compatible with Pipecat Cloud.""" - transport = await create_transport(runner_args, transport_params) - await run_bot(transport, runner_args) - - -if __name__ == "__main__": - from pipecat.runner.run import main - - main() diff --git a/examples/03-still-frame.py b/examples/03-still-frame.py deleted file mode 100644 index dc1bf4c5f..000000000 --- a/examples/03-still-frame.py +++ /dev/null @@ -1,84 +0,0 @@ -# -# Copyright (c) 2024-2026, Daily -# -# SPDX-License-Identifier: BSD 2-Clause License -# - -import os - -import aiohttp -from dotenv import load_dotenv -from loguru import logger - -from pipecat.frames.frames import TextFrame -from pipecat.pipeline.pipeline import Pipeline -from pipecat.pipeline.runner import PipelineRunner -from pipecat.pipeline.task import PipelineTask -from pipecat.runner.types import RunnerArguments -from pipecat.runner.utils import create_transport -from pipecat.services.fal.image import FalImageGenService -from pipecat.transports.base_transport import BaseTransport, TransportParams -from pipecat.transports.daily.transport import DailyParams - -load_dotenv(override=True) - - -# We use lambdas to defer transport parameter creation until the transport -# type is selected at runtime. -transport_params = { - "daily": lambda: DailyParams( - video_out_enabled=True, - video_out_width=1024, - video_out_height=1024, - ), - "webrtc": lambda: TransportParams( - video_out_enabled=True, - video_out_width=1024, - video_out_height=1024, - ), -} - - -async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): - logger.info(f"Starting bot") - - # Create an HTTP session - async with aiohttp.ClientSession() as session: - imagegen = FalImageGenService( - settings=FalImageGenService.Settings( - image_size="square_hd", - ), - aiohttp_session=session, - key=os.getenv("FAL_KEY"), - ) - - task = PipelineTask( - Pipeline([imagegen, transport.output()]), - idle_timeout_secs=runner_args.pipeline_idle_timeout_secs, - ) - - # Register an event handler so we can play the audio when the client joins - @transport.event_handler("on_client_connected") - async def on_client_connected(transport, client): - await task.queue_frame(TextFrame("a cat in the style of picasso")) - - @transport.event_handler("on_client_disconnected") - async def on_client_disconnected(transport, client): - logger.info(f"Client disconnected") - await task.cancel() - - runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - - await runner.run(task) - - -async def bot(runner_args: RunnerArguments): - """Main bot entry point compatible with Pipecat Cloud.""" - transport = await create_transport(runner_args, transport_params) - await run_bot(transport, runner_args) - - -if __name__ == "__main__": - from pipecat.runner.run import main - - main() diff --git a/examples/README.md b/examples/README.md index e8a0dd9bf..f584d3768 100644 --- a/examples/README.md +++ b/examples/README.md @@ -1,6 +1,6 @@ # Pipecat Examples -This directory contains examples showing how to build voice and multimodal agents with Pipecat. Each example demonstrates specific features, progressing from basic to advanced concepts. +This directory contains examples showing how to build voice and multimodal agents with Pipecat. ## Setup @@ -17,19 +17,13 @@ This directory contains examples showing how to build voice and multimodal agent # Edit .env with your API keys ``` -3. Navigate to the examples directory if you aren't already there: +3. Run any example: ```bash - cd examples + uv run python getting-started/01-say-one-thing.py ``` -4. Run any example: - - ```bash - uv run python 01-say-one-thing.py - ``` - -5. Open the web interface at http://localhost:7860/client/ and click "Connect" +4. Open the web interface at http://localhost:7860/client/ and click "Connect" ## Running examples with other transports @@ -40,7 +34,7 @@ Most examples support running with other transports, like Twilio or Daily. You need to create a Daily account at https://dashboard.daily.co/u/signup. Once signed up, you can create your own room from the dashboard and set the environment variables `DAILY_ROOM_URL` and `DAILY_API_KEY`. Alternatively, you can let the example create a room for you (still needs `DAILY_API_KEY` environment variable). Then, start any example with `-t daily`: ```bash -uv run 07-interruptible.py -t daily +uv run getting-started/06-voice-agent.py -t daily ``` ### Twilio @@ -58,74 +52,73 @@ ngrok http 7860 Then, run the example with: ```bash -uv run 07-interruptible.py -t twilio -x NGROK_HOST_NAME +uv run getting-started/06-voice-agent.py -t twilio -x NGROK_HOST_NAME ``` -## Examples by Feature +## Directory Structure -### Basics +### [`getting-started/`](./getting-started/) -- **[01-say-one-thing.py](./01-say-one-thing.py)**: Most basic bot that says one phrase and exits (Transport, TTS, Event handlers) -- **[02-llm-say-one-thing.py](./02-llm-say-one-thing.py)**: Bot generates a response with an LLM (LLM initialization) -- **[03-still-frame.py](./03-still-frame.py)**: Displays a static image (Video transport, Image service) -- **[04-transport.py](./04-transport.py)**: Different transport options (WebRTC, Daily, Livekit) +Progressive introduction to Pipecat, from minimal TTS to a full voice agent with function calling. -### Conversational AI +### [`services/`](./services/) -- **[07-interruptible.py](./07-interruptible.py)**: Basic voice assistant bot (STT, TTS, LLM, Interruptible speech) -- **[10-wake-phrase.py](./10-wake-phrase.py)**: Bot activated by wake phrase (WakeCheckFilter) -- **[22-natural-conversation.py](./22-natural-conversation.py)**: Smart turn detection (Multiple LLMs, Turn management) -- **[38-smart-turn-fal.py](./38-smart-turn-fal.py)**: ML-based turn detection (Fal service, Local models) +Service provider integration examples, organized into subfolders: -### Common Utilities +- **[`speech/`](./services/speech/)** — Full STT + LLM + TTS pipelines showcasing different speech service providers (Deepgram, ElevenLabs, Cartesia, etc.) +- **[`function-calling/`](./services/function-calling/)** — Function calling with different LLM providers (OpenAI, Anthropic, Google, etc.) -- **[17-detect-user-idle.py](./17-detect-user-idle.py)**: Handle inactive users (UserIdleProcessor) -- **[24-user-mute-strategy.py](./24-user-mute-strategy.py)**: Selectively mute user input (LLMUserAggregator user mute strategies) -- **[28-transcription-processor.py](./28-transcription-processor.py)**: Record conversation text (TranscriptProcessor) -- **[30-observer.py](./30-observer.py)**: Access frame data (Custom observers) -- **[31-heartbeats.py](./31-heartbeats.py)**: Detect idle pipelines (Pipeline monitoring) -- **[34-audio-recording.py](./34-audio-recording.py)**: Record conversation audio (Composite and track-level recording) +### [`transcription/`](./transcription/) -### Advanced LLM Features +Speech-to-text examples with various STT providers. -- **[14-function-calling.py](./14-function-calling.py)**: Bot with tool usage (Function schemas, Tool registration) -- **[20a-persistent-context-openai.py](./20a-persistent-context-openai.py)**: Persistent conversation context (Memory management) -- **[32-gemini-grounding-metadata.py](./32-gemini-grounding-metadata.py)**: Web search capabilities (Google search integration) -- **[33-gemini-rag.py](./33-gemini-rag.py)**: Retrieval-augmented generation (Data sources, Grounding) -- **[37-mem0.py](./37-mem0.py)**: Long-term agent memory (Mem0 service integration) +### [`vision/`](./vision/) -### Media Handling +Image description and vision capabilities with different multimodal LLMs. -- **[05-sync-speech-and-images.py](./05-sync-speech-and-images.py)**: Synchronized narration with images (Custom processors, SyncParallelPipeline) -- **[06a-image-sync.py](./06a-image-sync.py)**: Dynamic image updates while speaking (Synchronized A/V pipelines) -- **[09-mirror.py](./09-mirror.py)**: Mirror user's audio and video (Custom frame processors) -- **[11-sound-effects.py](./11-sound-effects.py)**: Add sounds when bot speaks (Sound playback, Event synchronization) -- **[23-bot-background-sound.py](./23-bot-background-sound.py)**: Play background audio (SoundfileMixer) +### [`realtime/`](./realtime/) -### Vision & Multimodal +Realtime and multimodal live APIs (OpenAI Realtime, Gemini Live, AWS Nova Sonic, Ultravox, Grok). -- **[12a-describe-video-gemini-flash.py](./12a-describe-video-gemini-flash.py)**: Bot describes user's video (Video input, Multimodal LLMs) -- **[26c-gemini-live-video.py](./26c-gemini-live-video.py)**: Gemini with video input (Streaming video, Function calls) +### [`persistent-context/`](./persistent-context/) -### Voice & Language +Maintaining conversation context across sessions with different providers. -- **[13-transcription.py](./13-transcription.py)**: Speech transcription demo (STT providers, Real-time transcription) -- **[15-switch-voices.py](./15-switch-voices.py)**: Dynamic voice/language changing (ParallelPipelines, FunctionFilters) -- **[25-google-audio-in.py](./25-google-audio-in.py)**: Gemini for speech recognition (Alternative transcription) -- **[35-pattern-pair-voice-switching.py](./35-pattern-pair-voice-switching.py)**: Dynamic TTS voice switching (XML parsing, PatternPairAggregator) -- **[36-user-email-gathering.py](./36-user-email-gathering.py)**: Spelling mode for TTS (Confirmation patterns, XML tags) +### [`context-summarization/`](./context-summarization/) -### Integration Examples +Summarizing conversation context to manage token limits. -- **[18-gstreamer-filesrc.py](./18-gstreamer-filesrc.py)**: GStreamer video streaming (Video processing) -- **[19-openai-realtime-beta.py](./19-openai-realtime-beta.py)**: OpenAI Speech-to-Speech (Direct S2S, Function calls) -- **[21-tavus-layer-tavus-transport.py](./21-tavus-layer-tavus-transport.py)**: Tavus digital twin (Avatar integration) -- **[27-simli-layer.py](./27-simli-layer.py)**: Simli avatar integration (Video synchronization) -- **[56-lemonslice-transport.py](./56-lemonslice-transport.py)**: LemonSlice avatar integration (A/V Synced Avatar integration) +### [`update-settings/`](./update-settings/) -### Performance & Optimization +Changing service settings at runtime, organized by service type: -- **[16-gpu-container-local-bot.py](./16-gpu-container-local-bot.py)**: GPU-accelerated local bot (Performance measurement) +- **[`stt/`](./update-settings/stt/)** — Speech-to-text settings +- **[`tts/`](./update-settings/tts/)** — Text-to-speech settings +- **[`llm/`](./update-settings/llm/)** — LLM settings + +### [`turn-management/`](./turn-management/) + +Turn detection, interruption handling, and user input management. + +### [`thinking-and-mcp/`](./thinking-and-mcp/) + +LLM thinking/reasoning modes and MCP (Model Context Protocol) tool server integration. + +### [`transports/`](./transports/) + +Transport layer examples (WebRTC, Daily, LiveKit). + +### [`video-avatar/`](./video-avatar/) + +Video avatar integrations (Tavus, HeyGen, Simli, LemonSlice). + +### [`video-processing/`](./video-processing/) + +Video processing, mirroring, GStreamer, and custom video tracks. + +### [`features/`](./features/) + +Miscellaneous features: sound effects, wake phrases, observers, audio recording, live translation, service switching, and more. ## Advanced Usage @@ -141,4 +134,4 @@ uv run python --host 0.0.0.0 --port 8080 - **Connection errors**: Verify API keys in `.env` file - **Port conflicts**: Use `--port` to change the port -For more examples, visit our the [pipecat-examples repository](https://github.com/pipecat-ai/pipecat-examples). +For more examples, visit the [pipecat-examples repository](https://github.com/pipecat-ai/pipecat-examples). diff --git a/examples/54c-context-summarization-dedicated-llm.py b/examples/context-summarization/dedicated-llm.py similarity index 100% rename from examples/54c-context-summarization-dedicated-llm.py rename to examples/context-summarization/dedicated-llm.py diff --git a/examples/54a-context-summarization-google.py b/examples/context-summarization/google.py similarity index 100% rename from examples/54a-context-summarization-google.py rename to examples/context-summarization/google.py diff --git a/examples/54b-context-summarization-manual-openai.py b/examples/context-summarization/manual-openai.py similarity index 100% rename from examples/54b-context-summarization-manual-openai.py rename to examples/context-summarization/manual-openai.py diff --git a/examples/54-context-summarization-openai.py b/examples/context-summarization/openai.py similarity index 100% rename from examples/54-context-summarization-openai.py rename to examples/context-summarization/openai.py diff --git a/examples/34-audio-recording.py b/examples/features/audio-recording.py similarity index 100% rename from examples/34-audio-recording.py rename to examples/features/audio-recording.py diff --git a/examples/45-before-and-after-events.py b/examples/features/before-and-after-events.py similarity index 100% rename from examples/45-before-and-after-events.py rename to examples/features/before-and-after-events.py diff --git a/examples/23-bot-background-sound.py b/examples/features/bot-background-sound.py similarity index 100% rename from examples/23-bot-background-sound.py rename to examples/features/bot-background-sound.py diff --git a/examples/53-concurrent-llm-evaluation.py b/examples/features/concurrent-llm-evaluation.py similarity index 100% rename from examples/53-concurrent-llm-evaluation.py rename to examples/features/concurrent-llm-evaluation.py diff --git a/examples/53-concurrent-llm-rtvi-ignored-sources.py b/examples/features/concurrent-llm-rtvi-ignored-sources.py similarity index 100% rename from examples/53-concurrent-llm-rtvi-ignored-sources.py rename to examples/features/concurrent-llm-rtvi-ignored-sources.py diff --git a/examples/08-custom-frame-processor.py b/examples/features/custom-frame-processor.py similarity index 100% rename from examples/08-custom-frame-processor.py rename to examples/features/custom-frame-processor.py diff --git a/examples/32-gemini-grounding-metadata.py b/examples/features/gemini-grounding-metadata.py similarity index 100% rename from examples/32-gemini-grounding-metadata.py rename to examples/features/gemini-grounding-metadata.py diff --git a/examples/33-gemini-rag.py b/examples/features/gemini-rag.py similarity index 100% rename from examples/33-gemini-rag.py rename to examples/features/gemini-rag.py diff --git a/examples/16-gpu-container-local-bot.py b/examples/features/gpu-container-local-bot.py similarity index 100% rename from examples/16-gpu-container-local-bot.py rename to examples/features/gpu-container-local-bot.py diff --git a/examples/31-heartbeats.py b/examples/features/heartbeats.py similarity index 100% rename from examples/31-heartbeats.py rename to examples/features/heartbeats.py diff --git a/examples/52-live-translation.py b/examples/features/live-translation.py similarity index 100% rename from examples/52-live-translation.py rename to examples/features/live-translation.py diff --git a/examples/37-mem0.py b/examples/features/mem0.py similarity index 100% rename from examples/37-mem0.py rename to examples/features/mem0.py diff --git a/examples/30-observer.py b/examples/features/observer.py similarity index 100% rename from examples/30-observer.py rename to examples/features/observer.py diff --git a/examples/35-pattern-pair-voice-switching.py b/examples/features/pattern-pair-voice-switching.py similarity index 100% rename from examples/35-pattern-pair-voice-switching.py rename to examples/features/pattern-pair-voice-switching.py diff --git a/examples/47-sentry-metrics.py b/examples/features/sentry-metrics.py similarity index 100% rename from examples/47-sentry-metrics.py rename to examples/features/sentry-metrics.py diff --git a/examples/48-service-switcher.py b/examples/features/service-switcher.py similarity index 100% rename from examples/48-service-switcher.py rename to examples/features/service-switcher.py diff --git a/examples/11-sound-effects.py b/examples/features/sound-effects.py similarity index 100% rename from examples/11-sound-effects.py rename to examples/features/sound-effects.py diff --git a/examples/15a-switch-languages.py b/examples/features/switch-languages.py similarity index 100% rename from examples/15a-switch-languages.py rename to examples/features/switch-languages.py diff --git a/examples/15-switch-voices.py b/examples/features/switch-voices.py similarity index 100% rename from examples/15-switch-voices.py rename to examples/features/switch-voices.py diff --git a/examples/36-user-email-gathering.py b/examples/features/user-email-gathering.py similarity index 100% rename from examples/36-user-email-gathering.py rename to examples/features/user-email-gathering.py diff --git a/examples/44-voicemail-detection.py b/examples/features/voicemail-detection.py similarity index 100% rename from examples/44-voicemail-detection.py rename to examples/features/voicemail-detection.py diff --git a/examples/10-wake-phrase.py b/examples/features/wake-phrase.py similarity index 100% rename from examples/10-wake-phrase.py rename to examples/features/wake-phrase.py diff --git a/examples/01-say-one-thing.py b/examples/getting-started/01-say-one-thing.py similarity index 100% rename from examples/01-say-one-thing.py rename to examples/getting-started/01-say-one-thing.py diff --git a/examples/01a-local-audio.py b/examples/getting-started/01a-local-audio.py similarity index 100% rename from examples/01a-local-audio.py rename to examples/getting-started/01a-local-audio.py diff --git a/examples/02-llm-say-one-thing.py b/examples/getting-started/02-llm-say-one-thing.py similarity index 100% rename from examples/02-llm-say-one-thing.py rename to examples/getting-started/02-llm-say-one-thing.py diff --git a/examples/03b-still-frame-imagen.py b/examples/getting-started/03-still-frame.py similarity index 100% rename from examples/03b-still-frame-imagen.py rename to examples/getting-started/03-still-frame.py diff --git a/examples/03a-local-still-frame.py b/examples/getting-started/03a-local-still-frame.py similarity index 100% rename from examples/03a-local-still-frame.py rename to examples/getting-started/03a-local-still-frame.py diff --git a/examples/05-sync-speech-and-image.py b/examples/getting-started/04-sync-speech-and-image.py similarity index 100% rename from examples/05-sync-speech-and-image.py rename to examples/getting-started/04-sync-speech-and-image.py diff --git a/examples/06a-image-sync.py b/examples/getting-started/05-speaking-state.py similarity index 97% rename from examples/06a-image-sync.py rename to examples/getting-started/05-speaking-state.py index 473441fac..36762f6b0 100644 --- a/examples/06a-image-sync.py +++ b/examples/getting-started/05-speaking-state.py @@ -119,8 +119,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): ) image_sync_aggregator = ImageSyncAggregator( - os.path.join(os.path.dirname(__file__), "assets", "speaking.png"), - os.path.join(os.path.dirname(__file__), "assets", "waiting.png"), + os.path.join(os.path.dirname(__file__), "..", "assets", "speaking.png"), + os.path.join(os.path.dirname(__file__), "..", "assets", "waiting.png"), ) pipeline = Pipeline( diff --git a/examples/07-interruptible.py b/examples/getting-started/06-voice-agent.py similarity index 100% rename from examples/07-interruptible.py rename to examples/getting-started/06-voice-agent.py diff --git a/examples/07x-interruptible-local.py b/examples/getting-started/06a-voice-agent-local.py similarity index 100% rename from examples/07x-interruptible-local.py rename to examples/getting-started/06a-voice-agent-local.py diff --git a/examples/14-function-calling.py b/examples/getting-started/07-function-calling.py similarity index 100% rename from examples/14-function-calling.py rename to examples/getting-started/07-function-calling.py diff --git a/examples/20c-persistent-context-anthropic.py b/examples/persistent-context/anthropic.py similarity index 100% rename from examples/20c-persistent-context-anthropic.py rename to examples/persistent-context/anthropic.py diff --git a/examples/20e-persistent-context-aws-nova-sonic.py b/examples/persistent-context/aws-nova-sonic.py similarity index 100% rename from examples/20e-persistent-context-aws-nova-sonic.py rename to examples/persistent-context/aws-nova-sonic.py diff --git a/examples/20d-persistent-context-gemini.py b/examples/persistent-context/gemini.py similarity index 100% rename from examples/20d-persistent-context-gemini.py rename to examples/persistent-context/gemini.py diff --git a/examples/20f-persistent-context-grok-realtime.py b/examples/persistent-context/grok-realtime.py similarity index 100% rename from examples/20f-persistent-context-grok-realtime.py rename to examples/persistent-context/grok-realtime.py diff --git a/examples/20b-persistent-context-openai-realtime-beta.py b/examples/persistent-context/openai-realtime-beta.py similarity index 100% rename from examples/20b-persistent-context-openai-realtime-beta.py rename to examples/persistent-context/openai-realtime-beta.py diff --git a/examples/20b-persistent-context-openai-realtime.py b/examples/persistent-context/openai-realtime.py similarity index 100% rename from examples/20b-persistent-context-openai-realtime.py rename to examples/persistent-context/openai-realtime.py diff --git a/examples/20a-persistent-context-openai-responses-http.py b/examples/persistent-context/openai-responses-http.py similarity index 100% rename from examples/20a-persistent-context-openai-responses-http.py rename to examples/persistent-context/openai-responses-http.py diff --git a/examples/20a-persistent-context-openai-responses.py b/examples/persistent-context/openai-responses.py similarity index 100% rename from examples/20a-persistent-context-openai-responses.py rename to examples/persistent-context/openai-responses.py diff --git a/examples/20a-persistent-context-openai.py b/examples/persistent-context/openai.py similarity index 100% rename from examples/20a-persistent-context-openai.py rename to examples/persistent-context/openai.py diff --git a/examples/40-aws-nova-sonic.py b/examples/realtime/aws-nova-sonic.py similarity index 100% rename from examples/40-aws-nova-sonic.py rename to examples/realtime/aws-nova-sonic.py diff --git a/examples/19a-azure-realtime-beta.py b/examples/realtime/azure-beta.py similarity index 100% rename from examples/19a-azure-realtime-beta.py rename to examples/realtime/azure-beta.py diff --git a/examples/19a-azure-realtime.py b/examples/realtime/azure.py similarity index 100% rename from examples/19a-azure-realtime.py rename to examples/realtime/azure.py diff --git a/examples/26f-gemini-live-files-api.py b/examples/realtime/gemini-live-files-api.py similarity index 100% rename from examples/26f-gemini-live-files-api.py rename to examples/realtime/gemini-live-files-api.py diff --git a/examples/26b-gemini-live-function-calling.py b/examples/realtime/gemini-live-function-calling.py similarity index 100% rename from examples/26b-gemini-live-function-calling.py rename to examples/realtime/gemini-live-function-calling.py diff --git a/examples/26e-gemini-live-google-search.py b/examples/realtime/gemini-live-google-search.py similarity index 100% rename from examples/26e-gemini-live-google-search.py rename to examples/realtime/gemini-live-google-search.py diff --git a/examples/26i-gemini-live-graceful-end.py b/examples/realtime/gemini-live-graceful-end.py similarity index 100% rename from examples/26i-gemini-live-graceful-end.py rename to examples/realtime/gemini-live-graceful-end.py diff --git a/examples/26g-gemini-live-groundingMetadata.py b/examples/realtime/gemini-live-grounding-metadata.py similarity index 100% rename from examples/26g-gemini-live-groundingMetadata.py rename to examples/realtime/gemini-live-grounding-metadata.py diff --git a/examples/26a-gemini-live-local-vad.py b/examples/realtime/gemini-live-local-vad.py similarity index 100% rename from examples/26a-gemini-live-local-vad.py rename to examples/realtime/gemini-live-local-vad.py diff --git a/examples/26h-gemini-live-vertex-function-calling.py b/examples/realtime/gemini-live-vertex-function-calling.py similarity index 100% rename from examples/26h-gemini-live-vertex-function-calling.py rename to examples/realtime/gemini-live-vertex-function-calling.py diff --git a/examples/26c-gemini-live-video.py b/examples/realtime/gemini-live-video.py similarity index 100% rename from examples/26c-gemini-live-video.py rename to examples/realtime/gemini-live-video.py diff --git a/examples/26-gemini-live.py b/examples/realtime/gemini-live.py similarity index 100% rename from examples/26-gemini-live.py rename to examples/realtime/gemini-live.py diff --git a/examples/51-grok-realtime.py b/examples/realtime/grok.py similarity index 100% rename from examples/51-grok-realtime.py rename to examples/realtime/grok.py diff --git a/examples/19b-openai-realtime-beta-text.py b/examples/realtime/openai-beta-text.py similarity index 100% rename from examples/19b-openai-realtime-beta-text.py rename to examples/realtime/openai-beta-text.py diff --git a/examples/19-openai-realtime-beta.py b/examples/realtime/openai-beta.py similarity index 100% rename from examples/19-openai-realtime-beta.py rename to examples/realtime/openai-beta.py diff --git a/examples/19c-openai-realtime-live-video.py b/examples/realtime/openai-live-video.py similarity index 100% rename from examples/19c-openai-realtime-live-video.py rename to examples/realtime/openai-live-video.py diff --git a/examples/19b-openai-realtime-text.py b/examples/realtime/openai-text.py similarity index 100% rename from examples/19b-openai-realtime-text.py rename to examples/realtime/openai-text.py diff --git a/examples/19-openai-realtime.py b/examples/realtime/openai.py similarity index 100% rename from examples/19-openai-realtime.py rename to examples/realtime/openai.py diff --git a/examples/50a-ultravox-realtime-text.py b/examples/realtime/ultravox-text.py similarity index 100% rename from examples/50a-ultravox-realtime-text.py rename to examples/realtime/ultravox-text.py diff --git a/examples/50-ultravox-realtime.py b/examples/realtime/ultravox.py similarity index 100% rename from examples/50-ultravox-realtime.py rename to examples/realtime/ultravox.py diff --git a/examples/14d-function-calling-anthropic-video.py b/examples/services/function-calling/anthropic-video.py similarity index 100% rename from examples/14d-function-calling-anthropic-video.py rename to examples/services/function-calling/anthropic-video.py diff --git a/examples/14a-function-calling-anthropic.py b/examples/services/function-calling/anthropic.py similarity index 100% rename from examples/14a-function-calling-anthropic.py rename to examples/services/function-calling/anthropic.py diff --git a/examples/14d-function-calling-aws-video.py b/examples/services/function-calling/aws-video.py similarity index 100% rename from examples/14d-function-calling-aws-video.py rename to examples/services/function-calling/aws-video.py diff --git a/examples/14r-function-calling-aws.py b/examples/services/function-calling/aws.py similarity index 100% rename from examples/14r-function-calling-aws.py rename to examples/services/function-calling/aws.py diff --git a/examples/14h-function-calling-azure.py b/examples/services/function-calling/azure.py similarity index 100% rename from examples/14h-function-calling-azure.py rename to examples/services/function-calling/azure.py diff --git a/examples/14k-function-calling-cerebras.py b/examples/services/function-calling/cerebras.py similarity index 100% rename from examples/14k-function-calling-cerebras.py rename to examples/services/function-calling/cerebras.py diff --git a/examples/14l-function-calling-deepseek.py b/examples/services/function-calling/deepseek.py similarity index 100% rename from examples/14l-function-calling-deepseek.py rename to examples/services/function-calling/deepseek.py diff --git a/examples/14t-function-calling-direct.py b/examples/services/function-calling/direct.py similarity index 100% rename from examples/14t-function-calling-direct.py rename to examples/services/function-calling/direct.py diff --git a/examples/14i-function-calling-fireworks.py b/examples/services/function-calling/fireworks.py similarity index 100% rename from examples/14i-function-calling-fireworks.py rename to examples/services/function-calling/fireworks.py diff --git a/examples/14o-function-calling-gemini-openai-format.py b/examples/services/function-calling/gemini-openai-format.py similarity index 100% rename from examples/14o-function-calling-gemini-openai-format.py rename to examples/services/function-calling/gemini-openai-format.py diff --git a/examples/14p-function-calling-gemini-vertex-ai.py b/examples/services/function-calling/google-vertex-ai.py similarity index 100% rename from examples/14p-function-calling-gemini-vertex-ai.py rename to examples/services/function-calling/google-vertex-ai.py diff --git a/examples/14d-function-calling-gemini-flash-video.py b/examples/services/function-calling/google-video.py similarity index 100% rename from examples/14d-function-calling-gemini-flash-video.py rename to examples/services/function-calling/google-video.py diff --git a/examples/14e-function-calling-google.py b/examples/services/function-calling/google.py similarity index 100% rename from examples/14e-function-calling-google.py rename to examples/services/function-calling/google.py diff --git a/examples/14g-function-calling-grok.py b/examples/services/function-calling/grok.py similarity index 100% rename from examples/14g-function-calling-grok.py rename to examples/services/function-calling/grok.py diff --git a/examples/14f-function-calling-groq.py b/examples/services/function-calling/groq.py similarity index 100% rename from examples/14f-function-calling-groq.py rename to examples/services/function-calling/groq.py diff --git a/examples/14w-function-calling-mistral.py b/examples/services/function-calling/mistral.py similarity index 100% rename from examples/14w-function-calling-mistral.py rename to examples/services/function-calling/mistral.py diff --git a/examples/14d-function-calling-moondream-video.py b/examples/services/function-calling/moondream-video.py similarity index 100% rename from examples/14d-function-calling-moondream-video.py rename to examples/services/function-calling/moondream-video.py diff --git a/examples/14v-function-calling-nebius.py b/examples/services/function-calling/nebius.py similarity index 100% rename from examples/14v-function-calling-nebius.py rename to examples/services/function-calling/nebius.py diff --git a/examples/14z-function-calling-novita.py b/examples/services/function-calling/novita.py similarity index 100% rename from examples/14z-function-calling-novita.py rename to examples/services/function-calling/novita.py diff --git a/examples/14j-function-calling-nvidia.py b/examples/services/function-calling/nvidia.py similarity index 100% rename from examples/14j-function-calling-nvidia.py rename to examples/services/function-calling/nvidia.py diff --git a/examples/14u-function-calling-ollama.py b/examples/services/function-calling/ollama.py similarity index 100% rename from examples/14u-function-calling-ollama.py rename to examples/services/function-calling/ollama.py diff --git a/examples/14-function-calling-openai-responses-http.py b/examples/services/function-calling/openai-responses-http.py similarity index 100% rename from examples/14-function-calling-openai-responses-http.py rename to examples/services/function-calling/openai-responses-http.py diff --git a/examples/14d-function-calling-openai-responses-video-http.py b/examples/services/function-calling/openai-responses-video-http.py similarity index 100% rename from examples/14d-function-calling-openai-responses-video-http.py rename to examples/services/function-calling/openai-responses-video-http.py diff --git a/examples/14d-function-calling-openai-responses-video.py b/examples/services/function-calling/openai-responses-video.py similarity index 100% rename from examples/14d-function-calling-openai-responses-video.py rename to examples/services/function-calling/openai-responses-video.py diff --git a/examples/14-function-calling-openai-responses.py b/examples/services/function-calling/openai-responses.py similarity index 100% rename from examples/14-function-calling-openai-responses.py rename to examples/services/function-calling/openai-responses.py diff --git a/examples/14d-function-calling-openai-video.py b/examples/services/function-calling/openai-video.py similarity index 100% rename from examples/14d-function-calling-openai-video.py rename to examples/services/function-calling/openai-video.py diff --git a/examples/14b-function-calling-openai.py b/examples/services/function-calling/openai.py similarity index 100% rename from examples/14b-function-calling-openai.py rename to examples/services/function-calling/openai.py diff --git a/examples/14m-function-calling-openrouter.py b/examples/services/function-calling/openrouter.py similarity index 100% rename from examples/14m-function-calling-openrouter.py rename to examples/services/function-calling/openrouter.py diff --git a/examples/14n-function-calling-perplexity.py b/examples/services/function-calling/perplexity.py similarity index 100% rename from examples/14n-function-calling-perplexity.py rename to examples/services/function-calling/perplexity.py diff --git a/examples/14q-function-calling-qwen.py b/examples/services/function-calling/qwen.py similarity index 100% rename from examples/14q-function-calling-qwen.py rename to examples/services/function-calling/qwen.py diff --git a/examples/14s-function-calling-sambanova.py b/examples/services/function-calling/sambanova.py similarity index 100% rename from examples/14s-function-calling-sambanova.py rename to examples/services/function-calling/sambanova.py diff --git a/examples/14y-function-calling-sarvam.py b/examples/services/function-calling/sarvam.py similarity index 100% rename from examples/14y-function-calling-sarvam.py rename to examples/services/function-calling/sarvam.py diff --git a/examples/14c-function-calling-together.py b/examples/services/function-calling/together.py similarity index 100% rename from examples/14c-function-calling-together.py rename to examples/services/function-calling/together.py diff --git a/examples/07zd-interruptible-aicoustics.py b/examples/services/speech/aicoustics.py similarity index 100% rename from examples/07zd-interruptible-aicoustics.py rename to examples/services/speech/aicoustics.py diff --git a/examples/07o-interruptible-assemblyai-turn-detection.py b/examples/services/speech/assemblyai-turn-detection.py similarity index 100% rename from examples/07o-interruptible-assemblyai-turn-detection.py rename to examples/services/speech/assemblyai-turn-detection.py diff --git a/examples/07o-interruptible-assemblyai.py b/examples/services/speech/assemblyai.py similarity index 100% rename from examples/07o-interruptible-assemblyai.py rename to examples/services/speech/assemblyai.py diff --git a/examples/07zc-interruptible-asyncai-http.py b/examples/services/speech/asyncai-http.py similarity index 100% rename from examples/07zc-interruptible-asyncai-http.py rename to examples/services/speech/asyncai-http.py diff --git a/examples/07zc-interruptible-asyncai.py b/examples/services/speech/asyncai.py similarity index 100% rename from examples/07zc-interruptible-asyncai.py rename to examples/services/speech/asyncai.py diff --git a/examples/07m-interruptible-aws-strands.py b/examples/services/speech/aws-strands.py similarity index 100% rename from examples/07m-interruptible-aws-strands.py rename to examples/services/speech/aws-strands.py diff --git a/examples/07m-interruptible-aws.py b/examples/services/speech/aws.py similarity index 100% rename from examples/07m-interruptible-aws.py rename to examples/services/speech/aws.py diff --git a/examples/07f-interruptible-azure-http.py b/examples/services/speech/azure-http.py similarity index 100% rename from examples/07f-interruptible-azure-http.py rename to examples/services/speech/azure-http.py diff --git a/examples/07f-interruptible-azure.py b/examples/services/speech/azure.py similarity index 100% rename from examples/07f-interruptible-azure.py rename to examples/services/speech/azure.py diff --git a/examples/07zg-interruptible-camb.py b/examples/services/speech/camb.py similarity index 100% rename from examples/07zg-interruptible-camb.py rename to examples/services/speech/camb.py diff --git a/examples/07-interruptible-cartesia-http.py b/examples/services/speech/cartesia-http.py similarity index 100% rename from examples/07-interruptible-cartesia-http.py rename to examples/services/speech/cartesia-http.py diff --git a/examples/06-listen-and-respond.py b/examples/services/speech/cartesia.py similarity index 69% rename from examples/06-listen-and-respond.py rename to examples/services/speech/cartesia.py index ec382681d..0489663e7 100644 --- a/examples/06-listen-and-respond.py +++ b/examples/services/speech/cartesia.py @@ -10,13 +10,7 @@ from dotenv import load_dotenv from loguru import logger from pipecat.audio.vad.silero import SileroVADAnalyzer -from pipecat.frames.frames import Frame, LLMRunFrame, MetricsFrame -from pipecat.metrics.metrics import ( - LLMUsageMetricsData, - ProcessingMetricsData, - TTFBMetricsData, - TTSUsageMetricsData, -) +from pipecat.frames.frames import LLMRunFrame from pipecat.pipeline.pipeline import Pipeline from pipecat.pipeline.runner import PipelineRunner from pipecat.pipeline.task import PipelineParams, PipelineTask @@ -25,11 +19,10 @@ from pipecat.processors.aggregators.llm_response_universal import ( LLMContextAggregatorPair, LLMUserAggregatorParams, ) -from pipecat.processors.frame_processor import FrameDirection, FrameProcessor from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport +from pipecat.services.cartesia.stt import CartesiaSTTService from pipecat.services.cartesia.tts import CartesiaTTSService -from pipecat.services.deepgram.stt import DeepgramSTTService from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -37,27 +30,6 @@ from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams load_dotenv(override=True) - -class MetricsLogger(FrameProcessor): - async def process_frame(self, frame: Frame, direction: FrameDirection): - await super().process_frame(frame, direction) - - if isinstance(frame, MetricsFrame): - for d in frame.data: - if isinstance(d, TTFBMetricsData): - print(f"!!! MetricsFrame: {frame}, ttfb: {d.value}") - elif isinstance(d, ProcessingMetricsData): - print(f"!!! MetricsFrame: {frame}, processing: {d.value}") - elif isinstance(d, LLMUsageMetricsData): - tokens = d.value - print( - f"!!! MetricsFrame: {frame}, tokens: {tokens.prompt_tokens}, characters: {tokens.completion_tokens}" - ) - elif isinstance(d, TTSUsageMetricsData): - print(f"!!! MetricsFrame: {frame}, characters: {d.value}") - await self.push_frame(frame, direction) - - # We use lambdas to defer transport parameter creation until the transport # type is selected at runtime. transport_params = { @@ -79,7 +51,7 @@ transport_params = { async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): logger.info(f"Starting bot") - stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY")) + stt = CartesiaSTTService(api_key=os.getenv("CARTESIA_API_KEY")) tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), @@ -95,8 +67,6 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): ), ) - ml = MetricsLogger() - context = LLMContext() user_aggregator, assistant_aggregator = LLMContextAggregatorPair( context, @@ -105,14 +75,13 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): pipeline = Pipeline( [ - transport.input(), + transport.input(), # Transport user input stt, - user_aggregator, - llm, - tts, - ml, - transport.output(), - assistant_aggregator, + user_aggregator, # User responses + llm, # LLM + tts, # TTS + transport.output(), # Transport bot output + assistant_aggregator, # Assistant spoken responses ] ) @@ -140,6 +109,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await task.cancel() runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) + await runner.run(task) diff --git a/examples/07c-interruptible-deepgram-flux-sagemaker.py b/examples/services/speech/deepgram-flux-sagemaker.py similarity index 100% rename from examples/07c-interruptible-deepgram-flux-sagemaker.py rename to examples/services/speech/deepgram-flux-sagemaker.py diff --git a/examples/07c-interruptible-deepgram-flux.py b/examples/services/speech/deepgram-flux.py similarity index 100% rename from examples/07c-interruptible-deepgram-flux.py rename to examples/services/speech/deepgram-flux.py diff --git a/examples/07c-interruptible-deepgram-http.py b/examples/services/speech/deepgram-http.py similarity index 100% rename from examples/07c-interruptible-deepgram-http.py rename to examples/services/speech/deepgram-http.py diff --git a/examples/07c-interruptible-deepgram-sagemaker.py b/examples/services/speech/deepgram-sagemaker.py similarity index 100% rename from examples/07c-interruptible-deepgram-sagemaker.py rename to examples/services/speech/deepgram-sagemaker.py diff --git a/examples/07c-interruptible-deepgram-vad.py b/examples/services/speech/deepgram-vad.py similarity index 100% rename from examples/07c-interruptible-deepgram-vad.py rename to examples/services/speech/deepgram-vad.py diff --git a/examples/07c-interruptible-deepgram.py b/examples/services/speech/deepgram.py similarity index 100% rename from examples/07c-interruptible-deepgram.py rename to examples/services/speech/deepgram.py diff --git a/examples/07d-interruptible-elevenlabs-http.py b/examples/services/speech/elevenlabs-http.py similarity index 100% rename from examples/07d-interruptible-elevenlabs-http.py rename to examples/services/speech/elevenlabs-http.py diff --git a/examples/07d-interruptible-elevenlabs.py b/examples/services/speech/elevenlabs.py similarity index 100% rename from examples/07d-interruptible-elevenlabs.py rename to examples/services/speech/elevenlabs.py diff --git a/examples/07w-interruptible-fal.py b/examples/services/speech/fal.py similarity index 100% rename from examples/07w-interruptible-fal.py rename to examples/services/speech/fal.py diff --git a/examples/07t-interruptible-fish.py b/examples/services/speech/fish.py similarity index 100% rename from examples/07t-interruptible-fish.py rename to examples/services/speech/fish.py diff --git a/examples/07j-interruptible-gladia-vad.py b/examples/services/speech/gladia-vad.py similarity index 100% rename from examples/07j-interruptible-gladia-vad.py rename to examples/services/speech/gladia-vad.py diff --git a/examples/07j-interruptible-gladia.py b/examples/services/speech/gladia.py similarity index 100% rename from examples/07j-interruptible-gladia.py rename to examples/services/speech/gladia.py diff --git a/examples/07s-interruptible-google-audio-in.py b/examples/services/speech/google-audio-in.py similarity index 100% rename from examples/07s-interruptible-google-audio-in.py rename to examples/services/speech/google-audio-in.py diff --git a/examples/07n-interruptible-gemini.py b/examples/services/speech/google-gemini-tts.py similarity index 100% rename from examples/07n-interruptible-gemini.py rename to examples/services/speech/google-gemini-tts.py diff --git a/examples/07n-interruptible-google-http.py b/examples/services/speech/google-http.py similarity index 100% rename from examples/07n-interruptible-google-http.py rename to examples/services/speech/google-http.py diff --git a/examples/07n-interruptible-gemini-image.py b/examples/services/speech/google-image.py similarity index 100% rename from examples/07n-interruptible-gemini-image.py rename to examples/services/speech/google-image.py diff --git a/examples/07n-interruptible-google.py b/examples/services/speech/google.py similarity index 100% rename from examples/07n-interruptible-google.py rename to examples/services/speech/google.py diff --git a/examples/07zf-interruptible-gradium.py b/examples/services/speech/gradium.py similarity index 100% rename from examples/07zf-interruptible-gradium.py rename to examples/services/speech/gradium.py diff --git a/examples/07l-interruptible-groq.py b/examples/services/speech/groq.py similarity index 100% rename from examples/07l-interruptible-groq.py rename to examples/services/speech/groq.py diff --git a/examples/07ze-interruptible-hume.py b/examples/services/speech/hume.py similarity index 100% rename from examples/07ze-interruptible-hume.py rename to examples/services/speech/hume.py diff --git a/examples/07zb-interruptible-inworld-http.py b/examples/services/speech/inworld-http.py similarity index 100% rename from examples/07zb-interruptible-inworld-http.py rename to examples/services/speech/inworld-http.py diff --git a/examples/07zb-interruptible-inworld.py b/examples/services/speech/inworld.py similarity index 100% rename from examples/07zb-interruptible-inworld.py rename to examples/services/speech/inworld.py diff --git a/examples/07zj-interruptible-kokoro.py b/examples/services/speech/kokoro.py similarity index 100% rename from examples/07zj-interruptible-kokoro.py rename to examples/services/speech/kokoro.py diff --git a/examples/07p-interruptible-krisp-viva.py b/examples/services/speech/krisp-viva.py similarity index 100% rename from examples/07p-interruptible-krisp-viva.py rename to examples/services/speech/krisp-viva.py diff --git a/examples/07b-interruptible-langchain.py b/examples/services/speech/langchain.py similarity index 100% rename from examples/07b-interruptible-langchain.py rename to examples/services/speech/langchain.py diff --git a/examples/07k-interruptible-lmnt.py b/examples/services/speech/lmnt.py similarity index 100% rename from examples/07k-interruptible-lmnt.py rename to examples/services/speech/lmnt.py diff --git a/examples/07y-interruptible-minimax.py b/examples/services/speech/minimax.py similarity index 100% rename from examples/07y-interruptible-minimax.py rename to examples/services/speech/minimax.py diff --git a/examples/07v-interruptible-neuphonic-http.py b/examples/services/speech/neuphonic-http.py similarity index 100% rename from examples/07v-interruptible-neuphonic-http.py rename to examples/services/speech/neuphonic-http.py diff --git a/examples/07v-interruptible-neuphonic.py b/examples/services/speech/neuphonic.py similarity index 100% rename from examples/07v-interruptible-neuphonic.py rename to examples/services/speech/neuphonic.py diff --git a/examples/07r-interruptible-nvidia.py b/examples/services/speech/nvidia.py similarity index 100% rename from examples/07r-interruptible-nvidia.py rename to examples/services/speech/nvidia.py diff --git a/examples/07g-interruptible-openai-http.py b/examples/services/speech/openai-http.py similarity index 100% rename from examples/07g-interruptible-openai-http.py rename to examples/services/speech/openai-http.py diff --git a/examples/07-interruptible-openai-responses-http.py b/examples/services/speech/openai-responses-http.py similarity index 100% rename from examples/07-interruptible-openai-responses-http.py rename to examples/services/speech/openai-responses-http.py diff --git a/examples/07-interruptible-openai-responses.py b/examples/services/speech/openai-responses.py similarity index 100% rename from examples/07-interruptible-openai-responses.py rename to examples/services/speech/openai-responses.py diff --git a/examples/07g-interruptible-openai.py b/examples/services/speech/openai.py similarity index 100% rename from examples/07g-interruptible-openai.py rename to examples/services/speech/openai.py diff --git a/examples/07zi-interruptible-piper.py b/examples/services/speech/piper.py similarity index 100% rename from examples/07zi-interruptible-piper.py rename to examples/services/speech/piper.py diff --git a/examples/07zk-interruptible-resemble.py b/examples/services/speech/resemble.py similarity index 100% rename from examples/07zk-interruptible-resemble.py rename to examples/services/speech/resemble.py diff --git a/examples/07q-interruptible-rime-http.py b/examples/services/speech/rime-http.py similarity index 100% rename from examples/07q-interruptible-rime-http.py rename to examples/services/speech/rime-http.py diff --git a/examples/07q-interruptible-rime.py b/examples/services/speech/rime.py similarity index 100% rename from examples/07q-interruptible-rime.py rename to examples/services/speech/rime.py diff --git a/examples/07z-interruptible-sarvam-http.py b/examples/services/speech/sarvam-http.py similarity index 100% rename from examples/07z-interruptible-sarvam-http.py rename to examples/services/speech/sarvam-http.py diff --git a/examples/07z-interruptible-sarvam.py b/examples/services/speech/sarvam.py similarity index 100% rename from examples/07z-interruptible-sarvam.py rename to examples/services/speech/sarvam.py diff --git a/examples/07zl-interruptible-smallest.py b/examples/services/speech/smallest.py similarity index 100% rename from examples/07zl-interruptible-smallest.py rename to examples/services/speech/smallest.py diff --git a/examples/07za-interruptible-soniox.py b/examples/services/speech/soniox.py similarity index 100% rename from examples/07za-interruptible-soniox.py rename to examples/services/speech/soniox.py diff --git a/examples/07a-interruptible-speechmatics-vad.py b/examples/services/speech/speechmatics-vad.py similarity index 100% rename from examples/07a-interruptible-speechmatics-vad.py rename to examples/services/speech/speechmatics-vad.py diff --git a/examples/07a-interruptible-speechmatics.py b/examples/services/speech/speechmatics.py similarity index 100% rename from examples/07a-interruptible-speechmatics.py rename to examples/services/speech/speechmatics.py diff --git a/examples/07e-interruptible-xai.py b/examples/services/speech/xai.py similarity index 100% rename from examples/07e-interruptible-xai.py rename to examples/services/speech/xai.py diff --git a/examples/07i-interruptible-xtts.py b/examples/services/speech/xtts.py similarity index 100% rename from examples/07i-interruptible-xtts.py rename to examples/services/speech/xtts.py diff --git a/examples/39-mcp-stdio.py b/examples/thinking-and-mcp/mcp-stdio.py similarity index 100% rename from examples/39-mcp-stdio.py rename to examples/thinking-and-mcp/mcp-stdio.py diff --git a/examples/39b-mcp-streamable-http-gemini-live.py b/examples/thinking-and-mcp/mcp-streamable-http-gemini-live.py similarity index 100% rename from examples/39b-mcp-streamable-http-gemini-live.py rename to examples/thinking-and-mcp/mcp-streamable-http-gemini-live.py diff --git a/examples/39a-mcp-streamable-http.py b/examples/thinking-and-mcp/mcp-streamable-http.py similarity index 100% rename from examples/39a-mcp-streamable-http.py rename to examples/thinking-and-mcp/mcp-streamable-http.py diff --git a/examples/39c-multiple-mcp.py b/examples/thinking-and-mcp/multiple-mcp.py similarity index 100% rename from examples/39c-multiple-mcp.py rename to examples/thinking-and-mcp/multiple-mcp.py diff --git a/examples/49a-thinking-anthropic.py b/examples/thinking-and-mcp/thinking-anthropic.py similarity index 100% rename from examples/49a-thinking-anthropic.py rename to examples/thinking-and-mcp/thinking-anthropic.py diff --git a/examples/49c-thinking-functions-anthropic.py b/examples/thinking-and-mcp/thinking-functions-anthropic.py similarity index 100% rename from examples/49c-thinking-functions-anthropic.py rename to examples/thinking-and-mcp/thinking-functions-anthropic.py diff --git a/examples/49d-thinking-functions-google.py b/examples/thinking-and-mcp/thinking-functions-google.py similarity index 100% rename from examples/49d-thinking-functions-google.py rename to examples/thinking-and-mcp/thinking-functions-google.py diff --git a/examples/49b-thinking-google.py b/examples/thinking-and-mcp/thinking-google.py similarity index 100% rename from examples/49b-thinking-google.py rename to examples/thinking-and-mcp/thinking-google.py diff --git a/examples/13d-assemblyai-transcription.py b/examples/transcription/assemblyai.py similarity index 100% rename from examples/13d-assemblyai-transcription.py rename to examples/transcription/assemblyai.py diff --git a/examples/13j-azure-transcription.py b/examples/transcription/azure.py similarity index 100% rename from examples/13j-azure-transcription.py rename to examples/transcription/azure.py diff --git a/examples/13f-cartesia-transcription.py b/examples/transcription/cartesia.py similarity index 100% rename from examples/13f-cartesia-transcription.py rename to examples/transcription/cartesia.py diff --git a/examples/13b-deepgram-transcription.py b/examples/transcription/deepgram.py similarity index 100% rename from examples/13b-deepgram-transcription.py rename to examples/transcription/deepgram.py diff --git a/examples/13k-elevenlabs-transcription.py b/examples/transcription/elevenlabs.py similarity index 100% rename from examples/13k-elevenlabs-transcription.py rename to examples/transcription/elevenlabs.py diff --git a/examples/13c-gladia-transcription.py b/examples/transcription/gladia-transcription.py similarity index 100% rename from examples/13c-gladia-transcription.py rename to examples/transcription/gladia-transcription.py diff --git a/examples/13c-gladia-translation.py b/examples/transcription/gladia-translation.py similarity index 100% rename from examples/13c-gladia-translation.py rename to examples/transcription/gladia-translation.py diff --git a/examples/25-google-audio-in.py b/examples/transcription/google-llm.py similarity index 100% rename from examples/25-google-audio-in.py rename to examples/transcription/google-llm.py diff --git a/examples/13l-gradium-transcription.py b/examples/transcription/gradium.py similarity index 100% rename from examples/13l-gradium-transcription.py rename to examples/transcription/gradium.py diff --git a/examples/13m-openai-transcription.py b/examples/transcription/openai.py similarity index 100% rename from examples/13m-openai-transcription.py rename to examples/transcription/openai.py diff --git a/examples/13i-soniox-transcription.py b/examples/transcription/soniox.py similarity index 100% rename from examples/13i-soniox-transcription.py rename to examples/transcription/soniox.py diff --git a/examples/13h-speechmatics-transcription.py b/examples/transcription/speechmatics.py similarity index 100% rename from examples/13h-speechmatics-transcription.py rename to examples/transcription/speechmatics.py diff --git a/examples/13a-whisper-local.py b/examples/transcription/whisper-local.py similarity index 100% rename from examples/13a-whisper-local.py rename to examples/transcription/whisper-local.py diff --git a/examples/13e-whisper-mlx.py b/examples/transcription/whisper-mlx.py similarity index 100% rename from examples/13e-whisper-mlx.py rename to examples/transcription/whisper-mlx.py diff --git a/examples/13-whisper-transcription.py b/examples/transcription/whisper.py similarity index 100% rename from examples/13-whisper-transcription.py rename to examples/transcription/whisper.py diff --git a/examples/04a-transports-daily.py b/examples/transports/daily.py similarity index 100% rename from examples/04a-transports-daily.py rename to examples/transports/daily.py diff --git a/examples/04b-transports-livekit.py b/examples/transports/livekit.py similarity index 100% rename from examples/04b-transports-livekit.py rename to examples/transports/livekit.py diff --git a/examples/04-transports-small-webrtc.py b/examples/transports/small-webrtc.py similarity index 100% rename from examples/04-transports-small-webrtc.py rename to examples/transports/small-webrtc.py diff --git a/examples/17-detect-user-idle.py b/examples/turn-management/detect-user-idle.py similarity index 100% rename from examples/17-detect-user-idle.py rename to examples/turn-management/detect-user-idle.py diff --git a/examples/22-filter-incomplete-turns.py b/examples/turn-management/filter-incomplete-turns.py similarity index 100% rename from examples/22-filter-incomplete-turns.py rename to examples/turn-management/filter-incomplete-turns.py diff --git a/examples/42-interruption-config.py b/examples/turn-management/interruption-config.py similarity index 100% rename from examples/42-interruption-config.py rename to examples/turn-management/interruption-config.py diff --git a/examples/38a-smart-turn-local-coreml.py b/examples/turn-management/smart-turn-local-coreml.py similarity index 100% rename from examples/38a-smart-turn-local-coreml.py rename to examples/turn-management/smart-turn-local-coreml.py diff --git a/examples/38b-smart-turn-local.py b/examples/turn-management/smart-turn-local.py similarity index 100% rename from examples/38b-smart-turn-local.py rename to examples/turn-management/smart-turn-local.py diff --git a/examples/29-turn-tracking-observer.py b/examples/turn-management/turn-tracking-observer.py similarity index 100% rename from examples/29-turn-tracking-observer.py rename to examples/turn-management/turn-tracking-observer.py diff --git a/examples/28-user-assistant-turns.py b/examples/turn-management/user-assistant-turns.py similarity index 100% rename from examples/28-user-assistant-turns.py rename to examples/turn-management/user-assistant-turns.py diff --git a/examples/24-user-mute-strategy.py b/examples/turn-management/user-mute-strategy.py similarity index 100% rename from examples/24-user-mute-strategy.py rename to examples/turn-management/user-mute-strategy.py diff --git a/examples/55zj-update-settings-anthropic-llm.py b/examples/update-settings/llm/anthropic.py similarity index 100% rename from examples/55zj-update-settings-anthropic-llm.py rename to examples/update-settings/llm/anthropic.py diff --git a/examples/55zp-update-settings-aws-bedrock-llm.py b/examples/update-settings/llm/aws-bedrock.py similarity index 100% rename from examples/55zp-update-settings-aws-bedrock-llm.py rename to examples/update-settings/llm/aws-bedrock.py diff --git a/examples/55zzk-update-settings-aws-nova-sonic-llm.py b/examples/update-settings/llm/aws-nova-sonic.py similarity index 100% rename from examples/55zzk-update-settings-aws-nova-sonic-llm.py rename to examples/update-settings/llm/aws-nova-sonic.py diff --git a/examples/55zl-update-settings-azure-realtime.py b/examples/update-settings/llm/azure-realtime.py similarity index 100% rename from examples/55zl-update-settings-azure-realtime.py rename to examples/update-settings/llm/azure-realtime.py diff --git a/examples/55zi-update-settings-azure-llm.py b/examples/update-settings/llm/azure.py similarity index 100% rename from examples/55zi-update-settings-azure-llm.py rename to examples/update-settings/llm/azure.py diff --git a/examples/55zx-update-settings-cerebras-llm.py b/examples/update-settings/llm/cerebras.py similarity index 100% rename from examples/55zx-update-settings-cerebras-llm.py rename to examples/update-settings/llm/cerebras.py diff --git a/examples/55zy-update-settings-deepseek-llm.py b/examples/update-settings/llm/deepseek.py similarity index 100% rename from examples/55zy-update-settings-deepseek-llm.py rename to examples/update-settings/llm/deepseek.py diff --git a/examples/55zz-update-settings-fireworks-llm.py b/examples/update-settings/llm/fireworks.py similarity index 100% rename from examples/55zz-update-settings-fireworks-llm.py rename to examples/update-settings/llm/fireworks.py diff --git a/examples/55zm-update-settings-gemini-live-vertex.py b/examples/update-settings/llm/gemini-live-vertex.py similarity index 100% rename from examples/55zm-update-settings-gemini-live-vertex.py rename to examples/update-settings/llm/gemini-live-vertex.py diff --git a/examples/55zm-update-settings-gemini-live.py b/examples/update-settings/llm/gemini-live.py similarity index 100% rename from examples/55zm-update-settings-gemini-live.py rename to examples/update-settings/llm/gemini-live.py diff --git a/examples/55zk-update-settings-google-vertex-llm.py b/examples/update-settings/llm/google-vertex.py similarity index 100% rename from examples/55zk-update-settings-google-vertex-llm.py rename to examples/update-settings/llm/google-vertex.py diff --git a/examples/55zk-update-settings-google-llm.py b/examples/update-settings/llm/google.py similarity index 100% rename from examples/55zk-update-settings-google-llm.py rename to examples/update-settings/llm/google.py diff --git a/examples/55zo-update-settings-grok-realtime.py b/examples/update-settings/llm/grok-realtime.py similarity index 100% rename from examples/55zo-update-settings-grok-realtime.py rename to examples/update-settings/llm/grok-realtime.py diff --git a/examples/55zza-update-settings-grok-llm.py b/examples/update-settings/llm/grok.py similarity index 100% rename from examples/55zza-update-settings-grok-llm.py rename to examples/update-settings/llm/grok.py diff --git a/examples/55zzb-update-settings-groq-llm.py b/examples/update-settings/llm/groq.py similarity index 100% rename from examples/55zzb-update-settings-groq-llm.py rename to examples/update-settings/llm/groq.py diff --git a/examples/55zzc-update-settings-mistral-llm.py b/examples/update-settings/llm/mistral.py similarity index 100% rename from examples/55zzc-update-settings-mistral-llm.py rename to examples/update-settings/llm/mistral.py diff --git a/examples/55zzd-update-settings-nvidia-llm.py b/examples/update-settings/llm/nvidia.py similarity index 100% rename from examples/55zzd-update-settings-nvidia-llm.py rename to examples/update-settings/llm/nvidia.py diff --git a/examples/55zze-update-settings-ollama-llm.py b/examples/update-settings/llm/ollama.py similarity index 100% rename from examples/55zze-update-settings-ollama-llm.py rename to examples/update-settings/llm/ollama.py diff --git a/examples/55zl-update-settings-openai-realtime.py b/examples/update-settings/llm/openai-realtime.py similarity index 100% rename from examples/55zl-update-settings-openai-realtime.py rename to examples/update-settings/llm/openai-realtime.py diff --git a/examples/55zi-update-settings-openai-responses-http-llm.py b/examples/update-settings/llm/openai-responses-http.py similarity index 100% rename from examples/55zi-update-settings-openai-responses-http-llm.py rename to examples/update-settings/llm/openai-responses-http.py diff --git a/examples/55zi-update-settings-openai-responses-llm.py b/examples/update-settings/llm/openai-responses.py similarity index 100% rename from examples/55zi-update-settings-openai-responses-llm.py rename to examples/update-settings/llm/openai-responses.py diff --git a/examples/55zi-update-settings-openai-llm.py b/examples/update-settings/llm/openai.py similarity index 100% rename from examples/55zi-update-settings-openai-llm.py rename to examples/update-settings/llm/openai.py diff --git a/examples/55zzf-update-settings-openrouter-llm.py b/examples/update-settings/llm/openrouter.py similarity index 100% rename from examples/55zzf-update-settings-openrouter-llm.py rename to examples/update-settings/llm/openrouter.py diff --git a/examples/55zzg-update-settings-perplexity-llm.py b/examples/update-settings/llm/perplexity.py similarity index 100% rename from examples/55zzg-update-settings-perplexity-llm.py rename to examples/update-settings/llm/perplexity.py diff --git a/examples/55zzh-update-settings-qwen-llm.py b/examples/update-settings/llm/qwen.py similarity index 100% rename from examples/55zzh-update-settings-qwen-llm.py rename to examples/update-settings/llm/qwen.py diff --git a/examples/55zzi-update-settings-sambanova-llm.py b/examples/update-settings/llm/sambanova.py similarity index 100% rename from examples/55zzi-update-settings-sambanova-llm.py rename to examples/update-settings/llm/sambanova.py diff --git a/examples/55zzq-update-settings-sarvam-llm.py b/examples/update-settings/llm/sarvam.py similarity index 100% rename from examples/55zzq-update-settings-sarvam-llm.py rename to examples/update-settings/llm/sarvam.py diff --git a/examples/55zzj-update-settings-together-llm.py b/examples/update-settings/llm/together.py similarity index 100% rename from examples/55zzj-update-settings-together-llm.py rename to examples/update-settings/llm/together.py diff --git a/examples/55zn-update-settings-ultravox-realtime.py b/examples/update-settings/llm/ultravox-realtime.py similarity index 100% rename from examples/55zn-update-settings-ultravox-realtime.py rename to examples/update-settings/llm/ultravox-realtime.py diff --git a/examples/55d-update-settings-assemblyai-stt.py b/examples/update-settings/stt/assemblyai.py similarity index 100% rename from examples/55d-update-settings-assemblyai-stt.py rename to examples/update-settings/stt/assemblyai.py diff --git a/examples/55l-update-settings-aws-transcribe-stt.py b/examples/update-settings/stt/aws-transcribe.py similarity index 100% rename from examples/55l-update-settings-aws-transcribe-stt.py rename to examples/update-settings/stt/aws-transcribe.py diff --git a/examples/55b-update-settings-azure-stt.py b/examples/update-settings/stt/azure.py similarity index 100% rename from examples/55b-update-settings-azure-stt.py rename to examples/update-settings/stt/azure.py diff --git a/examples/55m-update-settings-cartesia-stt.py b/examples/update-settings/stt/cartesia.py similarity index 100% rename from examples/55m-update-settings-cartesia-stt.py rename to examples/update-settings/stt/cartesia.py diff --git a/examples/55a-update-settings-deepgram-flux-stt.py b/examples/update-settings/stt/deepgram-flux.py similarity index 100% rename from examples/55a-update-settings-deepgram-flux-stt.py rename to examples/update-settings/stt/deepgram-flux.py diff --git a/examples/55a-update-settings-deepgram-sagemaker-stt.py b/examples/update-settings/stt/deepgram-sagemaker.py similarity index 100% rename from examples/55a-update-settings-deepgram-sagemaker-stt.py rename to examples/update-settings/stt/deepgram-sagemaker.py diff --git a/examples/55a-update-settings-deepgram-stt.py b/examples/update-settings/stt/deepgram.py similarity index 100% rename from examples/55a-update-settings-deepgram-stt.py rename to examples/update-settings/stt/deepgram.py diff --git a/examples/55f-update-settings-elevenlabs-realtime-stt.py b/examples/update-settings/stt/elevenlabs-realtime.py similarity index 100% rename from examples/55f-update-settings-elevenlabs-realtime-stt.py rename to examples/update-settings/stt/elevenlabs-realtime.py diff --git a/examples/55g-update-settings-elevenlabs-stt.py b/examples/update-settings/stt/elevenlabs.py similarity index 100% rename from examples/55g-update-settings-elevenlabs-stt.py rename to examples/update-settings/stt/elevenlabs.py diff --git a/examples/55zq-update-settings-fal-stt.py b/examples/update-settings/stt/fal.py similarity index 100% rename from examples/55zq-update-settings-fal-stt.py rename to examples/update-settings/stt/fal.py diff --git a/examples/55e-update-settings-gladia-stt.py b/examples/update-settings/stt/gladia.py similarity index 100% rename from examples/55e-update-settings-gladia-stt.py rename to examples/update-settings/stt/gladia.py diff --git a/examples/55c-update-settings-google-stt.py b/examples/update-settings/stt/google.py similarity index 100% rename from examples/55c-update-settings-google-stt.py rename to examples/update-settings/stt/google.py diff --git a/examples/55zr-update-settings-gradium-stt.py b/examples/update-settings/stt/gradium.py similarity index 100% rename from examples/55zr-update-settings-gradium-stt.py rename to examples/update-settings/stt/gradium.py diff --git a/examples/55zzn-update-settings-groq-stt.py b/examples/update-settings/stt/groq.py similarity index 100% rename from examples/55zzn-update-settings-groq-stt.py rename to examples/update-settings/stt/groq.py diff --git a/examples/55zt-update-settings-nvidia-segmented-stt.py b/examples/update-settings/stt/nvidia-segmented.py similarity index 100% rename from examples/55zt-update-settings-nvidia-segmented-stt.py rename to examples/update-settings/stt/nvidia-segmented.py diff --git a/examples/55zt-update-settings-nvidia-stt.py b/examples/update-settings/stt/nvidia.py similarity index 100% rename from examples/55zt-update-settings-nvidia-stt.py rename to examples/update-settings/stt/nvidia.py diff --git a/examples/55zu-update-settings-openai-realtime-stt.py b/examples/update-settings/stt/openai-realtime.py similarity index 100% rename from examples/55zu-update-settings-openai-realtime-stt.py rename to examples/update-settings/stt/openai-realtime.py diff --git a/examples/55j-update-settings-sarvam-stt.py b/examples/update-settings/stt/sarvam.py similarity index 100% rename from examples/55j-update-settings-sarvam-stt.py rename to examples/update-settings/stt/sarvam.py diff --git a/examples/55k-update-settings-soniox-stt.py b/examples/update-settings/stt/soniox.py similarity index 100% rename from examples/55k-update-settings-soniox-stt.py rename to examples/update-settings/stt/soniox.py diff --git a/examples/55h-update-settings-speechmatics-stt.py b/examples/update-settings/stt/speechmatics.py similarity index 100% rename from examples/55h-update-settings-speechmatics-stt.py rename to examples/update-settings/stt/speechmatics.py diff --git a/examples/55i-update-settings-whisper-api-stt.py b/examples/update-settings/stt/whisper-api.py similarity index 100% rename from examples/55i-update-settings-whisper-api-stt.py rename to examples/update-settings/stt/whisper-api.py diff --git a/examples/55zs-update-settings-whisper-mlx-stt.py b/examples/update-settings/stt/whisper-mlx.py similarity index 100% rename from examples/55zs-update-settings-whisper-mlx-stt.py rename to examples/update-settings/stt/whisper-mlx.py diff --git a/examples/55zs-update-settings-whisper-stt.py b/examples/update-settings/stt/whisper.py similarity index 100% rename from examples/55zs-update-settings-whisper-stt.py rename to examples/update-settings/stt/whisper.py diff --git a/examples/55zv-update-settings-asyncai-http-tts.py b/examples/update-settings/tts/asyncai-http.py similarity index 100% rename from examples/55zv-update-settings-asyncai-http-tts.py rename to examples/update-settings/tts/asyncai-http.py diff --git a/examples/55zv-update-settings-asyncai-tts.py b/examples/update-settings/tts/asyncai.py similarity index 100% rename from examples/55zv-update-settings-asyncai-tts.py rename to examples/update-settings/tts/asyncai.py diff --git a/examples/55zd-update-settings-aws-polly-tts.py b/examples/update-settings/tts/aws-polly.py similarity index 100% rename from examples/55zd-update-settings-aws-polly-tts.py rename to examples/update-settings/tts/aws-polly.py diff --git a/examples/55r-update-settings-azure-http-tts.py b/examples/update-settings/tts/azure-http.py similarity index 100% rename from examples/55r-update-settings-azure-http-tts.py rename to examples/update-settings/tts/azure-http.py diff --git a/examples/55r-update-settings-azure-tts.py b/examples/update-settings/tts/azure.py similarity index 100% rename from examples/55r-update-settings-azure-tts.py rename to examples/update-settings/tts/azure.py diff --git a/examples/55zf-update-settings-camb-tts.py b/examples/update-settings/tts/camb.py similarity index 100% rename from examples/55zf-update-settings-camb-tts.py rename to examples/update-settings/tts/camb.py diff --git a/examples/55n-update-settings-cartesia-http-tts.py b/examples/update-settings/tts/cartesia-http.py similarity index 100% rename from examples/55n-update-settings-cartesia-http-tts.py rename to examples/update-settings/tts/cartesia-http.py diff --git a/examples/55n-update-settings-cartesia-tts.py b/examples/update-settings/tts/cartesia.py similarity index 100% rename from examples/55n-update-settings-cartesia-tts.py rename to examples/update-settings/tts/cartesia.py diff --git a/examples/55q-update-settings-deepgram-http-tts.py b/examples/update-settings/tts/deepgram-http.py similarity index 100% rename from examples/55q-update-settings-deepgram-http-tts.py rename to examples/update-settings/tts/deepgram-http.py diff --git a/examples/55q-update-settings-deepgram-sagemaker-tts.py b/examples/update-settings/tts/deepgram-sagemaker.py similarity index 100% rename from examples/55q-update-settings-deepgram-sagemaker-tts.py rename to examples/update-settings/tts/deepgram-sagemaker.py diff --git a/examples/55q-update-settings-deepgram-tts.py b/examples/update-settings/tts/deepgram.py similarity index 100% rename from examples/55q-update-settings-deepgram-tts.py rename to examples/update-settings/tts/deepgram.py diff --git a/examples/55o-update-settings-elevenlabs-http-tts.py b/examples/update-settings/tts/elevenlabs-http.py similarity index 100% rename from examples/55o-update-settings-elevenlabs-http-tts.py rename to examples/update-settings/tts/elevenlabs-http.py diff --git a/examples/55o-update-settings-elevenlabs-tts.py b/examples/update-settings/tts/elevenlabs.py similarity index 100% rename from examples/55o-update-settings-elevenlabs-tts.py rename to examples/update-settings/tts/elevenlabs.py diff --git a/examples/55w-update-settings-fish-tts.py b/examples/update-settings/tts/fish.py similarity index 100% rename from examples/55w-update-settings-fish-tts.py rename to examples/update-settings/tts/fish.py diff --git a/examples/55zc-update-settings-gemini-tts.py b/examples/update-settings/tts/gemini.py similarity index 100% rename from examples/55zc-update-settings-gemini-tts.py rename to examples/update-settings/tts/gemini.py diff --git a/examples/55s-update-settings-google-http-tts.py b/examples/update-settings/tts/google-http.py similarity index 100% rename from examples/55s-update-settings-google-http-tts.py rename to examples/update-settings/tts/google-http.py diff --git a/examples/55s-update-settings-google-stream-tts.py b/examples/update-settings/tts/google-stream.py similarity index 100% rename from examples/55s-update-settings-google-stream-tts.py rename to examples/update-settings/tts/google-stream.py diff --git a/examples/55zw-update-settings-gradium-tts.py b/examples/update-settings/tts/gradium.py similarity index 100% rename from examples/55zw-update-settings-gradium-tts.py rename to examples/update-settings/tts/gradium.py diff --git a/examples/55y-update-settings-groq-tts.py b/examples/update-settings/tts/groq.py similarity index 100% rename from examples/55y-update-settings-groq-tts.py rename to examples/update-settings/tts/groq.py diff --git a/examples/55z-update-settings-hume-tts.py b/examples/update-settings/tts/hume.py similarity index 100% rename from examples/55z-update-settings-hume-tts.py rename to examples/update-settings/tts/hume.py diff --git a/examples/55zb-update-settings-inworld-http-tts.py b/examples/update-settings/tts/inworld-http.py similarity index 100% rename from examples/55zb-update-settings-inworld-http-tts.py rename to examples/update-settings/tts/inworld-http.py diff --git a/examples/55zb-update-settings-inworld-tts.py b/examples/update-settings/tts/inworld.py similarity index 100% rename from examples/55zb-update-settings-inworld-tts.py rename to examples/update-settings/tts/inworld.py diff --git a/examples/55zg-update-settings-kokoro-tts.py b/examples/update-settings/tts/kokoro.py similarity index 100% rename from examples/55zg-update-settings-kokoro-tts.py rename to examples/update-settings/tts/kokoro.py diff --git a/examples/55v-update-settings-lmnt-tts.py b/examples/update-settings/tts/lmnt.py similarity index 100% rename from examples/55v-update-settings-lmnt-tts.py rename to examples/update-settings/tts/lmnt.py diff --git a/examples/55x-update-settings-minimax-tts.py b/examples/update-settings/tts/minimax.py similarity index 100% rename from examples/55x-update-settings-minimax-tts.py rename to examples/update-settings/tts/minimax.py diff --git a/examples/55za-update-settings-neuphonic-http-tts.py b/examples/update-settings/tts/neuphonic-http.py similarity index 100% rename from examples/55za-update-settings-neuphonic-http-tts.py rename to examples/update-settings/tts/neuphonic-http.py diff --git a/examples/55za-update-settings-neuphonic-tts.py b/examples/update-settings/tts/neuphonic.py similarity index 100% rename from examples/55za-update-settings-neuphonic-tts.py rename to examples/update-settings/tts/neuphonic.py diff --git a/examples/55zzl-update-settings-nvidia-tts.py b/examples/update-settings/tts/nvidia.py similarity index 100% rename from examples/55zzl-update-settings-nvidia-tts.py rename to examples/update-settings/tts/nvidia.py diff --git a/examples/55p-update-settings-openai-tts.py b/examples/update-settings/tts/openai.py similarity index 100% rename from examples/55p-update-settings-openai-tts.py rename to examples/update-settings/tts/openai.py diff --git a/examples/55t-update-settings-piper-http-tts.py b/examples/update-settings/tts/piper-http.py similarity index 100% rename from examples/55t-update-settings-piper-http-tts.py rename to examples/update-settings/tts/piper-http.py diff --git a/examples/55t-update-settings-piper-tts.py b/examples/update-settings/tts/piper.py similarity index 100% rename from examples/55t-update-settings-piper-tts.py rename to examples/update-settings/tts/piper.py diff --git a/examples/55zh-update-settings-resembleai-tts.py b/examples/update-settings/tts/resembleai.py similarity index 100% rename from examples/55zh-update-settings-resembleai-tts.py rename to examples/update-settings/tts/resembleai.py diff --git a/examples/55u-update-settings-rime-http-tts.py b/examples/update-settings/tts/rime-http.py similarity index 100% rename from examples/55u-update-settings-rime-http-tts.py rename to examples/update-settings/tts/rime-http.py diff --git a/examples/55u-update-settings-rime-tts.py b/examples/update-settings/tts/rime.py similarity index 100% rename from examples/55u-update-settings-rime-tts.py rename to examples/update-settings/tts/rime.py diff --git a/examples/55ze-update-settings-sarvam-http-tts.py b/examples/update-settings/tts/sarvam-http.py similarity index 100% rename from examples/55ze-update-settings-sarvam-http-tts.py rename to examples/update-settings/tts/sarvam-http.py diff --git a/examples/55ze-update-settings-sarvam-tts.py b/examples/update-settings/tts/sarvam.py similarity index 100% rename from examples/55ze-update-settings-sarvam-tts.py rename to examples/update-settings/tts/sarvam.py diff --git a/examples/55zzm-update-settings-speechmatics-tts.py b/examples/update-settings/tts/speechmatics.py similarity index 100% rename from examples/55zzm-update-settings-speechmatics-tts.py rename to examples/update-settings/tts/speechmatics.py diff --git a/examples/55zzp-update-settings-xtts-tts.py b/examples/update-settings/tts/xtts.py similarity index 100% rename from examples/55zzp-update-settings-xtts-tts.py rename to examples/update-settings/tts/xtts.py diff --git a/examples/43-heygen-transport.py b/examples/video-avatar/heygen-transport.py similarity index 100% rename from examples/43-heygen-transport.py rename to examples/video-avatar/heygen-transport.py diff --git a/examples/43a-heygen-video-service.py b/examples/video-avatar/heygen-video-service.py similarity index 100% rename from examples/43a-heygen-video-service.py rename to examples/video-avatar/heygen-video-service.py diff --git a/examples/56-lemonslice-transport.py b/examples/video-avatar/lemonslice-transport.py similarity index 100% rename from examples/56-lemonslice-transport.py rename to examples/video-avatar/lemonslice-transport.py diff --git a/examples/27-simli-layer.py b/examples/video-avatar/simli-layer.py similarity index 100% rename from examples/27-simli-layer.py rename to examples/video-avatar/simli-layer.py diff --git a/examples/21-tavus-transport.py b/examples/video-avatar/tavus-transport.py similarity index 100% rename from examples/21-tavus-transport.py rename to examples/video-avatar/tavus-transport.py diff --git a/examples/21a-tavus-video-service.py b/examples/video-avatar/tavus-video-service.py similarity index 100% rename from examples/21a-tavus-video-service.py rename to examples/video-avatar/tavus-video-service.py diff --git a/examples/57-custom-video-track.py b/examples/video-processing/custom-video-track.py similarity index 100% rename from examples/57-custom-video-track.py rename to examples/video-processing/custom-video-track.py diff --git a/examples/18-gstreamer-filesrc.py b/examples/video-processing/gstreamer-filesrc.py similarity index 100% rename from examples/18-gstreamer-filesrc.py rename to examples/video-processing/gstreamer-filesrc.py diff --git a/examples/18a-gstreamer-videotestsrc.py b/examples/video-processing/gstreamer-videotestsrc.py similarity index 100% rename from examples/18a-gstreamer-videotestsrc.py rename to examples/video-processing/gstreamer-videotestsrc.py diff --git a/examples/09a-local-mirror.py b/examples/video-processing/local-mirror.py similarity index 100% rename from examples/09a-local-mirror.py rename to examples/video-processing/local-mirror.py diff --git a/examples/09-mirror.py b/examples/video-processing/mirror.py similarity index 100% rename from examples/09-mirror.py rename to examples/video-processing/mirror.py diff --git a/examples/46-video-processing.py b/examples/video-processing/video-processing.py similarity index 100% rename from examples/46-video-processing.py rename to examples/video-processing/video-processing.py diff --git a/examples/12a-describe-image-anthropic.py b/examples/vision/anthropic.py similarity index 100% rename from examples/12a-describe-image-anthropic.py rename to examples/vision/anthropic.py diff --git a/examples/12b-describe-image-aws.py b/examples/vision/aws.py similarity index 100% rename from examples/12b-describe-image-aws.py rename to examples/vision/aws.py diff --git a/examples/12c-describe-image-gemini-flash.py b/examples/vision/gemini-flash.py similarity index 100% rename from examples/12c-describe-image-gemini-flash.py rename to examples/vision/gemini-flash.py diff --git a/examples/12d-describe-image-moondream.py b/examples/vision/moondream.py similarity index 100% rename from examples/12d-describe-image-moondream.py rename to examples/vision/moondream.py diff --git a/examples/12-describe-image-openai-responses-http.py b/examples/vision/openai-responses-http.py similarity index 100% rename from examples/12-describe-image-openai-responses-http.py rename to examples/vision/openai-responses-http.py diff --git a/examples/12-describe-image-openai-responses.py b/examples/vision/openai-responses.py similarity index 100% rename from examples/12-describe-image-openai-responses.py rename to examples/vision/openai-responses.py diff --git a/examples/12-describe-image-openai.py b/examples/vision/openai.py similarity index 100% rename from examples/12-describe-image-openai.py rename to examples/vision/openai.py diff --git a/scripts/evals/run-release-evals.py b/scripts/evals/run-release-evals.py index 92e872ac2..3c540ff87 100644 --- a/scripts/evals/run-release-evals.py +++ b/scripts/evals/run-release-evals.py @@ -96,214 +96,175 @@ EVAL_COMPLETE_TURN = EvalConfig( ) -TESTS_07 = [ - # 07 series - ("07-interruptible.py", EVAL_SIMPLE_MATH), - ("07-interruptible-cartesia-http.py", EVAL_SIMPLE_MATH), - ("07a-interruptible-speechmatics.py", EVAL_SIMPLE_MATH), - ("07a-interruptible-speechmatics-vad.py", EVAL_SIMPLE_MATH), - ("07b-interruptible-langchain.py", EVAL_SIMPLE_MATH), - ("07c-interruptible-deepgram.py", EVAL_SIMPLE_MATH), - ("07c-interruptible-deepgram-flux.py", EVAL_SIMPLE_MATH), - ("07c-interruptible-deepgram-http.py", EVAL_SIMPLE_MATH), - ("07d-interruptible-elevenlabs.py", EVAL_SIMPLE_MATH), - ("07d-interruptible-elevenlabs-http.py", EVAL_SIMPLE_MATH), - ("07e-interruptible-xai.py", EVAL_SIMPLE_MATH), - ("07f-interruptible-azure.py", EVAL_SIMPLE_MATH), - ("07f-interruptible-azure-http.py", EVAL_SIMPLE_MATH), - ("07g-interruptible-openai.py", EVAL_SIMPLE_MATH), - ("07g-interruptible-openai-http.py", EVAL_SIMPLE_MATH), - ("07j-interruptible-gladia.py", EVAL_SIMPLE_MATH), - ("07j-interruptible-gladia-vad.py", EVAL_SIMPLE_MATH), - ("07k-interruptible-lmnt.py", EVAL_SIMPLE_MATH), - ("07l-interruptible-groq.py", EVAL_SIMPLE_MATH), - ("07m-interruptible-aws.py", EVAL_SIMPLE_MATH), - ("07m-interruptible-aws-strands.py", EVAL_WEATHER), - ("07n-interruptible-gemini.py", EVAL_SIMPLE_MATH), - ("07n-interruptible-google.py", EVAL_SIMPLE_MATH), - ("07n-interruptible-google-http.py", EVAL_SIMPLE_MATH), - ("07o-interruptible-assemblyai.py", EVAL_SIMPLE_MATH), - ("07p-interruptible-krisp-viva.py", EVAL_SIMPLE_MATH), - ("07q-interruptible-rime.py", EVAL_SIMPLE_MATH), - ("07q-interruptible-rime-http.py", EVAL_SIMPLE_MATH), - ("07r-interruptible-nvidia.py", EVAL_SIMPLE_MATH), - ("07s-interruptible-google-audio-in.py", EVAL_SIMPLE_MATH), - ("07t-interruptible-fish.py", EVAL_SIMPLE_MATH), - ("07v-interruptible-neuphonic.py", EVAL_SIMPLE_MATH), - ("07v-interruptible-neuphonic-http.py", EVAL_SIMPLE_MATH), - ("07w-interruptible-fal.py", EVAL_SIMPLE_MATH), - ("07y-interruptible-minimax.py", EVAL_SIMPLE_MATH), - ("07z-interruptible-sarvam.py", EVAL_SIMPLE_MATH), - ("07z-interruptible-sarvam-http.py", EVAL_SIMPLE_MATH), - ("07za-interruptible-soniox.py", EVAL_SIMPLE_MATH), - ("07zb-interruptible-inworld.py", EVAL_SIMPLE_MATH), - ("07zb-interruptible-inworld-http.py", EVAL_SIMPLE_MATH), - ("07zc-interruptible-asyncai.py", EVAL_SIMPLE_MATH), - ("07zc-interruptible-asyncai-http.py", EVAL_SIMPLE_MATH), - ("07zd-interruptible-aicoustics.py", EVAL_SIMPLE_MATH), - ("07ze-interruptible-hume.py", EVAL_SIMPLE_MATH), - ("07zf-interruptible-gradium.py", EVAL_SIMPLE_MATH), - ("07zg-interruptible-camb.py", EVAL_SIMPLE_MATH), - ("07zi-interruptible-piper.py", EVAL_SIMPLE_MATH), - ("07zj-interruptible-kokoro.py", EVAL_SIMPLE_MATH), - ("07zk-interruptible-resembleai.py", EVAL_SIMPLE_MATH), - ("07zl-interruptible-smallest.py", EVAL_SIMPLE_MATH), - ("07-interruptible-openai-responses.py", EVAL_SIMPLE_MATH), - ("07-interruptible-openai-responses-http.py", EVAL_SIMPLE_MATH), +TESTS_SPEECH = [ + ("services/speech/cartesia.py", EVAL_SIMPLE_MATH), + ("services/speech/cartesia-http.py", EVAL_SIMPLE_MATH), + ("services/speech/speechmatics.py", EVAL_SIMPLE_MATH), + ("services/speech/speechmatics-vad.py", EVAL_SIMPLE_MATH), + ("services/speech/langchain.py", EVAL_SIMPLE_MATH), + ("services/speech/deepgram.py", EVAL_SIMPLE_MATH), + ("services/speech/deepgram-flux.py", EVAL_SIMPLE_MATH), + ("services/speech/deepgram-http.py", EVAL_SIMPLE_MATH), + ("services/speech/elevenlabs.py", EVAL_SIMPLE_MATH), + ("services/speech/elevenlabs-http.py", EVAL_SIMPLE_MATH), + ("services/speech/xai.py", EVAL_SIMPLE_MATH), + ("services/speech/azure.py", EVAL_SIMPLE_MATH), + ("services/speech/azure-http.py", EVAL_SIMPLE_MATH), + ("services/speech/openai.py", EVAL_SIMPLE_MATH), + ("services/speech/openai-http.py", EVAL_SIMPLE_MATH), + ("services/speech/gladia.py", EVAL_SIMPLE_MATH), + ("services/speech/gladia-vad.py", EVAL_SIMPLE_MATH), + ("services/speech/lmnt.py", EVAL_SIMPLE_MATH), + ("services/speech/groq.py", EVAL_SIMPLE_MATH), + ("services/speech/aws.py", EVAL_SIMPLE_MATH), + ("services/speech/aws-strands.py", EVAL_WEATHER), + ("services/speech/google-gemini-tts.py", EVAL_SIMPLE_MATH), + ("services/speech/google.py", EVAL_SIMPLE_MATH), + ("services/speech/google-http.py", EVAL_SIMPLE_MATH), + ("services/speech/assemblyai.py", EVAL_SIMPLE_MATH), + ("services/speech/krisp-viva.py", EVAL_SIMPLE_MATH), + ("services/speech/rime.py", EVAL_SIMPLE_MATH), + ("services/speech/rime-http.py", EVAL_SIMPLE_MATH), + ("services/speech/nvidia.py", EVAL_SIMPLE_MATH), + ("services/speech/google-audio-in.py", EVAL_SIMPLE_MATH), + ("services/speech/fish.py", EVAL_SIMPLE_MATH), + ("services/speech/neuphonic.py", EVAL_SIMPLE_MATH), + ("services/speech/neuphonic-http.py", EVAL_SIMPLE_MATH), + ("services/speech/fal.py", EVAL_SIMPLE_MATH), + ("services/speech/minimax.py", EVAL_SIMPLE_MATH), + ("services/speech/sarvam.py", EVAL_SIMPLE_MATH), + ("services/speech/sarvam-http.py", EVAL_SIMPLE_MATH), + ("services/speech/soniox.py", EVAL_SIMPLE_MATH), + ("services/speech/inworld.py", EVAL_SIMPLE_MATH), + ("services/speech/inworld-http.py", EVAL_SIMPLE_MATH), + ("services/speech/asyncai.py", EVAL_SIMPLE_MATH), + ("services/speech/asyncai-http.py", EVAL_SIMPLE_MATH), + ("services/speech/aicoustics.py", EVAL_SIMPLE_MATH), + ("services/speech/hume.py", EVAL_SIMPLE_MATH), + ("services/speech/gradium.py", EVAL_SIMPLE_MATH), + ("services/speech/camb.py", EVAL_SIMPLE_MATH), + ("services/speech/piper.py", EVAL_SIMPLE_MATH), + ("services/speech/kokoro.py", EVAL_SIMPLE_MATH), + ("services/speech/resemble.py", EVAL_SIMPLE_MATH), + ("services/speech/smallest.py", EVAL_SIMPLE_MATH), + ("services/speech/openai-responses.py", EVAL_SIMPLE_MATH), + ("services/speech/openai-responses-http.py", EVAL_SIMPLE_MATH), # Needs a local XTTS docker instance running. - # ("07i-interruptible-xtts.py", EVAL_SIMPLE_MATH), + # ("services/speech/xtts.py", EVAL_SIMPLE_MATH), ] -TESTS_12 = [ - ("12-describe-image-openai.py", EVAL_VISION_IMAGE(eval_speaks_first=True)), - ("12-describe-image-openai-responses.py", EVAL_VISION_IMAGE(eval_speaks_first=True)), - ("12-describe-image-openai-responses-http.py", EVAL_VISION_IMAGE(eval_speaks_first=True)), - ("12a-describe-image-anthropic.py", EVAL_VISION_IMAGE(eval_speaks_first=True)), - ("12b-describe-image-aws.py", EVAL_VISION_IMAGE(eval_speaks_first=True)), - ("12c-describe-image-gemini-flash.py", EVAL_VISION_IMAGE(eval_speaks_first=True)), - ("12d-describe-image-moondream.py", EVAL_VISION_IMAGE()), +TESTS_VISION = [ + ("vision/openai.py", EVAL_VISION_IMAGE(eval_speaks_first=True)), + ("vision/openai-responses.py", EVAL_VISION_IMAGE(eval_speaks_first=True)), + ("vision/openai-responses-http.py", EVAL_VISION_IMAGE(eval_speaks_first=True)), + ("vision/anthropic.py", EVAL_VISION_IMAGE(eval_speaks_first=True)), + ("vision/aws.py", EVAL_VISION_IMAGE(eval_speaks_first=True)), + ("vision/gemini-flash.py", EVAL_VISION_IMAGE(eval_speaks_first=True)), + ("vision/moondream.py", EVAL_VISION_IMAGE()), ] # For a few major services, we also test parallel function calling. # (We don't bother doing this with every single service, as it's expensive and # most rely on the same OpenAI-compatible implementation.) -TESTS_14 = [ - ("14-function-calling.py", EVAL_WEATHER), - ("14-function-calling.py", EVAL_WEATHER_AND_RESTAURANT), - ("14-function-calling-openai-responses.py", EVAL_WEATHER), - ("14-function-calling-openai-responses.py", EVAL_WEATHER_AND_RESTAURANT), - ("14-function-calling-openai-responses-http.py", EVAL_WEATHER), - ("14-function-calling-openai-responses-http.py", EVAL_WEATHER_AND_RESTAURANT), - ("14a-function-calling-anthropic.py", EVAL_WEATHER), - ("14a-function-calling-anthropic.py", EVAL_WEATHER_AND_RESTAURANT), - ("14b-function-calling-openai.py", EVAL_WEATHER), - ("14e-function-calling-google.py", EVAL_WEATHER), - ("14e-function-calling-google.py", EVAL_WEATHER_AND_RESTAURANT), - ("14f-function-calling-groq.py", EVAL_WEATHER), - ("14g-function-calling-grok.py", EVAL_WEATHER), - ("14h-function-calling-azure.py", EVAL_WEATHER), - ("14i-function-calling-fireworks.py", EVAL_WEATHER), - ("14j-function-calling-nvidia.py", EVAL_WEATHER), - ("14k-function-calling-cerebras.py", EVAL_WEATHER), - ("14m-function-calling-openrouter.py", EVAL_WEATHER), - ("14n-function-calling-perplexity.py", EVAL_WEATHER), - ("14p-function-calling-gemini-vertex-ai.py", EVAL_WEATHER), - ("14q-function-calling-qwen.py", EVAL_WEATHER), - ("14r-function-calling-aws.py", EVAL_WEATHER), - ("14s-function-calling-sambanova.py", EVAL_WEATHER), - ("14r-function-calling-aws.py", EVAL_WEATHER_AND_RESTAURANT), - ("14v-function-calling-nebius.py", EVAL_WEATHER), - ("14w-function-calling-mistral.py", EVAL_WEATHER), - ("14y-function-calling-sarvam.py", EVAL_WEATHER), - ("14z-function-calling-novita.py", EVAL_WEATHER), +TESTS_FUNCTION_CALLING = [ + ("getting-started/07-function-calling.py", EVAL_WEATHER), + ("getting-started/07-function-calling.py", EVAL_WEATHER_AND_RESTAURANT), + ("services/function-calling/openai-responses.py", EVAL_WEATHER), + ("services/function-calling/openai-responses.py", EVAL_WEATHER_AND_RESTAURANT), + ("services/function-calling/openai-responses-http.py", EVAL_WEATHER), + ("services/function-calling/openai-responses-http.py", EVAL_WEATHER_AND_RESTAURANT), + ("services/function-calling/anthropic.py", EVAL_WEATHER), + ("services/function-calling/anthropic.py", EVAL_WEATHER_AND_RESTAURANT), + ("services/function-calling/openai.py", EVAL_WEATHER), + ("services/function-calling/google.py", EVAL_WEATHER), + ("services/function-calling/google.py", EVAL_WEATHER_AND_RESTAURANT), + ("services/function-calling/groq.py", EVAL_WEATHER), + ("services/function-calling/grok.py", EVAL_WEATHER), + ("services/function-calling/azure.py", EVAL_WEATHER), + ("services/function-calling/fireworks.py", EVAL_WEATHER), + ("services/function-calling/nvidia.py", EVAL_WEATHER), + ("services/function-calling/cerebras.py", EVAL_WEATHER), + ("services/function-calling/openrouter.py", EVAL_WEATHER), + ("services/function-calling/perplexity.py", EVAL_WEATHER), + ("services/function-calling/google-vertex.py", EVAL_WEATHER), + ("services/function-calling/qwen.py", EVAL_WEATHER), + ("services/function-calling/aws.py", EVAL_WEATHER), + ("services/function-calling/sambanova.py", EVAL_WEATHER), + ("services/function-calling/aws.py", EVAL_WEATHER_AND_RESTAURANT), + ("services/function-calling/nebius.py", EVAL_WEATHER), + ("services/function-calling/mistral.py", EVAL_WEATHER), + ("services/function-calling/sarvam.py", EVAL_WEATHER), + ("services/function-calling/novita.py", EVAL_WEATHER), # Video - ("14d-function-calling-anthropic-video.py", EVAL_VISION_CAMERA), - ("14d-function-calling-aws-video.py", EVAL_VISION_CAMERA), - ("14d-function-calling-gemini-flash-video.py", EVAL_VISION_CAMERA), - ("14d-function-calling-moondream-video.py", EVAL_VISION_CAMERA), - ("14d-function-calling-openai-video.py", EVAL_VISION_CAMERA), - ("14d-function-calling-openai-responses-video.py", EVAL_VISION_CAMERA), - ("14d-function-calling-openai-responses-video-http.py", EVAL_VISION_CAMERA), + ("services/function-calling/anthropic-video.py", EVAL_VISION_CAMERA), + ("services/function-calling/aws-video.py", EVAL_VISION_CAMERA), + ("services/function-calling/google-video.py", EVAL_VISION_CAMERA), + ("services/function-calling/moondream-video.py", EVAL_VISION_CAMERA), + ("services/function-calling/openai-video.py", EVAL_VISION_CAMERA), + ("services/function-calling/openai-responses-video.py", EVAL_VISION_CAMERA), + ("services/function-calling/openai-responses-video-http.py", EVAL_VISION_CAMERA), # Currently not working. - # ("14c-function-calling-together.py", EVAL_WEATHER), - # ("14l-function-calling-deepseek.py", EVAL_WEATHER), - # ("14o-function-calling-gemini-openai-format.py", EVAL_WEATHER), + # ("services/function-calling/together.py", EVAL_WEATHER), + # ("services/function-calling/deepseek.py", EVAL_WEATHER), + # ("services/function-calling/gemini-openai-format.py", EVAL_WEATHER), ] -TESTS_15 = [ - ("15a-switch-languages.py", EVAL_SWITCH_LANGUAGE), +TESTS_FEATURES = [ + ("features/switch-languages.py", EVAL_SWITCH_LANGUAGE), + ("features/voicemail-detection.py", EVAL_VOICEMAIL), + ("features/voicemail-detection.py", EVAL_CONVERSATION), + ("features/concurrent-llm-evaluation.py", EVAL_SIMPLE_MATH), ] -TESTS_19 = [ - ("19-openai-realtime.py", EVAL_WEATHER), - ("19-openai-realtime-beta.py", EVAL_WEATHER), +TESTS_REALTIME = [ + ("realtime/openai.py", EVAL_WEATHER), + ("realtime/openai-beta.py", EVAL_WEATHER), # OpenAI Realtime not released on Azure yet - # ("19a-azure-realtime.py", EVAL_WEATHER), - ("19a-azure-realtime-beta.py", EVAL_WEATHER), - ("19b-openai-realtime-text.py", EVAL_WEATHER), - ("19b-openai-realtime-beta-text.py", EVAL_WEATHER), - ("19c-openai-realtime-live-video.py", EVAL_VISION_CAMERA), -] - -TESTS_21 = [ - ("21a-tavus-video-service.py", EVAL_SIMPLE_MATH), -] - -TESTS_22 = [ - ("22-filter-incomplete-turns.py", EVAL_COMPLETE_TURN), -] - -TESTS_26 = [ - ("26-gemini-live.py", EVAL_SIMPLE_MATH), - ("26a-gemini-live-local-vad.py", EVAL_SIMPLE_MATH), - ("26b-gemini-live-function-calling.py", EVAL_WEATHER), - ("26c-gemini-live-video.py", EVAL_VISION_CAMERA), - ("26e-gemini-live-google-search.py", EVAL_ONLINE_SEARCH), - ("26h-gemini-live-vertex-function-calling.py", EVAL_WEATHER), + # ("realtime/azure.py", EVAL_WEATHER), + ("realtime/azure-beta.py", EVAL_WEATHER), + ("realtime/openai-text.py", EVAL_WEATHER), + ("realtime/openai-beta-text.py", EVAL_WEATHER), + ("realtime/openai-live-video.py", EVAL_VISION_CAMERA), + ("realtime/gemini-live.py", EVAL_SIMPLE_MATH), + ("realtime/gemini-live-local-vad.py", EVAL_SIMPLE_MATH), + ("realtime/gemini-live-function-calling.py", EVAL_WEATHER), + ("realtime/gemini-live-video.py", EVAL_VISION_CAMERA), + ("realtime/gemini-live-google-search.py", EVAL_ONLINE_SEARCH), + ("realtime/gemini-live-vertex-function-calling.py", EVAL_WEATHER), # Currently not working. - # ("26d-gemini-live-text.py", EVAL_SIMPLE_MATH), + # ("realtime/gemini-live-text.py", EVAL_SIMPLE_MATH), + ("realtime/aws-nova-sonic.py", EVAL_SIMPLE_MATH), + ("realtime/ultravox.py", EVAL_ORDER), + ("realtime/grok.py", EVAL_WEATHER), ] -TESTS_27 = [ - ("27-simli-layer.py", EVAL_SIMPLE_MATH), +TESTS_VIDEO_AVATAR = [ + ("video-avatar/tavus-video-service.py", EVAL_SIMPLE_MATH), + ("video-avatar/heygen-video-service.py", EVAL_SIMPLE_MATH), + ("video-avatar/simli-layer.py", EVAL_SIMPLE_MATH), + ("video-avatar/lemonslice-transport.py", EVAL_SIMPLE_MATH), ] -TESTS_40 = [ - ("40-aws-nova-sonic.py", EVAL_SIMPLE_MATH), +TESTS_TURN_MANAGEMENT = [ + ("turn-management/filter-incomplete-turns.py", EVAL_COMPLETE_TURN), ] -TESTS_43 = [ - ("43a-heygen-video-service.py", EVAL_SIMPLE_MATH), -] - -TESTS_44 = [ - ("44-voicemail-detection.py", EVAL_VOICEMAIL), - ("44-voicemail-detection.py", EVAL_CONVERSATION), -] - -TESTS_49 = [ - ("49a-thinking-anthropic.py", EVAL_SIMPLE_MATH), - ("49b-thinking-google.py", EVAL_SIMPLE_MATH), - ("49c-thinking-functions-anthropic.py", EVAL_FLIGHT_STATUS), - ("49d-thinking-functions-google.py", EVAL_FLIGHT_STATUS), -] - - -TESTS_50 = [ - ("50-ultravox-realtime.py", EVAL_ORDER), -] - - -TESTS_51 = [ - ("51-grok-realtime.py", EVAL_WEATHER), -] - -TESTS_53 = [ - ("53-concurrent-llm-evaluation.py", EVAL_SIMPLE_MATH), -] - -TESTS_56 = [ - ("56-lemonslice-transport.py", EVAL_SIMPLE_MATH), +TESTS_THINKING_AND_MCP = [ + ("thinking-and-mcp/thinking-anthropic.py", EVAL_SIMPLE_MATH), + ("thinking-and-mcp/thinking-google.py", EVAL_SIMPLE_MATH), + ("thinking-and-mcp/thinking-functions-anthropic.py", EVAL_FLIGHT_STATUS), + ("thinking-and-mcp/thinking-functions-google.py", EVAL_FLIGHT_STATUS), ] TESTS = [ - *TESTS_07, - *TESTS_12, - *TESTS_14, - *TESTS_15, - *TESTS_19, - *TESTS_21, - *TESTS_22, - *TESTS_26, - *TESTS_27, - *TESTS_40, - *TESTS_43, - *TESTS_44, - *TESTS_49, - *TESTS_50, - *TESTS_51, - *TESTS_53, - *TESTS_56, + *TESTS_SPEECH, + *TESTS_VISION, + *TESTS_FUNCTION_CALLING, + *TESTS_FEATURES, + *TESTS_REALTIME, + *TESTS_VIDEO_AVATAR, + *TESTS_TURN_MANAGEMENT, + *TESTS_THINKING_AND_MCP, ]