From 803ce2cb4f9f2a43ccb0d43d46d11ee3af7e01b8 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 4 Jun 2026 23:53:40 +0500 Subject: [PATCH 1/2] docs(funasr): add FunASRTranscriber component page --- .../docs/pipeline-components/audio.mdx | 1 + .../audio/funasrtranscriber.mdx | 67 +++++++++++++++++++ docs-website/sidebars.js | 1 + .../pipeline-components/audio.mdx | 1 + .../audio/funasrtranscriber.mdx | 67 +++++++++++++++++++ .../version-2.28-sidebars.json | 1 + 6 files changed, 138 insertions(+) create mode 100644 docs-website/docs/pipeline-components/audio/funasrtranscriber.mdx create mode 100644 docs-website/versioned_docs/version-2.28/pipeline-components/audio/funasrtranscriber.mdx diff --git a/docs-website/docs/pipeline-components/audio.mdx b/docs-website/docs/pipeline-components/audio.mdx index 4cf9c334ea..f125672fa1 100644 --- a/docs-website/docs/pipeline-components/audio.mdx +++ b/docs-website/docs/pipeline-components/audio.mdx @@ -11,5 +11,6 @@ Use these components to work with audio in Haystack by transcribing files or con | Name | Description | | --- | --- | +| [FunASRTranscriber](audio/funasrtranscriber.mdx) | Transcribe audio files using FunASR — a local, open-source speech recognition toolkit supporting 50+ languages. | | [LocalWhisperTranscriber](audio/localwhispertranscriber.mdx) | Transcribe audio files using OpenAI's Whisper model using your local installation of Whisper. | | [RemoteWhisperTranscriber](audio/remotewhispertranscriber.mdx) | Transcribe audio files using OpenAI's Whisper model. | \ No newline at end of file diff --git a/docs-website/docs/pipeline-components/audio/funasrtranscriber.mdx b/docs-website/docs/pipeline-components/audio/funasrtranscriber.mdx new file mode 100644 index 0000000000..2bd935838a --- /dev/null +++ b/docs-website/docs/pipeline-components/audio/funasrtranscriber.mdx @@ -0,0 +1,67 @@ +--- +title: "FunASRTranscriber" +id: funasrtranscriber +slug: "/funasrtranscriber" +description: "Transcribe audio files to Documents using FunASR — a local, open-source speech recognition toolkit supporting 50+ languages." +--- + +# FunASRTranscriber + +Transcribe audio files to Haystack Documents using FunASR — a local, open-source speech recognition toolkit supporting 50+ languages. + +
+ +| | | +| --- | --- | +| **Most common position in a pipeline** | As the first component in an indexing pipeline | +| **Mandatory run variables** | `sources`: A list of audio file paths (`str` or `Path`) or `ByteStream` objects | +| **Output variables** | `documents`: A list of Haystack Documents, one per source, with transcript text in `content` | +| **API reference** | [FunASR integration](/reference/integrations-funasr) | +| **GitHub link** | https://github.com/deepset-ai/haystack-core-integrations/blob/main/integrations/funasr/src/haystack_integrations/components/converters/funasr/transcriber.py | + +
+ +## Overview + +`FunASRTranscriber` uses [FunASR](https://github.com/modelscope/FunASR), an open-source speech recognition toolkit from Alibaba DAMO Academy, to transcribe audio files into Haystack `Document` objects. It runs entirely locally — no API key required. + +The default model is `iic/SenseVoiceSmall`, a multilingual model supporting 50+ languages that is 5–10x faster than Whisper. Models are downloaded from ModelScope on first use and cached in `~/.cache/modelscope`. + +The component accepts audio file paths (`str` or `Path`) as well as `ByteStream` objects. Call `warm_up()` before running in a pipeline to load the model into memory. + +## Usage + +### On its own + +```python +from haystack_integrations.components.converters.funasr import FunASRTranscriber + +transcriber = FunASRTranscriber() +transcriber.warm_up() + +result = transcriber.run(sources=["speech.wav"]) +print(result["documents"][0].content) +``` + +### In a pipeline + +```python +from haystack import Pipeline +from haystack.components.fetchers import LinkContentFetcher +from haystack_integrations.components.converters.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/interview.wav"], + }, + } +) +print(result["transcriber"]["documents"][0].content) +``` diff --git a/docs-website/sidebars.js b/docs-website/sidebars.js index c9c94e0ad7..63626957f9 100644 --- a/docs-website/sidebars.js +++ b/docs-website/sidebars.js @@ -166,6 +166,7 @@ export default { id: 'pipeline-components/audio' }, items: [ + 'pipeline-components/audio/funasrtranscriber', 'pipeline-components/audio/localwhispertranscriber', 'pipeline-components/audio/remotewhispertranscriber', 'pipeline-components/audio/external-integrations-audio', diff --git a/docs-website/versioned_docs/version-2.28/pipeline-components/audio.mdx b/docs-website/versioned_docs/version-2.28/pipeline-components/audio.mdx index 4cf9c334ea..f125672fa1 100644 --- a/docs-website/versioned_docs/version-2.28/pipeline-components/audio.mdx +++ b/docs-website/versioned_docs/version-2.28/pipeline-components/audio.mdx @@ -11,5 +11,6 @@ Use these components to work with audio in Haystack by transcribing files or con | Name | Description | | --- | --- | +| [FunASRTranscriber](audio/funasrtranscriber.mdx) | Transcribe audio files using FunASR — a local, open-source speech recognition toolkit supporting 50+ languages. | | [LocalWhisperTranscriber](audio/localwhispertranscriber.mdx) | Transcribe audio files using OpenAI's Whisper model using your local installation of Whisper. | | [RemoteWhisperTranscriber](audio/remotewhispertranscriber.mdx) | Transcribe audio files using OpenAI's Whisper model. | \ No newline at end of file diff --git a/docs-website/versioned_docs/version-2.28/pipeline-components/audio/funasrtranscriber.mdx b/docs-website/versioned_docs/version-2.28/pipeline-components/audio/funasrtranscriber.mdx new file mode 100644 index 0000000000..2bd935838a --- /dev/null +++ b/docs-website/versioned_docs/version-2.28/pipeline-components/audio/funasrtranscriber.mdx @@ -0,0 +1,67 @@ +--- +title: "FunASRTranscriber" +id: funasrtranscriber +slug: "/funasrtranscriber" +description: "Transcribe audio files to Documents using FunASR — a local, open-source speech recognition toolkit supporting 50+ languages." +--- + +# FunASRTranscriber + +Transcribe audio files to Haystack Documents using FunASR — a local, open-source speech recognition toolkit supporting 50+ languages. + +
+ +| | | +| --- | --- | +| **Most common position in a pipeline** | As the first component in an indexing pipeline | +| **Mandatory run variables** | `sources`: A list of audio file paths (`str` or `Path`) or `ByteStream` objects | +| **Output variables** | `documents`: A list of Haystack Documents, one per source, with transcript text in `content` | +| **API reference** | [FunASR integration](/reference/integrations-funasr) | +| **GitHub link** | https://github.com/deepset-ai/haystack-core-integrations/blob/main/integrations/funasr/src/haystack_integrations/components/converters/funasr/transcriber.py | + +
+ +## Overview + +`FunASRTranscriber` uses [FunASR](https://github.com/modelscope/FunASR), an open-source speech recognition toolkit from Alibaba DAMO Academy, to transcribe audio files into Haystack `Document` objects. It runs entirely locally — no API key required. + +The default model is `iic/SenseVoiceSmall`, a multilingual model supporting 50+ languages that is 5–10x faster than Whisper. Models are downloaded from ModelScope on first use and cached in `~/.cache/modelscope`. + +The component accepts audio file paths (`str` or `Path`) as well as `ByteStream` objects. Call `warm_up()` before running in a pipeline to load the model into memory. + +## Usage + +### On its own + +```python +from haystack_integrations.components.converters.funasr import FunASRTranscriber + +transcriber = FunASRTranscriber() +transcriber.warm_up() + +result = transcriber.run(sources=["speech.wav"]) +print(result["documents"][0].content) +``` + +### In a pipeline + +```python +from haystack import Pipeline +from haystack.components.fetchers import LinkContentFetcher +from haystack_integrations.components.converters.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/interview.wav"], + }, + } +) +print(result["transcriber"]["documents"][0].content) +``` diff --git a/docs-website/versioned_sidebars/version-2.28-sidebars.json b/docs-website/versioned_sidebars/version-2.28-sidebars.json index 244c1ec211..c264571b3e 100644 --- a/docs-website/versioned_sidebars/version-2.28-sidebars.json +++ b/docs-website/versioned_sidebars/version-2.28-sidebars.json @@ -155,6 +155,7 @@ "id": "pipeline-components/audio" }, "items": [ + "pipeline-components/audio/funasrtranscriber", "pipeline-components/audio/localwhispertranscriber", "pipeline-components/audio/remotewhispertranscriber", "pipeline-components/audio/external-integrations-audio" From f1336e026306da5634e76039885c2c31ea7b1133 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 5 Jun 2026 14:56:31 +0500 Subject: [PATCH 2/2] fix --- .../docs/pipeline-components/audio/funasrtranscriber.mdx | 6 +++--- .../version-2.28/pipeline-components/audio.mdx | 1 - .../version-2.30/pipeline-components/audio.mdx | 1 + .../pipeline-components/audio/funasrtranscriber.mdx | 6 +++--- docs-website/versioned_sidebars/version-2.28-sidebars.json | 1 - docs-website/versioned_sidebars/version-2.30-sidebars.json | 1 + 6 files changed, 8 insertions(+), 8 deletions(-) rename docs-website/versioned_docs/{version-2.28 => version-2.30}/pipeline-components/audio/funasrtranscriber.mdx (91%) diff --git a/docs-website/docs/pipeline-components/audio/funasrtranscriber.mdx b/docs-website/docs/pipeline-components/audio/funasrtranscriber.mdx index 2bd935838a..d537719a69 100644 --- a/docs-website/docs/pipeline-components/audio/funasrtranscriber.mdx +++ b/docs-website/docs/pipeline-components/audio/funasrtranscriber.mdx @@ -17,7 +17,7 @@ Transcribe audio files to Haystack Documents using FunASR — a local, open-sour | **Mandatory run variables** | `sources`: A list of audio file paths (`str` or `Path`) or `ByteStream` objects | | **Output variables** | `documents`: A list of Haystack Documents, one per source, with transcript text in `content` | | **API reference** | [FunASR integration](/reference/integrations-funasr) | -| **GitHub link** | https://github.com/deepset-ai/haystack-core-integrations/blob/main/integrations/funasr/src/haystack_integrations/components/converters/funasr/transcriber.py | +| **GitHub link** | https://github.com/deepset-ai/haystack-core-integrations/blob/main/integrations/funasr/src/haystack_integrations/components/audio/funasr/transcriber.py | @@ -34,7 +34,7 @@ The component accepts audio file paths (`str` or `Path`) as well as `ByteStream` ### On its own ```python -from haystack_integrations.components.converters.funasr import FunASRTranscriber +from haystack_integrations.components.audio.funasr import FunASRTranscriber transcriber = FunASRTranscriber() transcriber.warm_up() @@ -48,7 +48,7 @@ print(result["documents"][0].content) ```python from haystack import Pipeline from haystack.components.fetchers import LinkContentFetcher -from haystack_integrations.components.converters.funasr import FunASRTranscriber +from haystack_integrations.components.audio.funasr import FunASRTranscriber pipe = Pipeline() pipe.add_component("fetcher", LinkContentFetcher()) diff --git a/docs-website/versioned_docs/version-2.28/pipeline-components/audio.mdx b/docs-website/versioned_docs/version-2.28/pipeline-components/audio.mdx index f125672fa1..4cf9c334ea 100644 --- a/docs-website/versioned_docs/version-2.28/pipeline-components/audio.mdx +++ b/docs-website/versioned_docs/version-2.28/pipeline-components/audio.mdx @@ -11,6 +11,5 @@ Use these components to work with audio in Haystack by transcribing files or con | Name | Description | | --- | --- | -| [FunASRTranscriber](audio/funasrtranscriber.mdx) | Transcribe audio files using FunASR — a local, open-source speech recognition toolkit supporting 50+ languages. | | [LocalWhisperTranscriber](audio/localwhispertranscriber.mdx) | Transcribe audio files using OpenAI's Whisper model using your local installation of Whisper. | | [RemoteWhisperTranscriber](audio/remotewhispertranscriber.mdx) | Transcribe audio files using OpenAI's Whisper model. | \ No newline at end of file diff --git a/docs-website/versioned_docs/version-2.30/pipeline-components/audio.mdx b/docs-website/versioned_docs/version-2.30/pipeline-components/audio.mdx index 4cf9c334ea..f125672fa1 100644 --- a/docs-website/versioned_docs/version-2.30/pipeline-components/audio.mdx +++ b/docs-website/versioned_docs/version-2.30/pipeline-components/audio.mdx @@ -11,5 +11,6 @@ Use these components to work with audio in Haystack by transcribing files or con | Name | Description | | --- | --- | +| [FunASRTranscriber](audio/funasrtranscriber.mdx) | Transcribe audio files using FunASR — a local, open-source speech recognition toolkit supporting 50+ languages. | | [LocalWhisperTranscriber](audio/localwhispertranscriber.mdx) | Transcribe audio files using OpenAI's Whisper model using your local installation of Whisper. | | [RemoteWhisperTranscriber](audio/remotewhispertranscriber.mdx) | Transcribe audio files using OpenAI's Whisper model. | \ No newline at end of file diff --git a/docs-website/versioned_docs/version-2.28/pipeline-components/audio/funasrtranscriber.mdx b/docs-website/versioned_docs/version-2.30/pipeline-components/audio/funasrtranscriber.mdx similarity index 91% rename from docs-website/versioned_docs/version-2.28/pipeline-components/audio/funasrtranscriber.mdx rename to docs-website/versioned_docs/version-2.30/pipeline-components/audio/funasrtranscriber.mdx index 2bd935838a..d537719a69 100644 --- a/docs-website/versioned_docs/version-2.28/pipeline-components/audio/funasrtranscriber.mdx +++ b/docs-website/versioned_docs/version-2.30/pipeline-components/audio/funasrtranscriber.mdx @@ -17,7 +17,7 @@ Transcribe audio files to Haystack Documents using FunASR — a local, open-sour | **Mandatory run variables** | `sources`: A list of audio file paths (`str` or `Path`) or `ByteStream` objects | | **Output variables** | `documents`: A list of Haystack Documents, one per source, with transcript text in `content` | | **API reference** | [FunASR integration](/reference/integrations-funasr) | -| **GitHub link** | https://github.com/deepset-ai/haystack-core-integrations/blob/main/integrations/funasr/src/haystack_integrations/components/converters/funasr/transcriber.py | +| **GitHub link** | https://github.com/deepset-ai/haystack-core-integrations/blob/main/integrations/funasr/src/haystack_integrations/components/audio/funasr/transcriber.py | @@ -34,7 +34,7 @@ The component accepts audio file paths (`str` or `Path`) as well as `ByteStream` ### On its own ```python -from haystack_integrations.components.converters.funasr import FunASRTranscriber +from haystack_integrations.components.audio.funasr import FunASRTranscriber transcriber = FunASRTranscriber() transcriber.warm_up() @@ -48,7 +48,7 @@ print(result["documents"][0].content) ```python from haystack import Pipeline from haystack.components.fetchers import LinkContentFetcher -from haystack_integrations.components.converters.funasr import FunASRTranscriber +from haystack_integrations.components.audio.funasr import FunASRTranscriber pipe = Pipeline() pipe.add_component("fetcher", LinkContentFetcher()) diff --git a/docs-website/versioned_sidebars/version-2.28-sidebars.json b/docs-website/versioned_sidebars/version-2.28-sidebars.json index c264571b3e..244c1ec211 100644 --- a/docs-website/versioned_sidebars/version-2.28-sidebars.json +++ b/docs-website/versioned_sidebars/version-2.28-sidebars.json @@ -155,7 +155,6 @@ "id": "pipeline-components/audio" }, "items": [ - "pipeline-components/audio/funasrtranscriber", "pipeline-components/audio/localwhispertranscriber", "pipeline-components/audio/remotewhispertranscriber", "pipeline-components/audio/external-integrations-audio" diff --git a/docs-website/versioned_sidebars/version-2.30-sidebars.json b/docs-website/versioned_sidebars/version-2.30-sidebars.json index fcefb1373d..b18438fdd6 100644 --- a/docs-website/versioned_sidebars/version-2.30-sidebars.json +++ b/docs-website/versioned_sidebars/version-2.30-sidebars.json @@ -162,6 +162,7 @@ "id": "pipeline-components/audio" }, "items": [ + "pipeline-components/audio/funasrtranscriber", "pipeline-components/audio/localwhispertranscriber", "pipeline-components/audio/remotewhispertranscriber", "pipeline-components/audio/external-integrations-audio"