active: early 2005 download: sf.net/projects/voce api-c++: link api-java: link paper: pdf

Voce

A Tiny API for Speech I/O in C++ and Java

Voce is a cross-platform speech synthesis and recognition library with a tiny API for C++ and Java. It uses CMU Sphinx4 and FreeTTS internally. The word "voce" is Italian for "voice" (pronunciation). For more details, including the original motivation, design and implementation details, and grammar file format (needed for speech recognition), see this report.

Voce has been used in many software projects (nearly 40k downloads by the end of 2020). In particular, it was used within the VRAC, e.g. in the Battlespace project for controlling simulated UAVs with voice commands.

Voce is licensed under the BSD or LGPL Open Source licenses. Also, be sure to read the licenses for FreeTTS and CMU Sphinx4.

Code Sample

Here is a sample of the C++ API:

voce::synthesize("hello world");

while (voce::getRecognizerQueueSize() > 0)
{
  std::string s = voce::popRecognizedString();
  std::cout << "You said: " << s << std::endl;
}

And here is the Java version:

voce.SpeechInterface.synthesize("hello world");

while (voce.SpeechInterface.getRecognizerQueueSize() > 0)
{
  String s = voce.SpeechInterface.popRecognizedString();
  System.out.println("You said: " + s);
}