$speaker
$speaker : string
AlizePHP is a php wrapper for Alize and LIA_RAL, an open source platform for biometrics authentification.
This class aims to abstract AlizePHP's commands and files, providing a per-user set of methods, and allowing developers to extract audio features and i-vectors with ease.
Alize and LIA_RAL are not part of this package and they must be downloaded and compiled in your machine. Once compiled, place the libraries and binaries generated in bin/ directory. It is STRONGLY advised to read documentation from Alize package as well as study the tutorials in order to understand what this package is doing and how to adapt it to your project. Anyway, a rough set of steps to create a user information in a sistem is to sequentially execute the following commands:
1 - extractFeatures() 2 - normaliseEnergy() 3 - detectEnergy() 4 - normaliseFeatures() 5 - ivExtractor()
Every method needs the output of the preceding one stored in your directory structure in order to properly work (you'll receive an AlizePHPException if that is not the case). Once the i-vector generated by ivExtractor() is present, you can use ivTest to verify if two users are the same person.
A set of default configuration files and settings is also provided in cfg/ directory. These files have been created by Anthony Larcher (alarcher - at- i2r.a-star.edu.sg) as part of his Alize tutorials and, as he states, "The author does not give ANY waranty about the performance and the usability".
You can change file extensions and directories to create your own directory structure. This may be useful if you want to use the files generated by Alize with another software. Settings file can be found in cfg/alizephp_conf.php.
Alize has been created by: A. Larcher, J.-F. Bonastre, B. Fauve, K.A. Lee, C. Levy, H. Li, J.S.D. Mason, J.-Y Parfait, "ALIZE 3.0 - Open Source Toolkit for State-of-the-Art Speaker Recognition," in Annual Conference of the International Speech Communication Association (Interspeech), 2013
Alize website: http://alize.univ-avignon.fr/index_en.html Alize SVN: http://alize.univ-avignon.fr/svn/ALIZE/trunk/ LIA_RAL SVN: http://alize.univ-avignon.fr/svn/LIA_RAL/trunk/ Alize documentation (including Tutorials): http://alize.univ-avignon.fr/doc_en.html
extractFeatures(string $param_string) : boolean
Creates raw features file from audio provided in constructor and stores audio in alizephp directory structure.
If a param string for the sfbcep command is not provided, the default of "-m -k 0.97 -p19 -n 24 -r 22 -e -D -A -F PCM16" will be used.
string | $param_string | OPTIONAL Parameter string for sfbcep command |
normaliseEnergy(string $cfg_file_path) : boolean
Creates normalised features file from raw features file created in extractFeatures method.
If a path to a config file is not provided "cfg_files"->"normalise_features" option in settings file sets the path of the config file that will be used.
string | $cfg_file_path | OPTIONAL Path to a config file for Alize's NormFeat command |
detectEnergy(string $cfg_file_path) : boolean
Creates label file from normalised energy file created in normaliseEnergy method.
If a path to a config file is not provided "cfg_files"->"detect_energy" option in settings file sets the path of the config file that will be used.
string | $cfg_file_path | OPTIONAL Path to a config file for Alize's EnergyDetector command |
normaliseFeatures(string $cfg_file_path) : boolean
Creates a features file from raw features and label files created in extractFeatures and detectEnergy methods.
If a path to a config file is not provided "cfg_files"->"normalise_features" option in settings file sets the path of the config file that will be used.
string | $cfg_file_path | OPTIONAL Path to a config file for Alize's NormFeat command |
ivExtractor(string $cfg_file_path) : boolean
Creates an i-vector representing the user's voice features. It needs the ouptu generated by the NormaliseFeatures and detectEnergy methods, as well as mixture (model) and matrix files, generated using ALIZE internal tools with multiple samples.
If a path to a config file is not provided "cfg_files"->"iv_extractor" option in settings file sets the path of the config file that will be used.
string | $cfg_file_path | OPTIONAL Path to a config file for Alize's IvExtractor command |
ivTest(string $speaker_to_compare_to, string $cfg_file_path) : boolean
Test if the speaker's object is the same person as speaker with ID of $speaker_to_compare_to.
Buth speakers must have their i-vectors created and stored in the directory structure. If a path to a config file is not provided "cfg_files"->"iv_extractor" option in settings file sets the path of the config file that will be used.
string | $speaker_to_compare_to | ID of the speaker compared agains this objet's one |
string | $cfg_file_path | OPTIONAL Path to a config file for Alize's IvTest command |
true if botk speakers are the same person, false if not
executeCommand(string $comm) : string[]
Executes a given command and returns stdout, stderr and return value
string | $comm | Command to execute |
Array wit stdout, stderr and return value of the command, in indexes 0, 1 and 2 each