LangChain integration for FunASR (SenseVoice / Paraformer / Fun-ASR-Nano) speech-to-text
Project description
🦜🔗 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 langchain_funasr-0.1.0.tar.gz.
File metadata
- Download URL: langchain_funasr-0.1.0.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca971aaa491c1ee7be8c8446cbc44fd3638e468c00cc343e9fca8b2f0c11e9a1
|
|
| MD5 |
0923e9278bd163d7a813b6cb197a8933
|
|
| BLAKE2b-256 |
de63f45c4dcf442c1538b2fa93475b13d66e62d810a89732b4e8f9bc6f130287
|
File details
Details for the file langchain_funasr-0.1.0-py3-none-any.whl.
File metadata
- Download URL: langchain_funasr-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
153efa7e59c7101a40119db3ebbefa0780548f1ea2a0d12e009207a18c23d0e8
|
|
| MD5 |
17a27d271d9b410e2d0dabe9f1217816
|
|
| BLAKE2b-256 |
d7d57c0072275a225c939580c8c2049764fe3eba082a96dbacc4c0077b4b766d
|