update FrameProcessor.watchdog_timers_enabled references
This commit is contained in:
@@ -463,7 +463,7 @@ class PipelineTask(BasePipelineTask):
|
||||
self._process_push_queue(), f"{self}::_process_push_queue"
|
||||
)
|
||||
|
||||
await self._observer.start(self._enable_watchdog_timers)
|
||||
await self._observer.start()
|
||||
|
||||
return self._process_push_task
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ class TaskObserver(BaseObserver):
|
||||
if observer in self._observers:
|
||||
self._observers.remove(observer)
|
||||
|
||||
async def start(self, watchdog_timers_enabled: bool = False):
|
||||
async def start(self):
|
||||
"""Starts all proxy observer tasks."""
|
||||
self._proxies = self._create_proxies(self._observers)
|
||||
|
||||
|
||||
@@ -428,7 +428,7 @@ class ElevenLabsTTSService(AudioContextWordTTSService):
|
||||
self._cumulative_time = word_times[-1][1]
|
||||
|
||||
async def _keepalive_task_handler(self):
|
||||
KEEPALIVE_SLEEP = 10 if self.watchdog_timers_enabled else 3
|
||||
KEEPALIVE_SLEEP = 10 if self.task_manager.task_watchdog_enabled else 3
|
||||
while True:
|
||||
self.reset_watchdog()
|
||||
await asyncio.sleep(KEEPALIVE_SLEEP)
|
||||
|
||||
@@ -485,7 +485,7 @@ class GladiaSTTService(STTService):
|
||||
async def _keepalive_task_handler(self):
|
||||
"""Send periodic empty audio chunks to keep the connection alive."""
|
||||
try:
|
||||
KEEPALIVE_SLEEP = 20 if self.watchdog_timers_enabled else 3
|
||||
KEEPALIVE_SLEEP = 20 if self.task_manager.task_watchdog_enabled else 3
|
||||
while self._connection_active:
|
||||
self.reset_watchdog()
|
||||
# Send keepalive (Gladia times out after 30 seconds)
|
||||
|
||||
@@ -233,7 +233,7 @@ class NeuphonicTTSService(InterruptibleTTSService):
|
||||
await self.push_frame(frame)
|
||||
|
||||
async def _keepalive_task_handler(self):
|
||||
KEEPALIVE_SLEEP = 10 if self.watchdog_timers_enabled else 3
|
||||
KEEPALIVE_SLEEP = 10 if self.task_manager.task_watchdog_enabled else 3
|
||||
while True:
|
||||
self.reset_watchdog()
|
||||
await asyncio.sleep(KEEPALIVE_SLEEP)
|
||||
|
||||
Reference in New Issue
Block a user