VoiceJava一种面向Java的语法导向语音编程语言

ID:38724

大小:0.43 MB

页数:19页

时间:2023-03-14

金币:2

上传者:战必胜
Citation: Zan, T.; Hu, Z. VoiceJava: A
Syntax-Directed Voice Programming
Language for Java. Electronics 2023,
12, 250. https://doi.org/10.3390/
electronics12010250
Academic Editors: Sanjay Misra,
Robertas Damaševiˇcius and
Bharti Suri
Received: 28 November 2022
Revised: 27 December 2022
Accepted: 29 December 2022
Published: 3 Juanuary 2023
Copyright: © 2023 by the authors.
Licensee MDPI, Basel, Switzerland.
This article is an open access article
distributed under the terms and
conditions of the Creative Commons
Attribution (CC BY) license (https://
creativecommons.org/licenses/by/
4.0/).
electronics
Article
VoiceJava: A Syntax-Directed Voice Programming Language
for Java
Tao Zan
1,
* and Zhenjiang Hu
2
1
School of Mathematics and Information Engineering, Longyan University, Longyan 364012, China
2
Key Lab of High Confidence Software Technologies, Ministry of Education, Department of Computer Science
and Technology, EECS, Peking University, Beijing 100091, China
* Correspondence: zan@lyun.edu.cn
Abstract:
About 5–10% of software engineers suffer from repetitive strain injury, and it would be
better to provide an alternative way to write code instead of using a mouse and keyboard and sitting
on a chair the whole day. Coding by voice is an attractive approach, and quite a bit of work has been
done in that direction. At the same time, dictating plain Java text with low accuracy through the
existing voice recognition engines or providing complex panels controlled by the voice makes the
coding process even more complex. We argue that current programming languages are suitable for
programming by hand, not by mouth. We try to solve this problem by designing a new programming
language, VoiceJava, suitable for dictating. A Java program is constructed in a syntax-directed
way through a sequence of VoiceJava commands. As a result, users do not need to dictate spaces,
parentheses, and commas, reducing the vocal load.
Keywords: voice coding; syntax-directed editing; code generation
1. Introduction
A famous venture investor, Marc Andreessen, claimed that “software is eating the
world”, which is true that nowadays, as almost everything depends on software in our
daily life. Software is written by software engineers. Unluckily, 5–10% or even more of
them suffer from repetitive strain injury (RSI) [
1
]. RSI describes discomfort and pain in
muscles, nerves, and tendonitis of the wrist or hand. Prolonged repetitive movements of
the same body parts are eventually leading to an overuse of those body parts.
RSI is common among software engineers primarily because their wrists are either
flexed or extended during keyboarding, and they spend extended hours sitting in front of a
computer day in and day out. For programmers who suffer from RSI, it would be better
to provide an alternative way to write code instead of a mouse and keyboard. Coding
by voice sounds like an attractive approach, and quite a bit of work has been done in
that direction [
2
]. At the same time, it is still difficult to be applied in the actual software
development process since dictating in plain text has a low accuracy [
3
5
] and providing
complex panels increases the coding complexity [68].
For example, suppose a programmer wants to dictate a simple statement such as:
( i < 1)
In VocalIDE [
7
], the programmer has to say: “type open parentheses i space less than space
one close parentheses"
Coding by voice in this way takes work since it involves vocal and cognitive loads.
When writing code by keyboard, only 7 keystrokes are needed, while it involves 11 words
when speaking. It is worth mentioning that programmers have to speak the word space
explicitly to indicate a space between words.
Desilets proposed a speech interface named VoiceCode [
9
], which lets users dictate
pseudocode in a natural way, and then it is translated into actual code. For example,
suppose the programmer wants to declare a method in Java [10]:
Electronics 2023, 12, 250. https://doi.org/10.3390/electronics12010250 https://www.mdpi.com/journal/electronics
资源描述:

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。
关闭