Skip to main content

Qwen3 ASR model for fasr

Project description

fasr-asr-qwen3

内置 Qwen3-ASR 推理(Transformers / vLLM)的语音识别模型插件,为 fasr 提供无时间戳 ASR 能力。

安装

pip install fasr-asr-qwen3

注册模型

注册名 默认 checkpoint 说明
qwen3_0.6b Qwen3_06BForASR Qwen/Qwen3-ASR-0.6B Qwen3 小模型,当前不返回时间戳
qwen3_1.7b Qwen3_17BForASR Qwen/Qwen3-ASR-1.7B Qwen3 大模型,当前不返回时间戳

使用方式

from fasr import AudioPipeline

pipeline = (
    AudioPipeline()
    .add_pipe("detector", model="fsmn")
    .add_pipe("recognizer", model="qwen3_1.7b")  # 或 qwen3_0.6b
    .add_pipe("sentencizer", model="ct_transformer")
)

单独使用模型

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

from fasr.config import registry

model = registry.asr_models.get("qwen3_1.7b")(gpu_memory_utilization=0.6)
# or model.load_checkpoint("/path/to/custom/qwen3")

运行期 / 会话参数

参数 类型 默认值 说明
checkpoint str | None 子类各自默认 远程 repo_id;非空时实例化会自动下载到 cache_dir
cache_dir str | Path | None None 缓存目录,None 使用 fasr.utils.get_cache_dir()
endpoint Literal["modelscope", "huggingface", "hf-mirror"] "modelscope" 下载端点
max_new_tokens int 4096 最大生成 token 数
max_inference_batch_size int -1 vLLM 推理批次上限,-1 不限制
gpu_memory_utilization float 0.8 vLLM 可占用的 GPU 显存比例,(0, 1]
max_model_len int | None None vLLM max_model_lenNone 回退为 max_new_tokens * 2

输出说明

  • 当前模型不返回词级/字级时间戳。
  • 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_qwen3-0.5.0.tar.gz (114.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_qwen3-0.5.0-py3-none-any.whl (117.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fasr_asr_qwen3-0.5.0.tar.gz
  • Upload date:
  • Size: 114.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_qwen3-0.5.0.tar.gz
Algorithm Hash digest
SHA256 9ea39a595cb501f6994ec019ccddff96c369d6a0b7a735d6a40d508b001d12c1
MD5 4f1ca1022f927aac0a1506472b4fd720
BLAKE2b-256 f7f885f496947b3d9fda95061dfa7c166c633d6a9d4401e9f8ade414bea379d6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fasr_asr_qwen3-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 117.0 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_qwen3-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 741f76b005be69a3d4d06b669ce01f0e20cbd07ffa576e7686863c4ade358f41
MD5 a59be95265afd8184309aa8c9122c82d
BLAKE2b-256 03d01dfbdb1e5e671857918691d912021e234faa36c56591387ebdf2886b1c1c

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