diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c4ec65df..5c8603121 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. diff --git a/src/pipecat/services/heygen/client.py b/src/pipecat/services/heygen/client.py index 9bd66d6a8..e2c6cf57f 100644 --- a/src/pipecat/services/heygen/client.py +++ b/src/pipecat/services/heygen/client.py @@ -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