SpeakerVerSim

Overview
SpeakerVerSim is an easily-extensible Python-based simulation framework for different version control strategies of speaker recognition systems under different network configurations.
These simulations are used in the paper Version Control of Speaker Recognition Systems (arXiv version).
How to use
Install
The SpeakerVerSim library can be installed with:
pip install SpeakerVerSim
Run one simulation
You can easily start a simulation by running:
python run_simulator.py
This simulation will use the configurations in the example_config.yml file.
To use a different configuration file, you can use the -c or --config flag. For example:
python run_simulator.py --config my_config.yml
You can also override the strategy to be simulated from the config file using the -s or --strategy flag. For example:
python run_simulator.py -c my_config.yml -s SSO-sync
Call the API
The highest level API is the SpeakerVerSim.simulate function.
It takes either the path to the config file or an object of the configurations as its input, and outputs the simulation stats.
Example usage:
import SpeakerVerSim
stats = SpeakerVerSim.simulate("example_config.yml")
Reproduce experiments
You can easily reproduce the experiments in our paper by running:
python run_exp.py
After running this script, simulation results will be stored in the result_stats directory.
Then you can visualize the metrics by running:
python visualize_results.py
The visualization graphics will be stored in the figures directory.
List of implemented strategies
| Script | Strategy | Description |
|---|---|---|
server_single_simple.py |
SSO | Basic server-side single version online updating strategy. |
server_single_sync.py |
SSO-sync | Server-side single version online updating strategy with frontend-worker version sync. |
server_single_hash.py |
SSO-hash | Server-side single version online updating strategy with user-ID hashing. |
server_single_multiprofile.py |
SSO-mul | Server-side single version online updating strategy with multi-profile database. |
server_single_sync.py |
SD | Server-side double version updating strategy. |
Design
The design of this library is summarized as below:
- This library is built on top of SimPy, a process-based discrete-event simulation (DES) framework based on standard Python.
- All configurations of the simulation are represented in a single YAML file.
example_config.ymlhas explanations for all the configuration fields. - Each machine in the network inherits from the
Actorclass, including the client, the frontend server, the cloud worker, and the database. - All clients inherit from the
BaseClientclass; all frontend servers inherit from theBaseFrontendclass; all cloud workers inherit from theBaseWorkerclass; and all databases inherit from theBaseDatabaseclass. - The communication between two machines happens like this: the sender creates a
Messageobject, and adds it to the receiver's message pool, which is asimpy.Storeobject. - During the simulation, metrics are logged in an object of the
GlobalStatsclass. - The entire network system is represented by the
NetworkSystemclass or its subclass.
Each version control strategy is implemented by creating a set of client, frontend server, cloud workers, database, and defining how they interact with each other.
Citation
@article{WANG2024112122,
title = {Version control of speaker recognition systems},
journal = {Journal of Systems and Software},
volume = {216},
pages = {112122},
year = {2024},
issn = {0164-1212},
doi = {https://doi.org/10.1016/j.jss.2024.112122},
url = {https://www.sciencedirect.com/science/article/pii/S0164121224001675},
author = {Quan Wang and Ignacio {Lopez Moreno}},
}
Release files for SpeakerVerSim 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| speakerversim-0.1.3.tar.gz | 17.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| SpeakerVerSim-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 37.7 kB
Release files / speakerversim-0.1.3.tar.gz
| Download URL | speakerversim-0.1.3.tar.gz |
|---|---|
| Size | 17.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0e338629ca278ff5166313dfc14c0b6e8ab5615c4602c07fcb1bf383c8e0c445
|
|
BLAKE2b-256 checksum How to use checksums |
76ef90bb735b854901bde98f00825bd0c59438a1a17ee8c7ae07fbd66ad1d40c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.1
|
Release files / SpeakerVerSim-0.1.3-py3-none-any.whl
| Download URL | SpeakerVerSim-0.1.3-py3-none-any.whl |
|---|---|
| Size | 20.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1a7d1ce5b803b44cbc820abb9c6f978339eef9af42c2dd9b788164c2cd97b044
|
|
BLAKE2b-256 checksum How to use checksums |
8276cef3d46ff1b6ec88f432e340d149211ba67a50f9e5d082b859b7152f8aa2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.1
|