SpeakerVerSim


NameSpeakerVerSim JSON
Version 0.1.3 PyPI version JSON
download
home_pagehttps://github.com/wq2012/SpeakerVerSim
SummarySimulation framework for version control strategies of speaker recognition systems.
upload_time2024-09-25 15:36:43
maintainerNone
docs_urlNone
authorQuan Wang
requires_pythonNone
licenseNone
keywords
VCS
bugtrack_url
requirements simpy pyyaml tqdm seaborn munch
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # SpeakerVerSim [![Python application](https://github.com/wq2012/SpeakerVerSim/actions/workflows/python-app.yml/badge.svg)](https://github.com/wq2012/SpeakerVerSim/actions/workflows/python-app.yml) [![PyPI Version](https://img.shields.io/pypi/v/SpeakerVerSim.svg)](https://pypi.python.org/pypi/SpeakerVerSim) [![Python Versions](https://img.shields.io/pypi/pyversions/SpeakerVerSim.svg)](https://pypi.org/project/SpeakerVerSim) [![Downloads](https://static.pepy.tech/badge/SpeakerVerSim)](https://pepy.tech/project/SpeakerVerSim)

![graphical_abstract](resources/graphical_abstract.jpg)

## 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](https://www.sciencedirect.com/science/article/pii/S0164121224001675) ([arXiv version](https://arxiv.org/abs/2007.12069)).

## 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](https://arxiv.org/abs/2007.12069) 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](https://simpy.readthedocs.io), 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}},
}
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/wq2012/SpeakerVerSim",
    "name": "SpeakerVerSim",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": null,
    "author": "Quan Wang",
    "author_email": "quanw@google.com",
    "download_url": "https://files.pythonhosted.org/packages/76/ef/90bb735b854901bde98f00825bd0c59438a1a17ee8c7ae07fbd66ad1d40c/speakerversim-0.1.3.tar.gz",
    "platform": null,
    "description": "# SpeakerVerSim [![Python application](https://github.com/wq2012/SpeakerVerSim/actions/workflows/python-app.yml/badge.svg)](https://github.com/wq2012/SpeakerVerSim/actions/workflows/python-app.yml) [![PyPI Version](https://img.shields.io/pypi/v/SpeakerVerSim.svg)](https://pypi.python.org/pypi/SpeakerVerSim) [![Python Versions](https://img.shields.io/pypi/pyversions/SpeakerVerSim.svg)](https://pypi.org/project/SpeakerVerSim) [![Downloads](https://static.pepy.tech/badge/SpeakerVerSim)](https://pepy.tech/project/SpeakerVerSim)\n\n![graphical_abstract](resources/graphical_abstract.jpg)\n\n## Overview\nSpeakerVerSim is an easily-extensible Python-based simulation framework for different version control strategies of speaker recognition systems under different network configurations.\n\nThese simulations are used in the paper [Version Control of Speaker Recognition Systems](https://www.sciencedirect.com/science/article/pii/S0164121224001675) ([arXiv version](https://arxiv.org/abs/2007.12069)).\n\n## How to use\n\n### Install\n\nThe `SpeakerVerSim` library can be installed with:\n\n```\npip install SpeakerVerSim\n```\n\n### Run one simulation\n\nYou can easily start a simulation by running:\n\n```\npython run_simulator.py\n```\n\nThis simulation will use the configurations in the `example_config.yml` file.\n\nTo use a different configuration file, you can use the `-c` or `--config` flag. For example:\n\n```\npython run_simulator.py --config my_config.yml\n```\n\nYou can also override the strategy to be simulated from the config file using the `-s` or `--strategy` flag. For example:\n\n```\npython run_simulator.py -c my_config.yml -s SSO-sync\n```\n\n### Call the API\n\nThe highest level API is the `SpeakerVerSim.simulate` function.\nIt takes either the path to the config file or an object of the configurations as its input, and outputs the simulation stats.\n\nExample usage:\n\n```\nimport SpeakerVerSim\n\nstats = SpeakerVerSim.simulate(\"example_config.yml\")\n```\n\n### Reproduce experiments\n\nYou can easily reproduce the experiments in our [paper](https://arxiv.org/abs/2007.12069) by running:\n\n```\npython run_exp.py\n```\n\nAfter running this script, simulation results will be stored in the `result_stats` directory.\n\nThen you can visualize the metrics by running:\n\n```\npython visualize_results.py\n```\n\nThe visualization graphics will be stored in the `figures` directory.\n\n## List of implemented strategies\n\n| Script                          | Strategy    | Description |\n| ------------------------------- | ----------- | ----------- |\n| `server_single_simple.py`       | SSO         | Basic server-side single version online updating strategy.\n| `server_single_sync.py`         | SSO-sync    | Server-side single version online updating strategy with frontend-worker version sync.\n| `server_single_hash.py`         | SSO-hash    | Server-side single version online updating strategy with user-ID hashing.\n| `server_single_multiprofile.py` | SSO-mul     | Server-side single version online updating strategy with multi-profile database.\n| `server_single_sync.py`         | SD          | Server-side double version updating strategy.\n\n## Design\n\nThe design of this library is summarized as below:\n\n* This library is built on top of [SimPy](https://simpy.readthedocs.io), a process-based discrete-event simulation (DES) framework based on standard Python.\n* All configurations of the simulation are represented in a single YAML file. `example_config.yml` has explanations for all the configuration fields.\n* Each machine in the network inherits from the `Actor` class, including the client, the frontend server, the cloud worker, and the database.\n* 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.\n* 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.\n* During the simulation, metrics are logged in an object of the `GlobalStats` class.\n* The entire network system is represented by the `NetworkSystem` class or its subclass.\n\nEach version control strategy is implemented by creating a set of client, frontend server, cloud workers, database, and defining how they interact with each other.\n\n## Citation\n\n```\n@article{WANG2024112122,\n  title = {Version control of speaker recognition systems},\n  journal = {Journal of Systems and Software},\n  volume = {216},\n  pages = {112122},\n  year = {2024},\n  issn = {0164-1212},\n  doi = {https://doi.org/10.1016/j.jss.2024.112122},\n  url = {https://www.sciencedirect.com/science/article/pii/S0164121224001675},\n  author = {Quan Wang and Ignacio {Lopez Moreno}},\n}\n```\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Simulation framework for version control strategies of speaker recognition systems.",
    "version": "0.1.3",
    "project_urls": {
        "Homepage": "https://github.com/wq2012/SpeakerVerSim"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8276cef3d46ff1b6ec88f432e340d149211ba67a50f9e5d082b859b7152f8aa2",
                "md5": "d7d953c78e97cc969a52fe4283e93bb0",
                "sha256": "1a7d1ce5b803b44cbc820abb9c6f978339eef9af42c2dd9b788164c2cd97b044"
            },
            "downloads": -1,
            "filename": "SpeakerVerSim-0.1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d7d953c78e97cc969a52fe4283e93bb0",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 20675,
            "upload_time": "2024-09-25T15:36:42",
            "upload_time_iso_8601": "2024-09-25T15:36:42.400609Z",
            "url": "https://files.pythonhosted.org/packages/82/76/cef3d46ff1b6ec88f432e340d149211ba67a50f9e5d082b859b7152f8aa2/SpeakerVerSim-0.1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "76ef90bb735b854901bde98f00825bd0c59438a1a17ee8c7ae07fbd66ad1d40c",
                "md5": "dbc267edd60df997694a926570d07711",
                "sha256": "0e338629ca278ff5166313dfc14c0b6e8ab5615c4602c07fcb1bf383c8e0c445"
            },
            "downloads": -1,
            "filename": "speakerversim-0.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "dbc267edd60df997694a926570d07711",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 16976,
            "upload_time": "2024-09-25T15:36:43",
            "upload_time_iso_8601": "2024-09-25T15:36:43.296187Z",
            "url": "https://files.pythonhosted.org/packages/76/ef/90bb735b854901bde98f00825bd0c59438a1a17ee8c7ae07fbd66ad1d40c/speakerversim-0.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-25 15:36:43",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "wq2012",
    "github_project": "SpeakerVerSim",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "simpy",
            "specs": []
        },
        {
            "name": "pyyaml",
            "specs": []
        },
        {
            "name": "tqdm",
            "specs": []
        },
        {
            "name": "seaborn",
            "specs": []
        },
        {
            "name": "munch",
            "specs": []
        }
    ],
    "lcname": "speakerversim"
}
        
Elapsed time: 0.62652s