diff options
| author | yum <yum.food.vr@gmail.com> | 2022-12-29 23:01:09 -0800 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2022-12-29 23:01:09 -0800 |
| commit | 12bcd1d40df21cb9bad6ae353ea4f6697e1275a6 (patch) | |
| tree | bb39f59098cbb4e83235c6561ff30ce444d7dedd /Scripts/transcribe.py | |
| parent | 7214653f9354ef885ef4131e455e0a63f12a17f2 (diff) | |
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.
Diffstat (limited to 'Scripts/transcribe.py')
| -rw-r--r-- | Scripts/transcribe.py | 8 |
1 files changed, 8 insertions, 0 deletions
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) |
