Skip to content

Commit

Permalink
Remove voice mode code
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkbrnd committed Dec 18, 2024
1 parent d7fe059 commit b193d69
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 41 deletions.
22 changes: 0 additions & 22 deletions cookbook/playground/audio_conversation_agent.py

This file was deleted.

19 changes: 0 additions & 19 deletions phi/agent/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -1811,16 +1811,6 @@ def _run(
self.run_response.created_at = model_response_chunk.created_at
yield self.run_response

if model_response_chunk.audio is not None:
if model_response.audio is None:
model_response.audio = {"data": "", "transcript": ""}

model_response.audio["data"] += model_response.audio.get("data", "")
model_response.audio["transcript"] += model_response.audio.get("transcript", "")
self.run_response.response_audio = model_response_chunk.audio
self.run_response.created_at = model_response_chunk.created_at
yield self.run_response

elif model_response_chunk.event == ModelResponseEvent.tool_call_started.value:
# Add tool call to the run_response
tool_call_dict = model_response_chunk.tool_call
Expand Down Expand Up @@ -2163,15 +2153,6 @@ async def _arun(
self.run_response.content = model_response_chunk.content
self.run_response.created_at = model_response_chunk.created_at
yield self.run_response
if model_response_chunk.audio is not None:
if model_response.audio is None:
model_response.audio = {"data": "", "transcript": ""}

model_response.audio["data"] += model_response.audio.get("data", "")
model_response.audio["transcript"] += model_response.audio.get("transcript", "")
self.run_response.response_audio = model_response_chunk.audio
self.run_response.created_at = model_response_chunk.created_at
yield self.run_response
elif model_response_chunk.event == ModelResponseEvent.tool_call_started.value:
# Add tool call to the run_response
tool_call_dict = model_response_chunk.tool_call
Expand Down

0 comments on commit b193d69

Please sign in to comment.