Fixing ruff format.
This commit is contained in:
@@ -2,7 +2,6 @@ import array
|
||||
import asyncio
|
||||
import os
|
||||
import signal
|
||||
import time
|
||||
|
||||
from daily import (
|
||||
AudioData,
|
||||
@@ -53,7 +52,6 @@ class DailyProxyApp(EventHandler):
|
||||
# Raw PCM buffer — filled at DECLARED_SAMPLE_RATE speed, drained at TRUE_SAMPLE_RATE speed.
|
||||
self._buffer = bytearray()
|
||||
self._audio_task: asyncio.Task | None = None
|
||||
self._receive_start_time: float | None = None
|
||||
|
||||
self._client: CallClient = CallClient(event_handler=self)
|
||||
self._client.update_subscription_profiles(
|
||||
@@ -173,9 +171,6 @@ class DailyProxyApp(EventHandler):
|
||||
if self._is_silence(new_bytes):
|
||||
return
|
||||
|
||||
if self._receive_start_time is None:
|
||||
self._receive_start_time = time.monotonic()
|
||||
|
||||
self._buffer.extend(new_bytes)
|
||||
|
||||
def _audio_data_received(self, participant_id: str, audio_data: AudioData, audio_source: str):
|
||||
|
||||
@@ -75,9 +75,7 @@ class TavusApi:
|
||||
# Only for development
|
||||
self._dev_room_url = os.getenv("TAVUS_SAMPLE_ROOM_URL")
|
||||
|
||||
async def create_conversation(
|
||||
self, replica_id: str, persona_id: str, sample_rate: int
|
||||
) -> dict:
|
||||
async def create_conversation(self, replica_id: str, persona_id: str, sample_rate: int) -> dict:
|
||||
"""Create a new conversation with the specified replica and persona.
|
||||
|
||||
Args:
|
||||
@@ -251,15 +249,11 @@ class TavusTransportClient:
|
||||
on_participant_joined=self._callbacks.on_participant_joined,
|
||||
on_participant_left=self._callbacks.on_participant_left,
|
||||
on_participant_updated=partial(self._on_handle_callback, "on_participant_updated"),
|
||||
on_transcription_message=partial(
|
||||
self._on_handle_callback, "on_transcription_message"
|
||||
),
|
||||
on_transcription_message=partial(self._on_handle_callback, "on_transcription_message"),
|
||||
on_recording_started=partial(self._on_handle_callback, "on_recording_started"),
|
||||
on_recording_stopped=partial(self._on_handle_callback, "on_recording_stopped"),
|
||||
on_recording_error=partial(self._on_handle_callback, "on_recording_error"),
|
||||
on_transcription_stopped=partial(
|
||||
self._on_handle_callback, "on_transcription_stopped"
|
||||
),
|
||||
on_transcription_stopped=partial(self._on_handle_callback, "on_transcription_stopped"),
|
||||
on_transcription_error=partial(self._on_handle_callback, "on_transcription_error"),
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user