From 12bcd1d40df21cb9bad6ae353ea4f6697e1275a6 Mon Sep 17 00:00:00 2001 From: yum Date: Thu, 29 Dec 2022 23:01:09 -0800 Subject: GUI: Users can now control board dimensions Users can now control how many letters wide and tall the board is. Tested at 4x48, 5x60, 10x120, and 20x240. At 20x240, Unity freezes and does not make forward progress. Perhaps creating 4800 float parameters isn't a truly scalable interface. --- Scripts/transcribe.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Scripts/transcribe.py') diff --git a/Scripts/transcribe.py b/Scripts/transcribe.py index 678ec59..37a8407 100644 --- a/Scripts/transcribe.py +++ b/Scripts/transcribe.py @@ -426,6 +426,8 @@ if __name__ == "__main__": parser.add_argument("--bytes_per_char", type=str, help="The number of bytes to use to represent each character") parser.add_argument("--chars_per_sync", type=str, help="The number of characters to send on each sync event") parser.add_argument("--enable_local_beep", type=int, help="Whether to play a local auditory indicator when transcription starts/stops."); + parser.add_argument("--rows", type=int, help="The number of rows on the board") + parser.add_argument("--cols", type=int, help="The number of columns on the board") args = parser.parse_args() if not args.mic: @@ -441,8 +443,14 @@ if __name__ == "__main__": print("--bytes_per_char and --chars_per_sync required", file=sys.stderr) sys.exit(1) + if not args.rows or not args.cols: + print("--rows and --cols required", file=sys.stderr) + sys.exit(1) + generate_utils.config.BYTES_PER_CHAR = int(args.bytes_per_char) generate_utils.config.CHARS_PER_SYNC = int(args.chars_per_sync) + generate_utils.config.BOARD_ROWS = int(args.rows) + generate_utils.config.BOARD_COLS = int(args.cols) transcribeLoop(args.mic, args.language, args.model, args.enable_local_beep) -- cgit v1.2.3