fix formatting

This commit is contained in:
ivaaan
2025-11-17 14:00:03 +01:00
parent 71869a116d
commit 9156e21727
2 changed files with 4 additions and 11 deletions

View File

@@ -13,7 +13,7 @@ from pipecat.audio.turn.smart_turn.base_smart_turn import SmartTurnParams
from pipecat.audio.turn.smart_turn.local_smart_turn_v3 import LocalSmartTurnAnalyzerV3
from pipecat.audio.vad.silero import SileroVADAnalyzer
from pipecat.audio.vad.vad_analyzer import VADParams
from pipecat.frames.frames import Frame, LLMRunFrame, TTSTextFrame
from pipecat.frames.frames import Frame, LLMRunFrame, TTSTextFrame, format_pts
from pipecat.pipeline.pipeline import Pipeline
from pipecat.pipeline.runner import PipelineRunner
from pipecat.pipeline.task import PipelineParams, PipelineTask
@@ -32,7 +32,6 @@ from pipecat.services.openai.llm import OpenAILLMService
from pipecat.transports.base_transport import BaseTransport, TransportParams
from pipecat.transports.daily.transport import DailyParams
from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams
from pipecat.frames.frames import format_pts
load_dotenv(override=True)
@@ -156,9 +155,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
"💡 Word timestamps are enabled! Watch for '🎯 Word timestamp' logs showing each word with its PTS."
)
# Kick off the conversation.
messages.append(
{"role": "system", "content": "Please introduce yourself to the user."}
)
messages.append({"role": "system", "content": "Please introduce yourself to the user."})
await task.queue_frames([LLMRunFrame()])
@transport.event_handler("on_client_disconnected")

View File

@@ -86,9 +86,7 @@ class HumeTTSService(WordTTSService):
"""
api_key = api_key or os.getenv("HUME_API_KEY")
if not api_key:
raise ValueError(
"HumeTTSService requires an API key (env HUME_API_KEY or api_key=)"
)
raise ValueError("HumeTTSService requires an API key (env HUME_API_KEY or api_key=)")
if sample_rate != HUME_SAMPLE_RATE:
logger.warning(
@@ -227,9 +225,7 @@ class HumeTTSService(WordTTSService):
begin_ms = getattr(time_obj, "begin", None)
if begin_ms is not None:
begin_seconds = begin_ms / 1000.0
await self.add_word_timestamps(
[(word_text, begin_seconds)]
)
await self.add_word_timestamps([(word_text, begin_seconds)])
continue
# Process audio chunk