Skip to main content

FASR: Fast Automatic Speech Recognition Pipeline

Project description

fasr logo

fasr

fasr is a production-ready Python speech inference framework built around a composable AudioPipeline.

It lets you combine VAD, ASR, punctuation restoration, language identification, and custom components for offline transcription, batch jobs, and online services.

📖 Chinese README: README_ZH.md

Key Features

  • Plugin-based model ecosystem with install-on-demand model packages.
  • Unified data structures and component interfaces for easier composition.
  • Asynchronous component execution for better CPU / GPU utilization.
  • Production-oriented pipeline design for batch, streaming, and service use.

Quick Start

Install the plugins you need first:

pip install fasr-vad-fsmn fasr-asr-paraformer fasr-punc-ct-transformer

Build a pipeline and run inference:

from fasr import AudioPipeline

asr = (
    AudioPipeline()
    .add_pipe("detector", model="fsmn")
    .add_pipe("recognizer", model="paraformer")
    .add_pipe("sentencizer", model="ct_transformer")
)

audios = asr.run(["1.wav", "2.wav", "3.wav"])
for audio in audios:
    print(audio.text)
    # if your audio has multiple channels, you can use audio.channels to get the text of each channel
    for channel in audio.channels:
        print(channel.text)

Supported Models

fasr discovers models through plugin packages. The following models are currently supported in this repository:

Capability Registered model IDs Plugin packages
VAD marblenet, fsmn, fsmn_online, firered, stream_silero fasr-vad-marblenet, fasr-vad-fsmn, fasr-vad-firered, fasr-vad-silero
ASR qwen3asr, qwen3_0_6b, qwen3_1_7b, stream_qwen3_0_6b, stream_qwen3_1_7b, paraformer, seaco_paraformer, paraformer_online, firered_aed, firered_llm, fun_asr_nano fasr-asr-qwen3asr, fasr-asr-paraformer, fasr-asr-firered, fasr-asr-funasr
Punctuation ct_transformer fasr-punc-ct-transformer
LID firered fasr-lid-firered

Service Deployment

FastAPI service support is provided by the optional fasr-service-fastapi plugin. Install the service extra and start the service:

pip install fasr-service-fastapi
fasr init --cfg config.cfg
fasr serve --cfg config.cfg

You can also inspect the generated config:

fasr serve --print_default_config true
fasr serve --write_default_config run.cfg

Service routers are config-driven. If [service.transcribe_router] is omitted, batch endpoints such as POST /transcribe and POST /inference are not mounted. If [service.realtime_router] is omitted, realtime websocket endpoints are not mounted. At least one router must be configured.

Model Plugin Guide

Model plugin implementation details live in docs/model-plugins.md.

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

fasr-0.5.2.tar.gz (9.5 MB view details)

Uploaded Source

Built Distribution

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

fasr-0.5.2-py3-none-any.whl (4.4 MB view details)

Uploaded Python 3

File details

Details for the file fasr-0.5.2.tar.gz.

File metadata

  • Download URL: fasr-0.5.2.tar.gz
  • Upload date:
  • Size: 9.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for fasr-0.5.2.tar.gz
Algorithm Hash digest
SHA256 0f9dd36f1f89fc6b9641598d8223482d4079abb1f463dcc05a5d793b80c3594d
MD5 407d6efc9f2a16e7c8a67ae5c4262539
BLAKE2b-256 6763e9cf594d96ec260db96a79026e095509bdbc142c14c9ecd10f107ff6b963

See more details on using hashes here.

File details

Details for the file fasr-0.5.2-py3-none-any.whl.

File metadata

  • Download URL: fasr-0.5.2-py3-none-any.whl
  • Upload date:
  • Size: 4.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for fasr-0.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a5979360108b442d60b54db79c321194bf06089539c532c6c2f4f6f1d1c5fe09
MD5 401c60942a46573ae7bb58892ffece60
BLAKE2b-256 fe75825e6c87ebc03d36968d8faa6123e11dc9aae2e759f1edbac807e1c28a11

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