Skip to main content

🦜🔗 langchain-funasr

FunASR integration for LangChain — transcribe audio to LangChain Documents with self-hosted speech-to-text.

Powered by SenseVoice / Paraformer / Fun-ASR-Nano: runs locally, no cloud API, strong on Chinese and 50+ languages.

Install

pip install langchain-funasr

Usage

from langchain_funasr import FunASRLoader

loader = FunASRLoader("meeting.wav", model="iic/SenseVoiceSmall", device="cuda")
docs = loader.load()
print(docs[0].page_content)

Use the parser directly with blob pipelines:

from langchain_core.document_loaders import Blob
from langchain_funasr import FunASRParser

parser = FunASRParser(model="FunAudioLLM/SenseVoiceSmall", hub="hf", device="cuda")
docs = list(parser.lazy_parse(Blob.from_path("audio.wav")))

Options

Arg Default Notes
model iic/SenseVoiceSmall Any FunASR model (SenseVoice / Paraformer / Fun-ASR-Nano)
hub ms ms (ModelScope) or hf (HuggingFace)
device cpu e.g. cuda, cuda:0
language auto SenseVoice: auto/zh/en/yue/ja/ko
vad_model fsmn-vad Built-in VAD handles long audio of any length

Why FunASR

  • Self-hosted — no API keys, no data leaving your machine.
  • Fast — SenseVoice is non-autoregressive, far faster than Whisper.
  • Strong on Chinese + 50+ languages.

⭐ If this helps, star FunASR and SenseVoice.

License

Apache-2.0

Metadata

Release files for langchain-funasr 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for langchain-funasr 0.1.0
File Size Uploaded
langchain_funasr-0.1.0.tar.gz 3.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for langchain-funasr 0.1.0
File Interpreter ABI Platform
langchain_funasr-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 7.9 kB

Release files / langchain_funasr-0.1.0.tar.gz

Download URL langchain_funasr-0.1.0.tar.gz
Size 3.4 kB
Tags Source
SHA-256 checksum
How to use checksums
ca971aaa491c1ee7be8c8446cbc44fd3638e468c00cc343e9fca8b2f0c11e9a1
BLAKE2b-256 checksum
How to use checksums
de63f45c4dcf442c1538b2fa93475b13d66e62d810a89732b4e8f9bc6f130287
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / langchain_funasr-0.1.0-py3-none-any.whl

Download URL langchain_funasr-0.1.0-py3-none-any.whl
Size 4.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
153efa7e59c7101a40119db3ebbefa0780548f1ea2a0d12e009207a18c23d0e8
BLAKE2b-256 checksum
How to use checksums
d7d57c0072275a225c939580c8c2049764fe3eba082a96dbacc4c0077b4b766d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page