This file contains hidden or 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
from google import genai | |
import os | |
client = genai.Client(api_key=os.getenv("GOOGLE_API_KEY")) | |
# filename_for_upload = "/Users/khkramer/Downloads/maven-lightning-trimmed.mp4" | |
# myfile = client.files.upload(file=filename_for_upload) | |
# | |
# print("My files:") |
This file contains hidden or 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
# double transcription events | |
# pip install 'pipecat-ai[daily,silero,openai,cartesia]'==0.0.59 dotenv | |
# | |
# transcription events as expected | |
# pip install 'pipecat-ai[daily,silero,openai,cartesia]'==0.0.58 dotenv | |
import asyncio | |
import sys | |
import os |
This file contains hidden or 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 argparse | |
import asyncio | |
import os |
This file contains hidden or 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 argparse | |
import asyncio | |
import os |
This file contains hidden or 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 | |
from openai import AsyncOpenAI | |
from openai.helpers import LocalAudioPlayer | |
import wave | |
import numpy as np | |
openai = AsyncOpenAI() |
This file contains hidden or 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
2025-04-22 12:27:57.538 | INFO | 07-interruptible:run_bot:28 - Starting bot | |
2025-04-22 12:27:57.538 | DEBUG | pipecat.audio.vad.silero:__init__:111 - Loading Silero VAD model... | |
2025-04-22 12:27:57.564 | DEBUG | pipecat.audio.vad.silero:__init__:133 - Loaded Silero VAD | |
2025-04-22 12:27:57.583 | DEBUG | pipecat.processors.frame_processor:link:177 - Linking PipelineSource#0 -> SmallWebRTCInputTransport#0 | |
2025-04-22 12:27:57.583 | DEBUG | pipecat.processors.frame_processor:link:177 - Linking SmallWebRTCInputTransport#0 -> DeepgramSTTService#0 | |
2025-04-22 12:27:57.583 | DEBUG | pipecat.processors.frame_processor:link:177 - Linking DeepgramSTTService#0 -> OpenAIUserContextAggregator#0 | |
2025-04-22 12:27:57.583 | DEBUG | pipecat.processors.frame_processor:link:177 - Linking OpenAIUserContextAggregator#0 -> OpenAILLMService#0 | |
2025-04-22 12:27:57.583 | DEBUG | pipecat.processors.frame_processor:link:177 - Linking OpenAILLMService#0 -> CartesiaTTSService#0 | |
2025-04-22 12:27:57.583 | DEBUG | pip |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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"], |
NewerOlder