Merge pull request #103 from pollen-robotics/fix/head-wobbler-feed-delay
Browse files
src/reachy_mini_conversation_app/audio/head_wobbler.py
CHANGED
|
@@ -80,15 +80,15 @@ class HeadWobbler:
|
|
| 80 |
if chunk_generation != current_generation:
|
| 81 |
continue
|
| 82 |
|
| 83 |
-
pcm = np.asarray(chunk).squeeze(0)
|
| 84 |
-
with self._sway_lock:
|
| 85 |
-
results = self.sway.feed(pcm, sr)
|
| 86 |
-
|
| 87 |
if self._base_ts is None:
|
| 88 |
with self._state_lock:
|
| 89 |
if self._base_ts is None:
|
| 90 |
self._base_ts = time.time()
|
| 91 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 92 |
i = 0
|
| 93 |
while i < len(results):
|
| 94 |
with self._state_lock:
|
|
|
|
| 80 |
if chunk_generation != current_generation:
|
| 81 |
continue
|
| 82 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 83 |
if self._base_ts is None:
|
| 84 |
with self._state_lock:
|
| 85 |
if self._base_ts is None:
|
| 86 |
self._base_ts = time.time()
|
| 87 |
|
| 88 |
+
pcm = np.asarray(chunk).squeeze(0)
|
| 89 |
+
with self._sway_lock:
|
| 90 |
+
results = self.sway.feed(pcm, sr)
|
| 91 |
+
|
| 92 |
i = 0
|
| 93 |
while i < len(results):
|
| 94 |
with self._state_lock:
|