Skip to main content

Parallel CBS Transformer Based ASR

Project description

fujielab-asr-parallel-cbs

Parallel CBS Transformer based ASR system built on ESPnet

Overview

fujielab-asr-parallel-cbs is an automatic speech recognition (ASR) system based on ESPnet, featuring a parallelizable Contextual Block Streaming (CBS) Transformer.

Features

  • Implementation of a parallel CBS Transformer encoder extending the ESPnet framework
  • Supports online and streaming ASR inference
  • Pretrained models available via Hugging Face
  • Example script for chunk-by-chunk streaming recognition

Requirements

  • Python 3.11
  • torch, torchaudio, and other packages listed in requirements.txt

Installation

PyPI Installation

You can install the package directly from PyPI:

pip install fujielab-asr-parallel-cbs

Local Installation

  1. Install the dependencies and this package:
    pip install -r requirements.txt
    pip install -e .
    
    If you skip installing the package, running the examples may fail with ModuleNotFoundError. Alternatively, you can set PYTHONPATH=$(pwd) before executing the scripts.
  2. If there are additional dependencies, please refer to pyproject.toml.

Usage

Example: Running Inference

You can perform inference from an audio file using examples/run_streaming_asr.py:

python examples/run_streaming_asr.py

The script streams the input audio in 100 ms chunks and prints partial results. At the first run it downloads a small example audio (aps-smp.mp3) from the CSJ corpus and a pretrained model from Hugging Face. When the recognition finishes successfully, the final transcript is displayed at the end of the log.

Directory Structure

  • fujielab/asr_parallel_cbs/espnet_ext/ : ESPnet extension implementation
    • espnet/ : Extensions for ESPnet1
    • espnet2/ : Extensions for ESPnet2 (ASR, transducer, joint network, etc.)
  • examples/ : Sample audio and inference scripts
  • warprnnt_pytorch/ : Dummy module for warprnnt_pytorch

License

This repository is released under the Apache License 2.0.

Acknowledgements

This project is based on the ESPnet framework and incorporates contributions from various open-source projects. We thank the ESPnet team and contributors for their work.

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

fujielab_asr_parallel_cbs-0.1.1.tar.gz (46.3 kB view details)

Uploaded Source

Built Distribution

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

fujielab_asr_parallel_cbs-0.1.1-py3-none-any.whl (45.4 kB view details)

Uploaded Python 3

File details

Details for the file fujielab_asr_parallel_cbs-0.1.1.tar.gz.

File metadata

File hashes

Hashes for fujielab_asr_parallel_cbs-0.1.1.tar.gz
Algorithm Hash digest
SHA256 3133ce02a5000fc9adb8ca01bb3ffebea3041b841c4d4f0440a0abbf64e327bc
MD5 9e707ff189d17c2256f9a0ca8437a9a6
BLAKE2b-256 7f7b45fff70b717d426f16b1ecf17354313be697ba249cd77278391b467f3871

See more details on using hashes here.

File details

Details for the file fujielab_asr_parallel_cbs-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for fujielab_asr_parallel_cbs-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 44d351dd45f10800961964f9fb655cef233cf20088a4aca9c67bc7b6f6bea16d
MD5 76237d6e2b67e3b85d0c8797351ab4bf
BLAKE2b-256 9085f511046d0145e8c9781f87f33a08078ebc94f41d6229e75adc1491711bac

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