This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
import os | |
import sys | |
from dataclasses import dataclass | |
import aiohttp | |
from dotenv import load_dotenv | |
from loguru import logger | |
from pipecat.audio.vad.silero import SileroVADAnalyzer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
import os | |
import sys | |
from dataclasses import dataclass | |
import aiohttp | |
import google.ai.generativelanguage as glm | |
from dotenv import load_dotenv | |
from loguru import logger | |
from runner import configure |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Copyright (c) 2024–2025, Daily | |
# | |
# SPDX-License-Identifier: BSD 2-Clause License | |
# | |
import asyncio | |
import os | |
import sys | |
from datetime import datetime |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async def start_query_knowledge_base(function_name, llm, context): | |
"""Push a frame to the TTS service; this is handy when the LLM response might take a while.""" | |
await llm.push_frame(TTSSpeakFrame("Please hold on while I look that order up for you.")) | |
async def query_knowledge_base(function_name, tool_call_id, args, llm, context, result_callback): | |
query_result = knowledge_base.get(args["query"]) | |
await result_callback({ | |
"info": json.dumps({ | |
"lookup_success": True, | |
"order_status": query_result["order_status"], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# usage: gemini-lights-repro.py --initial-message "Make a pretty sequence with the lights. Turn them on and off a few times. Pick nice colors." | |
import argparse | |
import asyncio | |
import base64 | |
import json | |
import os | |
import pyaudio | |
import re | |
import shutil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# installation: | |
# | |
# python3.12 -m venv venv | |
# source venv/bin/activate | |
# | |
# pip install pyaudio websockets | |
# usage: | |
# | |
# export GEMINI_API_KEY=... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
import base64 | |
import json | |
import os | |
import pyaudio | |
import shutil | |
import websockets | |
class AudioStreamer: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Copyright (c) 2024, Daily | |
# | |
# SPDX-License-Identifier: BSD 2-Clause License | |
# | |
import aiohttp | |
import argparse | |
import os |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import aiohttp | |
import asyncio | |
import os | |
import sys | |
from pipecat.frames.frames import EndFrame | |
from pipecat.pipeline.pipeline import Pipeline | |
from pipecat.pipeline.task import PipelineParams, PipelineTask | |
from pipecat.pipeline.runner import PipelineRunner | |
from pipecat.processors.frameworks.rtvi import ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
import aiohttp | |
import os | |
import sys | |
from pipecat.frames.frames import LLMMessagesFrame | |
from pipecat.pipeline.pipeline import Pipeline | |
from pipecat.pipeline.runner import PipelineRunner | |
from pipecat.pipeline.task import PipelineParams, PipelineTask | |
from pipecat.processors.aggregators.llm_response import ( |
NewerOlder