Add main application and command sender for voice to text processing

This commit is contained in:
2025-03-22 11:27:30 +01:00
parent 154a5690ac
commit fee80c3fbe
2 changed files with 193 additions and 0 deletions

17
send_cmd.py Executable file
View File

@@ -0,0 +1,17 @@
#!/usr/bin/env python3
import socket
import sys
SOCKET_PATH = "/tmp/voice.sock"
def send_cmd(cmd):
with socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) as client:
client.connect(SOCKET_PATH)
client.sendall(cmd.encode())
if __name__ == "__main__":
# Default: toggle
cmd = "toggle"
if len(sys.argv) == 2 and sys.argv[1] in ["start", "stop", "toggle"]:
cmd = sys.argv[1]
send_cmd(cmd)