知了 Cicada · 任何会议和直播的实时字幕、同声传译、AI 会议纪要,Mac、Windows、Linux、Android 免费开源。Live subtitles, interpreting and meeting notes for any call or stream, on Mac, Windows, Linux and Android.
Swift androidlinuxlive-captionsmacosmeeting-notesmenubar-appsimultaneous-interpretationspeech-recognitionsubtitlesswiftswiftuitranslationwindows
#!/usr/bin/env python3
"""Drives the running dev build through its control socket (cicada/app/debug.py has the commands):
cicadactl state | start | stop | feed <wav> | sample | view notes|subtitles | show records|notes|settings|onboarding
target <code> | key-reload | windows | quit | dock [on|off] | close records
calls <program=name,…>|none|real | realcalls | endtimes <silence> <countdown> <grace>|off | endkeep
notes-tab notes|transcript | notes-search <text> | notes-wide on|off | onboarding-step <n> | settings-scroll <0-1>
records-search <text> | records-search-step 1|-1 (the records window's Ctrl+F search: meetings, matches, the line)
codecs | play [<seconds>] | pause | rate | playstate | follow | play-line <n> | line-rect <n>|pill | settings-general (保存会议录音 and its player)
fixes on|off | heard <text> | fix-state | fix-answer yes|no | fix-later | fix-revert <line> | fix-undo
fix-edit <line>=<text>[|one][|keep0] | fix-editor <line>=<text> | vocab-add <word>=<heard>[|…] | vocab-state
word-list [import <text>|edit <word>|heard <word>=<form>|delete <word>] (改正听错的词, debug.py › _fixes)
share <id>[,full][,pw] | unshare <id> | share-last | shareSheet <id>|"" | share-ui <action> (分享…, debug.py › _share)
export-folder <path>|off|on | export-state | export-all | export-retry | export-choose (存到文件夹, debug.py › _export)
voice <lang>[=<id>] | voice-clone <wav>|off|state | voice-preview [<lang>] | voice-dialog open|feed <wav>|finish|play original|clone|save|close
(我自己的声音, debug.py › _voice)
Run it inside the Linux session (linux/vm/vmctl.sh ssh does that for the test VM)."""
import os
import socket
import sys
if len(sys.argv) < 2:
print(__doc__)
sys.exit(2)
path = os.path.join(os.environ.get("XDG_RUNTIME_DIR") or "/tmp", "cicada-dev.sock")
args = sys.argv[1:]
if args[0] == "feed" and len(args) > 1:
args[1] = os.path.abspath(args[1])
s = socket.socket(socket.AF_UNIX)
try:
s.connect(path)
except OSError as e:
print('{"ok":false,"error":"no dev build running (%s)"}' % e)
sys.exit(1)
s.sendall((" ".join(args) + "\n").encode())
data = b""
while not data.endswith(b"\n"):
chunk = s.recv(65536)
if not chunk:
break
data += chunk
print(data.decode().strip())