Programming by speech

From Digital Grammars Wiki

Revision as of 12:45, 18 November 2008 by Aarne (Talk | contribs)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

Typing code in a text editor or using an IDE is not always the best way to write programs. Sometimes it would be better to speak. Existing speech programming systems often follow the target programming language very closely, so that one has to pronounce parentheses and punctuation marks. In this project, we approach the idea of speech-based translation by using the distinction between abstract and concrete syntax. The starting point is a standard programming language - e.g. Haskell or Java - and its standard compiler. The compilation phases of lexing and parsing are replaced by a speech recognition and parser component that returns abstract syntax trees of the language. The standard compiler will then take over and continue the compilation. It is also possible to run the standard pretty-printer on the syntax tree and get the code in standard notation. Moreover, it is possible to to apply the speech concrete syntax to an abstract syntax tree (obtained from standard code or otherwise) and convert it to speech.

The goal of the project is to build a working system for an entire programming language. A minimal system will need the following components:

  • abstract syntax of the programming language
  • parser and pretty-printer of the programming language
  • speech-friendly grammar for the programming language, enabling parsing and pretty-printing
  • speech recognition for the speech-friendly grammar
  • speech synthesis for the speech-friendly grammar

The first two components may be readily available. The other components can be built by using the tools BNFC (digitalgrammars.com/bnfc) and GF (digitalgrammars.com/gf), as well as standard speech recognition and synthesis tools.

Prerequisites:

  • programming languages course, compiler construction recommended
  • functional programming experience

Contact person: Aarne Ranta (aarne at chalmers se).