From 4e6786ada64c0ac9ad15d3809e552048863d195c Mon Sep 17 00:00:00 2001 From: rudrodip Date: Fri, 22 Mar 2024 22:42:01 +0600 Subject: [PATCH] Fix handling of empty audio content in listener function --- software/source/server/server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/software/source/server/server.py b/software/source/server/server.py index 5f9f222..381fd6d 100644 --- a/software/source/server/server.py +++ b/software/source/server/server.py @@ -211,7 +211,7 @@ async def listener(): if message["type"] == "audio" and message["format"].startswith("bytes"): - if "content" not in message or message["content"] == None: # If it was nothing / silence + if "content" not in message or message["content"] == None or message["content"] == "": # If it was nothing / silence / empty continue # Convert bytes to audio file