aggiunti messaggi

这个提交包含在:
encrypt 2020-04-16 21:47:39 +02:00
父节点 194c36ee76
当前提交 15c5fffb08

查看文件

@ -15,9 +15,11 @@ def message_received(message):
if command == "/start":
is_streaming = True
silence_time = 0
mumble.my_channel().send_text_message("Diretta iniziata")
mumble.users.myself.recording()
elif command == "/stop":
is_streaming = False
mumble.my_channel().send_text_message("Diretta terminata")
mumble.users.myself.unrecording()
parser = argparse.ArgumentParser(description='Regia pienamente automatizzata')
@ -95,8 +97,9 @@ while mumble.is_alive():
silence_time += RESOLUTION
sys.stdout.buffer.write(silent)
if auto_suspend_stream and (silence_time >= silence_limit_ms):
if auto_suspend_stream and (silence_time >= silence_limit_ms) and is_streaming:
is_streaming = False
mumble.my_channel().send_text_message("Diretta terminata in automatico dopo "+str(silence_limit)+" secondi circa di silenzio")
mumble.users.myself.unrecording()
cursor_time += FLOAT_RESOLUTION