mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-29 04:13:56 +08:00
Merge branch 'main' of https://github.com/xinnan-tech/xiaozhi-esp32-server
This commit is contained in:
@@ -128,6 +128,9 @@ async def sendAudio(conn, audios, frame_duration=60):
|
|||||||
delay = expected_time - current_time
|
delay = expected_time - current_time
|
||||||
if delay > 0:
|
if delay > 0:
|
||||||
await asyncio.sleep(delay)
|
await asyncio.sleep(delay)
|
||||||
|
else:
|
||||||
|
# 纠正误差
|
||||||
|
flow_control["start_time"] += abs(delay)
|
||||||
|
|
||||||
if conn.conn_from_mqtt_gateway:
|
if conn.conn_from_mqtt_gateway:
|
||||||
# 计算时间戳和序列号
|
# 计算时间戳和序列号
|
||||||
|
|||||||
Reference in New Issue
Block a user