Fun ASR model for fasr
Project description
fasr-asr-fun
基于 fun_asr_nano.py 的 funasr.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")
)
from_checkpoint 参数
| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
checkpoint_dir |
str | Path | None |
None(自动下载) |
模型权重目录 |
device |
str |
"cuda:0" |
推理设备 |
trust_remote_code |
bool |
True |
是否信任远程代码 |
remote_code |
str |
"./model.py" |
远程代码路径 |
language |
str |
"中文" |
识别语言 |
itn |
bool |
True |
是否执行逆文本规范化 |
batch_size |
int |
1 |
generate 批大小 |
transcribe 支持通过 kwargs 覆盖 hotwords、language、itn、batch_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.4.0.tar.gz
(3.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fasr_asr_fun-0.4.0.tar.gz.
File metadata
- Download URL: fasr_asr_fun-0.4.0.tar.gz
- Upload date:
- Size: 3.6 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d172c1b8c6052304b2141cb12662c79290e47f2cc6d9c929c0383c496b72078b
|
|
| MD5 |
e7595ff81a6272136c41efee4c80e6cf
|
|
| BLAKE2b-256 |
8a345c7b5149965f6954b6a293b55caee9d34d751b80a3ebba6c7411c59a38ae
|
File details
Details for the file fasr_asr_fun-0.4.0-py3-none-any.whl.
File metadata
- Download URL: fasr_asr_fun-0.4.0-py3-none-any.whl
- Upload date:
- Size: 4.2 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
328bfe6af20414e2e0f4f4a222c759df98c3ee6c02ca67963f4258362f50bea5
|
|
| MD5 |
8c7d311f20cf963f073ba9cc0b77b110
|
|
| BLAKE2b-256 |
e4eceaede84c0b963932146833281578b54e3838a4e9e865a4eb43349d01afe8
|