Skip to main content

Fun ASR model for fasr

Project description

fasr-asr-fun

基于 fun_asr_nano.pyfunasr.AutoModel 推理方式封装,为 fasr 提供 Fun-ASR-Nano 无时间戳识别能力。

安装

pip install fasr-asr-fun

注册模型

注册名 默认 checkpoint 说明
fun_asr_nano FunASRNanoForASR FunAudioLLM/Fun-ASR-Nano-2512 Fun-ASR-Nano,无时间戳输出

使用方式

from fasr import AudioPipeline

pipeline = (
    AudioPipeline()
    .add_pipe("detector", model="fsmn")
    .add_pipe("recognizer", model="fun_asr_nano")
    .add_pipe("sentencizer", model="ct_transformer")
)

单独使用模型

模型实例化时会自动执行 download_checkpoint() + load_checkpoint()

from fasr.config import registry

model = registry.asr_models.get("fun_asr_nano")(device="cuda:0")
# or model.load_checkpoint("/path/to/custom/fun_asr")

运行期 / 会话参数

参数 类型 默认值 说明
checkpoint str | None "FunAudioLLM/Fun-ASR-Nano-2512" 远程 repo_id;非空时实例化会自动下载
cache_dir str | Path | None None 缓存目录,None 使用 fasr.utils.get_cache_dir()
endpoint Literal["modelscope", "huggingface", "hf-mirror"] "modelscope" 下载端点
device str "cuda:0" 推理设备
trust_remote_code bool True 是否信任远程代码
language str "中文" 默认识别语言
itn bool True 是否执行逆文本规范化
batch_size int 1 generate 批大小

transcribe 支持通过 kwargs 覆盖 hotwordslanguageitnbatch_size

输出说明

  • 当前模型不返回词级/字级时间戳。
  • fasr 中会把整段识别文本作为一个 AudioToken 返回。

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_asr_fun-0.5.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

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

fasr_asr_fun-0.5.0-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file fasr_asr_fun-0.5.0.tar.gz.

File metadata

  • Download URL: fasr_asr_fun-0.5.0.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • 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_asr_fun-0.5.0.tar.gz
Algorithm Hash digest
SHA256 f2c3511b2bcba04f7422a85bd255eb3b5571be514a50d4d520859e0459a69d8f
MD5 31c9097d81bdb7d45ffd56d5dd08490a
BLAKE2b-256 83f2afb82bfc97541882d90025f47eea05ccefe3be1e0f37b9c463ddbb7ea2e8

See more details on using hashes here.

File details

Details for the file fasr_asr_fun-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: fasr_asr_fun-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • 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_asr_fun-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 739c5812d11a25af2bc39becdf22ac49af8b00348298f359e43f0f152e85a94b
MD5 e4be4ed094d9efaa84cf70462b70462a
BLAKE2b-256 7cddbc9c2c473b31a574f58058c2c23e90c0f2959b799b6cf5b8774706f76588

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