Skip to content
Permalink
Browse files
Update clientWithSpeak.py
  • Loading branch information
issakas committed Nov 24, 2017
1 parent c451afb commit 3a73e37aabfa6b7e81402a620eff180093a8731a
Showing 1 changed file with 1 addition and 2 deletions.
@@ -1,6 +1,5 @@
#!/usr/bin/python3
import socket
from botPrintFunction import botPrint
import win32com.client as wincl
client = socket.socket() # Connect to IP:Port
port = 12346
@@ -14,7 +13,7 @@ try:
rawmsg = client.recv(1024) # recieve up to 1024 bytes

msg = rawmsg.decode('utf-8').rstrip('\r\n') # Decode received message from bits to string
print(botPrint(msg)) # convert and clean the input
print(msg) # convert and clean the input
speak = wincl.Dispatch("SAPI.SpVoice")
msg = msg.replace('m/s','meters per second') # So speach reads m/s correctly
speak.Speak(msg)

0 comments on commit 3a73e37

Please sign in to comment.