Skip to main content

Simulation framework for version control strategies of speaker recognition systems.

Project description

SpeakerVerSim Python application PyPI Version Python Versions Downloads

graphical_abstract

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.yml has explanations for all the configuration fields.
  • Each machine in the network inherits from the Actor class, including the client, the frontend server, the cloud worker, and the database.
  • All clients inherit from the BaseClient class; all frontend servers inherit from the BaseFrontend class; all cloud workers inherit from the BaseWorker class; and all databases inherit from the BaseDatabase class.
  • The communication between two machines happens like this: the sender creates a Message object, and adds it to the receiver's message pool, which is a simpy.Store object.
  • During the simulation, metrics are logged in an object of the GlobalStats class.
  • The entire network system is represented by the NetworkSystem class 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}},
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

speakerversim-0.1.3.tar.gz (17.0 kB view details)

Uploaded Source

Built Distribution

SpeakerVerSim-0.1.3-py3-none-any.whl (20.7 kB view details)

Uploaded Python 3

File details

Details for the file speakerversim-0.1.3.tar.gz.

File metadata

  • Download URL: speakerversim-0.1.3.tar.gz
  • Upload date:
  • Size: 17.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.1

File hashes

Hashes for speakerversim-0.1.3.tar.gz
Algorithm Hash digest
SHA256 0e338629ca278ff5166313dfc14c0b6e8ab5615c4602c07fcb1bf383c8e0c445
MD5 dbc267edd60df997694a926570d07711
BLAKE2b-256 76ef90bb735b854901bde98f00825bd0c59438a1a17ee8c7ae07fbd66ad1d40c

See more details on using hashes here.

File details

Details for the file SpeakerVerSim-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for SpeakerVerSim-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1a7d1ce5b803b44cbc820abb9c6f978339eef9af42c2dd9b788164c2cd97b044
MD5 d7d953c78e97cc969a52fe4283e93bb0
BLAKE2b-256 8276cef3d46ff1b6ec88f432e340d149211ba67a50f9e5d082b859b7152f8aa2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page