From effc9d7aead36967eb47579d849c91ead5715065 Mon Sep 17 00:00:00 2001 From: LauraGPT Date: Sun, 19 Jul 2026 12:04:51 +0000 Subject: [PATCH 1/3] docs: add FunASR voice input example --- docs/edge/en/concepts/files.mdx | 41 +++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/docs/edge/en/concepts/files.mdx b/docs/edge/en/concepts/files.mdx index af86baabe2..f0f2fbca54 100644 --- a/docs/edge/en/concepts/files.mdx +++ b/docs/edge/en/concepts/files.mdx @@ -98,6 +98,47 @@ result = crew.kickoff( ) ``` +### Transcribing Audio Before Kickoff + +Use an external speech-to-text endpoint when you want spoken instructions to +become normal CrewAI inputs before the crew starts. For example, a local FunASR +server exposes an OpenAI-compatible transcription API, so the transcript can be +passed into `crew.kickoff(inputs=...)` without changing the crew definition. + +Start FunASR locally: + +```bash +funasr-server --model sensevoice --device cuda --port 8000 +``` + +Transcribe the recording and pass the text into the crew: + +```python +from openai import OpenAI + +client = OpenAI( + api_key="EMPTY", + base_url="http://localhost:8000/v1", +) + +with open("voice-command.wav", "rb") as audio: + transcription = client.audio.transcriptions.create( + model="sensevoice", + file=audio, + response_format="json", + ) + +result = crew.kickoff( + inputs={ + "voice_command": transcription.text, + } +) +``` + +This pattern keeps audio recognition outside the agent loop. The crew receives +plain text, while the ASR service can be self-hosted, GPU-backed, or replaced by +another OpenAI-compatible transcription endpoint. + ### With Tasks Attach files to specific tasks: From 46f0c85786fac481f804b0b8e5ba830e4b1dd6a3 Mon Sep 17 00:00:00 2001 From: LauraGPT Date: Sun, 19 Jul 2026 12:12:09 +0000 Subject: [PATCH 2/3] docs: bind FunASR example to localhost --- docs/edge/en/concepts/files.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/edge/en/concepts/files.mdx b/docs/edge/en/concepts/files.mdx index f0f2fbca54..c667dc0a3c 100644 --- a/docs/edge/en/concepts/files.mdx +++ b/docs/edge/en/concepts/files.mdx @@ -108,7 +108,7 @@ passed into `crew.kickoff(inputs=...)` without changing the crew definition. Start FunASR locally: ```bash -funasr-server --model sensevoice --device cuda --port 8000 +funasr-server --model sensevoice --device cuda --host 127.0.0.1 --port 8000 ``` Transcribe the recording and pass the text into the crew: From d2bc1030f97c36bccd399cea51bcd1db55aa80bb Mon Sep 17 00:00:00 2001 From: LauraGPT Date: Sun, 19 Jul 2026 12:17:21 +0000 Subject: [PATCH 3/3] docs: use IPv4 loopback for FunASR client --- docs/edge/en/concepts/files.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/edge/en/concepts/files.mdx b/docs/edge/en/concepts/files.mdx index c667dc0a3c..1d53c4a875 100644 --- a/docs/edge/en/concepts/files.mdx +++ b/docs/edge/en/concepts/files.mdx @@ -118,7 +118,7 @@ from openai import OpenAI client = OpenAI( api_key="EMPTY", - base_url="http://localhost:8000/v1", + base_url="http://127.0.0.1:8000/v1", ) with open("voice-command.wav", "rb") as audio: