Update examples

This commit is contained in:
Mark Backman
2026-03-04 22:55:51 -05:00
parent 197885773f
commit 039a8f6c7d
207 changed files with 1241 additions and 852 deletions

View File

@@ -24,10 +24,10 @@ from pipecat.processors.aggregators.llm_response_universal import (
)
from pipecat.runner.types import RunnerArguments
from pipecat.runner.utils import create_transport
from pipecat.services.azure.tts import AzureTTSService
from pipecat.services.azure.tts import AzureTTSService, AzureTTSSettings
from pipecat.services.deepgram.stt import DeepgramSTTService
from pipecat.services.llm_service import FunctionCallParams
from pipecat.services.openrouter.llm import OpenRouterLLMService
from pipecat.services.openrouter.llm import OpenRouterLLMService, OpenRouterLLMSettings
from pipecat.transports.base_transport import BaseTransport, TransportParams
from pipecat.transports.daily.transport import DailyParams
from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams
@@ -65,13 +65,19 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
tts = AzureTTSService(
api_key=os.getenv("AZURE_SPEECH_API_KEY"),
region=os.getenv("AZURE_SPEECH_REGION"),
voice="en-US-JennyNeural",
params=AzureTTSService.InputParams(language="en-US", rate="1.1", style="cheerful"),
settings=AzureTTSSettings(
voice="en-US-JennyNeural",
language="en-US",
rate="1.1",
style="cheerful",
),
)
llm = OpenRouterLLMService(
api_key=os.getenv("OPENROUTER_API_KEY"),
model="openai/gpt-4o-2024-11-20",
settings=OpenRouterLLMSettings(
model="openai/gpt-4o-2024-11-20",
),
system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.",
)
# You can also register a function_name of None to get all functions