Merge pull request #2399 from pipecat-ai/filipi/heygen_latency

Improving the latency of the `HeyGenVideoService`.
This commit is contained in:
Filipi da Silva Fuchter
2025-08-11 09:13:10 -03:00
committed by GitHub
2 changed files with 3 additions and 1 deletions

View File

@@ -20,6 +20,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Other
- Improving the latency of the `HeyGenVideoService`.
- Updated `15-switch-voices.py` and `15a-switch-languages.py` examples to show
how to enclose complex logic (e.g. `ParallelPipeline`) into a single processor
so the main pipeline becomes simpler.

View File

@@ -362,7 +362,7 @@ class HeyGenClient:
"""Simulate audio playback timing with appropriate delays."""
# Only sleep after we've sent the first second of audio
# This appears to reduce the latency to receive the answer from HeyGen
if self._audio_seconds_sent < 1.0:
if self._audio_seconds_sent < 3.0:
self._audio_seconds_sent += self._send_interval
self._next_send_time = time.monotonic() + self._send_interval
return