BSAPI  v3.22.0
Brno Speech Application Interface Documentation


Brno Speech Core (BSCORE) is a set of building stones for easy end very fast prototyping of speech recognizers. It implements wide scale of algorithms from reading of speech files / microphone input, processing of list files through parameterization, feature transformation, classification, decoding, phoneme recognizers to continuous speech recognizers, keyword spotting, language identification, speaker identification. Brno Speech Application Interface (BSAPI) is an interface between BSCORE and other software.


The application interface to BSCORE is an object oriented. Each algorithm have its own class. Classes are accessible through interfaces. The interface is a pure virtual class (all members are virtual). These classes are tagged by letter I at the end of name. The developer can create an instance using the BSAPICreateInstance() function. An interface identification number is required. All interfaces are derived from the SUnknownI class. This ensure a basic functionality, like reference counting and removing the instance from memory if none refer it.

See the first_step.cpp example.

File paths

Since version 3.22.0 all functions taking path/file name support UTF-8 path. Linux supports UTF-8 natively so no changes are needed there. However, if you want to use Unicode characters on Windows, you have to use WideCharToMultiByte function to translate wide strings to UTF-8 string.

Error Handling

The errors returned by BSAPI functions are rather simple. It is usually true if the function finished correctly and false in case of an error. In some cases, if a function returns a pointer, the error can be also signalized by 0. But a detailed error description is sometimes necessary. Therefore BSAPI classes send a detailed error description of error to an error handler. The error handler can also accept warning and log messages. An error handler is assigned to a class by calling the SUnknownI::SetErrorHandler() function of the class. If no error handler is assigned, the messages are printed to the standard output. An error handler can be each class that implements the SErrorCallbackI interface.

See the error_handler.cpp example.