Repository navigation
docs(funasr): add FunASR integration page #496
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
kacperlukawski
merged 2 commits into
deepset-ai:main
from
SyedShahmeerAli12:docs/funasr-integration
Jun 18, 2026
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,110 @@ | ||
| --- | ||
| layout: integration | ||
| name: FunASR | ||
| description: Transcribe audio files to Documents using FunASR — an open-source, self-hosted speech recognition toolkit supporting 50+ languages. | ||
| authors: | ||
| - name: deepset | ||
| socials: | ||
| github: deepset-ai | ||
| twitter: Haystack_AI | ||
| linkedin: https://www.linkedin.com/company/deepset-ai/ | ||
| pypi: https://pypi.org/project/funasr-haystack/ | ||
| repo: https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/funasr | ||
| type: Model Provider | ||
| report_issue: https://github.com/deepset-ai/haystack-core-integrations/issues | ||
| version: Haystack 2.0 | ||
| toc: true | ||
| --- | ||
|
|
||
| [](https://pypi.org/project/funasr-haystack/) | ||
| [](https://pypi.org/project/funasr-haystack/) | ||
| [](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/funasr.yml) | ||
|
|
||
| --- | ||
|
|
||
| ### Table of Contents | ||
|
|
||
| - [Overview](#overview) | ||
| - [Installation](#installation) | ||
| - [Usage](#usage) | ||
| - [FunASRTranscriber](#funasrtranscriber) | ||
| - [License](#license) | ||
|
|
||
| ## Overview | ||
|
|
||
| [FunASR](https://github.com/modelscope/FunASR) is an open-source speech recognition toolkit from Alibaba DAMO Academy that runs entirely locally — no API key required. It supports 50+ languages, speaker diarization, and timestamp extraction. | ||
|
|
||
| This integration provides: | ||
|
|
||
| - [`FunASRTranscriber`](https://docs.haystack.deepset.ai/docs/funasrtranscriber): Transcribes audio files to Haystack `Document` objects. Accepts file paths, `Path` objects, and `ByteStream` inputs. | ||
|
|
||
| ## Installation | ||
|
|
||
| ```bash | ||
| pip install funasr-haystack | ||
| ``` | ||
|
|
||
| ## Usage | ||
|
|
||
| ### FunASRTranscriber | ||
|
|
||
| `FunASRTranscriber` transcribes audio files to Haystack `Document` objects using FunASR models. Models are downloaded from ModelScope on first use and cached in `~/.cache/modelscope`. | ||
|
|
||
| #### Basic Example | ||
|
|
||
| ```python | ||
| from haystack_integrations.components.audio.funasr import FunASRTranscriber | ||
|
|
||
| transcriber = FunASRTranscriber() | ||
|
|
||
| result = transcriber.run(sources=["speech.wav", "interview.mp3"]) | ||
| for doc in result["documents"]: | ||
| print(doc.content) | ||
| ``` | ||
|
|
||
| #### In a Pipeline | ||
|
|
||
| ```python | ||
| from haystack import Pipeline | ||
| from haystack.components.fetchers import LinkContentFetcher | ||
| from haystack_integrations.components.audio.funasr import FunASRTranscriber | ||
|
|
||
| pipe = Pipeline() | ||
| pipe.add_component("fetcher", LinkContentFetcher()) | ||
| pipe.add_component("transcriber", FunASRTranscriber()) | ||
|
|
||
| pipe.connect("fetcher", "transcriber") | ||
|
|
||
| result = pipe.run( | ||
| data={ | ||
| "fetcher": { | ||
| "urls": ["https://example.com/speech.wav"], | ||
| }, | ||
| } | ||
| ) | ||
| print(result["transcriber"]["documents"][0].content) | ||
| ``` | ||
|
|
||
| #### Speaker Diarization | ||
|
|
||
| ```python | ||
| from haystack.utils import ComponentDevice | ||
| from haystack_integrations.components.audio.funasr import FunASRTranscriber | ||
|
|
||
| transcriber = FunASRTranscriber( | ||
| model="paraformer-zh", | ||
| vad_model="fsmn-vad", | ||
| punc_model="ct-punc", | ||
| spk_model="cam++", | ||
| device=ComponentDevice.from_str("cuda"), | ||
| ) | ||
|
|
||
| result = transcriber.run(sources=["meeting.wav"]) | ||
| doc = result["documents"][0] | ||
| print(doc.content) | ||
| print("Speakers:", doc.meta.get("speakers")) | ||
| ``` | ||
|
|
||
| ## License | ||
|
|
||
| `funasr-haystack` is distributed under the terms of the [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) license. | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder whether it belongs to the model provider category. Sounds more of like a custom component, although there is a model used for that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
noted ... changed to Data Ingestion. FunASR is self-hosted with no external API, which aligns it with Docling and Azure Doc Intelligence rather than the model provider category.