Used by Authenticator and Identificator instances, containing a bunch of audio records associated with user names.
More...
#include <Model.hpp>
|
virtual | ~Model () noexcept |
|
auto | type () const -> ModelType |
|
auto | name () const -> std::string const & |
|
auto | users () const -> std::vector< std::string > const & |
| Gets the list of users registered in this model.
|
|
auto | path () const -> std::string const & |
| Gets the path of the model file.
|
|
auto | analyseRecord (std::string const &path) -> std::pair< bool, nlohmann::json > |
| Analyses a user record from a file.
|
|
auto | analyseRecord (Vsdk::Audio::Buffer const &buffer) -> std::pair< bool, nlohmann::json > |
| Analyses a user record from an audio buffer.
|
|
void | addRecord (std::string const &user, std::string const &path) |
| Adds a user record from a file.
|
|
void | addRecord (std::string const &user, Audio::Buffer buffer) |
| Adds a user record from an audio buffer.
|
|
void | eraseUser (std::string const &name) |
| Erases an user and all its audio records.
|
|
void | compile () |
| Finalizes the model before being used.
|
|
Used by Authenticator and Identificator instances, containing a bunch of audio records associated with user names.
◆ Model()
Model::Model |
( |
std::shared_ptr< Engine > | engine, |
|
|
std::string | name, |
|
|
ModelType | type ) |
|
protected |
◆ ~Model()
◆ type()
◆ name()
auto Model::name |
( |
| ) |
const -> std::string const & |
◆ users()
auto Vsdk::Biometrics::Model::users |
( |
| ) |
const -> std::vector<std::string> const & |
Gets the list of users registered in this model.
◆ path()
auto Vsdk::Biometrics::Model::path |
( |
| ) |
const -> std::string const & |
Gets the path of the model file.
◆ analyseRecord() [1/2]
auto Vsdk::Biometrics::Model::analyseRecord |
( |
std::string const & | path | ) |
-> std::pair<bool, nlohmann::json> |
Analyses a user record from a file.
- Returns
- a pair comprising a boolean value 'accepted' indicating whether the record has the default requirements or not, and a JSON object containing detailed information about the record
◆ analyseRecord() [2/2]
auto Vsdk::Biometrics::Model::analyseRecord |
( |
Vsdk::Audio::Buffer const & | buffer | ) |
-> std::pair<bool, nlohmann::json> |
Analyses a user record from an audio buffer.
- Returns
- a pair comprising a boolean value 'accepted' indicating whether the record has the default requirements or not, and a JSON object containing detailed information about the record
◆ addRecord() [1/2]
void Vsdk::Biometrics::Model::addRecord |
( |
std::string const & | user, |
|
|
std::string const & | path ) |
Adds a user record from a file.
◆ addRecord() [2/2]
void Vsdk::Biometrics::Model::addRecord |
( |
std::string const & | user, |
|
|
Audio::Buffer | buffer ) |
Adds a user record from an audio buffer.
◆ eraseUser()
void Vsdk::Biometrics::Model::eraseUser |
( |
std::string const & | name | ) |
|
Erases an user and all its audio records.
◆ compile()
void Vsdk::Biometrics::Model::compile |
( |
| ) |
|
Finalizes the model before being used.
◆ usersImpl()
virtual auto Vsdk::Biometrics::Model::usersImpl |
( |
| ) |
const -> std::vector< std::string > const & |
|
protectedpure virtual |
◆ pathImpl()
virtual auto Vsdk::Biometrics::Model::pathImpl |
( |
| ) |
const -> std::string const & |
|
protectedpure virtual |
◆ analyseRecordImpl() [1/2]
virtual auto Vsdk::Biometrics::Model::analyseRecordImpl |
( |
std::string const & | path | ) |
-> std::pair< bool, nlohmann::json > |
|
protectedpure virtual |
◆ analyseRecordImpl() [2/2]
virtual auto Vsdk::Biometrics::Model::analyseRecordImpl |
( |
Vsdk::Audio::Buffer const & | buffer | ) |
-> std::pair< bool, nlohmann::json > |
|
protectedpure virtual |
◆ addRecordImpl() [1/2]
virtual void Vsdk::Biometrics::Model::addRecordImpl |
( |
std::string const & | user, |
|
|
std::string const & | path ) |
|
protectedpure virtual |
◆ addRecordImpl() [2/2]
virtual void Vsdk::Biometrics::Model::addRecordImpl |
( |
std::string const & | user, |
|
|
Audio::Buffer | buffer ) |
|
protectedpure virtual |
◆ eraseUserImpl()
virtual void Vsdk::Biometrics::Model::eraseUserImpl |
( |
std::string const & | name | ) |
|
|
protectedpure virtual |
◆ compileImpl()
virtual void Vsdk::Biometrics::Model::compileImpl |
( |
| ) |
|
|
protectedpure virtual |
◆ setModelType()
◆ throwIfDeleted()
void Vsdk::Biometrics::Model::throwIfDeleted |
( |
| ) |
const |
|
protected |