Improving the latency of the HeyGenVideoService.
This commit is contained in:
@@ -20,6 +20,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
### Other
|
### Other
|
||||||
|
|
||||||
|
- Improving the latency of the `HeyGenVideoService`.
|
||||||
|
|
||||||
- Updated `15-switch-voices.py` and `15a-switch-languages.py` examples to show
|
- 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
|
how to enclose complex logic (e.g. `ParallelPipeline`) into a single processor
|
||||||
so the main pipeline becomes simpler.
|
so the main pipeline becomes simpler.
|
||||||
|
|||||||
@@ -362,7 +362,7 @@ class HeyGenClient:
|
|||||||
"""Simulate audio playback timing with appropriate delays."""
|
"""Simulate audio playback timing with appropriate delays."""
|
||||||
# Only sleep after we've sent the first second of audio
|
# Only sleep after we've sent the first second of audio
|
||||||
# This appears to reduce the latency to receive the answer from HeyGen
|
# 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._audio_seconds_sent += self._send_interval
|
||||||
self._next_send_time = time.monotonic() + self._send_interval
|
self._next_send_time = time.monotonic() + self._send_interval
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user