Skip to content

Commit

Permalink
Added "hold" and noise control
Browse files Browse the repository at this point in the history
  • Loading branch information
DoofenCorp committed Oct 21, 2023
1 parent 1d68fe0 commit 4edfc00
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions speaktovlc.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ async def connection():
with open("config.json") as config:
try:
configuration = json.loads(config.read())
# Telnet host, port and password
host, port, key, token = configuration["host"], configuration[
"port"], configuration['key'].encode("utf-8"), configuration['token'].encode("utf-8")
# Telnet host, port and password with noise preference
host, port, noise, key, token = configuration["host"],configuration["port"],configuration["noise"],configuration['key'].encode("utf-8"), configuration['token'].encode("utf-8")
noise = True if noise == "true" else False
except json.JSONDecodeError as JDE:
logger.error(JDE)
return 0
Expand Down Expand Up @@ -78,7 +78,7 @@ async def Send_command_Get_output(command):
while not writer.is_closing():
try:
# command = input("VLC> ").lower()
command = speak()
command = speak(noise = noise)
await Send_command_Get_output(command)
except LoopBreakException as LBE:
print(LBE)
Expand Down

0 comments on commit 4edfc00

Please sign in to comment.