Skip to content

Commit 6032836

Browse files
author
Florian Treml
committed
check for data
1 parent 71ed906 commit 6032836

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

connectors/rasa/botium/SocketIOVoiceInput.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616

1717
logger = logging.getLogger(__name__)
1818

19-
print('Hello from SocketVoice')
20-
2119
class SocketVoiceBlueprint(Blueprint):
2220
def __init__(self, sio: AsyncServer, socketio_path, *args, **kwargs):
2321
self.sio = sio
@@ -248,7 +246,7 @@ async def handle_message(sid: Text, data: Dict) -> Any:
248246
else:
249247
sender_id = sid
250248

251-
if data['message'].startswith('data:'):
249+
if data['message'] and data['message'].startswith('data:'):
252250
header, encoded = data['message'].split(",", 1)
253251

254252
audioData = base64.b64decode(encoded.encode('ascii'))

0 commit comments

Comments
 (0)