Skip to main content

Extensible, easy to use Python framework for evaluation of audio transcription systems.

Project description

:brazil: Versão Português Brasileiro

ASRBench

Evaluate, compare and find the best model for audio transcription.

Index

Introduction

ASRBench is a framework developed in Python to create and run benchmarks of audio transcription systems. It allows researchers and developers to compare different transcription systems in terms of accuracy, performance and resource utilization.

Installation

To install ASRBench, all you need is Python 3.12+ and pip. Use the command below to install the latest version:

pip install asrbench

Usage

ASRBench allows you to configure and run the benchmark using a YAML configuration file. This approach facilitates the benchmark environment by allowing the user to define datasets, transcribers and output parameters in a simple and declarative way. parameters in a simple and declarative way. For more details on the structure of the configuration file, go to documentation.

Below is an example of the configuration file structure:

# data output configuration
output:
  type: "csv"
  dir: "./results"
  filename: "example_filename"

# configuration of datasets
datasets:
  dataset1:
    audio_dir: "resources/common_voice_05/wav"
    reference_dir: "resources/common_voice_05/txt"

# transcription system configuration
transcribers:
  faster_whisper_medium_int8:
    asr: "faster_whisper"
    model: "medium"
    compute_type: "int8"
    device: "cpu"
    beam_size: 5
    language: "en"  

With the configuration file ready, just create a Python script to read the file and set up the benchmark environment. See an example below:

from asrbench.config_loader import ConfigLoader

loader = ConfigLoader("path/to/configfile.yml")
benchmark = loader.set_up_benchmark()
benchmark.run()

If you also want to generate a PDF report from the data generated in the benchmark, just add the following code snippet:

from asrbench.report.report_template import DefaultReport
from asrbench.report.input_ import CsvInput
...

output_path = benchmark.run()
report = DefaultReport(CsvInput(output_filepath))
report.generate_report()

If you prefer a more direct and simplified solution, you can check out asrbench-cli.

Contribution

If you want to contribute to ASRBench, see CONTRIBUTING.md for information on how to set up the development environment and the necessary dependencies. The main development tools are defined in the file pyproject.toml and are managed with Poetry.

About

ASRBench was developed as part of a course completion project to explore and evaluate the efficiency of audio transcription models. of audio transcription models. The academic project provides a detailed analysis of the framework's development, as well as the challenges and results obtained during the research. For more information, see TCC.

License

Distributed under the MIT license. See the LICENSE file for more details.

Go to top

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

asrbench-0.1.0.tar.gz (16.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

asrbench-0.1.0-py3-none-any.whl (25.3 kB view details)

Uploaded Python 3

File details

Details for the file asrbench-0.1.0.tar.gz.

File metadata

  • Download URL: asrbench-0.1.0.tar.gz
  • Upload date:
  • Size: 16.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.10 Windows/11

File hashes

Hashes for asrbench-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0022aff4ebdfcbd7c89af939acd5d73da3a2b783eea7fba4f0696844a8db2829
MD5 87fb50050a7439952587bd62a2e5b5f7
BLAKE2b-256 aff1c01361fc389b8e410e879a2e3e388230b3fc3c481ef27bbf0cb18ba5554d

See more details on using hashes here.

File details

Details for the file asrbench-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: asrbench-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 25.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.10 Windows/11

File hashes

Hashes for asrbench-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 265b6a487fe98d82328e75a6fb9004ac284a707f81f33b3efa748c549cad9b6a
MD5 d823d87389e0d0335c2fcfc3773f07f2
BLAKE2b-256 90685b68ab20c73ef41b7e0005536c262c587945fdc692c796df064effd6ab1b

See more details on using hashes here.

Supported by

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