Voce

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

active-dates: early 2005

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.

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);
}

DOWNLOADS

All downloads are hosted on the SourceForge project page.

DOCUMENTATION

C++ API documentation

Java API documentation

LICENSE

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