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:

uv sync --extra service
fasr-fastapi init --cfg config.cfg
fasr-fastapi serve --cfg config.cfg

You can also install the plugin directly:

pip install fasr-service-fastapi

You can also inspect the generated config:

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

For backward compatibility, fasr init and fasr serve still forward to the FastAPI plugin CLI for now, but they are deprecated in favor of fasr-fastapi ....

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.3.tar.gz (9.9 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.3-py3-none-any.whl (4.4 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fasr-0.5.3.tar.gz
  • Upload date:
  • Size: 9.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"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.3.tar.gz
Algorithm Hash digest
SHA256 58ee03095a1e7d91fc63629962fad79cb5e51c59cd162df0e9f0d92a8e0ec669
MD5 d1f76c740a5b3144cef91209296b383c
BLAKE2b-256 791ae2cc5ffae3e736f5e5dfc78c5d38cc1a8feb0f6645afdd4b41e224e391c5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fasr-0.5.3-py3-none-any.whl
  • Upload date:
  • Size: 4.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4f8d367ee68dc0f26609b876593b85b57923ca06aff114c9493cd6b6ddfe3549
MD5 4a8c4ae497ac5404ed7692d51a8ee9c7
BLAKE2b-256 c74c362641144d4acf02017954a2c745994de212006b89cd4fc27caa4664279b

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